/**
 * Form components - inputs, buttons, selects
 */

input, textarea, select, .form-control {
    background-color: var(--bg-input) !important;
    border: 1px solid var(--border-medium) !important;
    border-color: var(--border-medium) !important;
    color: #ffffff !important;
    border-width: 1px;
    border-style: solid;
}

input:hover, textarea:hover, select:hover, .form-control:hover {
    border-color: var(--border-focus) !important;
    background-color: rgba(50, 50, 50, 0.95) !important;
}

input:focus, textarea:focus, select:focus, .form-control:focus {
    background-color: var(--bg-input-focus) !important;
    border-color: var(--primary) !important;
    color: #ffffff !important;
    outline: none;
    box-shadow: 0 0 0 3px var(--input-focus-ring) !important;
}

.form-label,
label {
    color: #e5e7eb !important;
    font-weight: 500 !important;
}

select,
.form-select,
.nice-select {
    background-color: var(--bg-input) !important;
    border: 1px solid var(--border-medium) !important;
    border-color: var(--border-medium) !important;
    color: #ffffff !important;
}

select:focus,
.form-select:focus,
.nice-select:focus {
    background-color: var(--bg-input-focus) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px var(--input-focus-ring) !important;
}

select option,
.form-select option {
    background-color: var(--bg-input) !important;
    color: #ffffff !important;
}

input[readonly],
input[disabled],
textarea[readonly],
textarea[disabled],
select[disabled] {
    background-color: rgba(35, 35, 35, 0.95) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: #b0b0b0 !important;
    opacity: 0.8 !important;
}

.account-card input,
.account-card textarea,
.account-card select,
.user-card input,
.user-card textarea,
.user-card select,
.form-control,
textarea,
select {
    background-color: var(--bg-input) !important;
    border: 1px solid var(--border-medium) !important;
    border-color: var(--border-medium) !important;
    color: #ffffff !important;
    padding: 0.75rem 1rem !important;
    border-radius: 8px !important;
}

.account-card input:focus,
.account-card textarea:focus,
.account-card select:focus,
.user-card input:focus,
.user-card textarea:focus,
.user-card select:focus,
.form-control:focus,
textarea:focus,
select:focus {
    background-color: var(--bg-input-focus) !important;
    border-color: var(--primary) !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 3px var(--input-focus-ring) !important;
    outline: none !important;
}

.user-form-card {
    background: var(--bg-modal) !important;
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-light) !important;
    border-radius: 20px !important;
    padding: 40px !important;
}

.user-form-title h2 {
    color: #ffffff !important;
}

.user-form-title p {
    color: #9ca3af !important;
}

.user-form-remind {
    margin-top: 20px !important;
    text-align: center !important;
    background: var(--bg-overlay) !important;
    border: 1px solid var(--border-light) !important;
    border-radius: 8px !important;
    padding: 20px !important;
}

.user-form-remind p {
    color: #ffffff !important;
    font-size: 14px !important;
    margin: 0 !important;
}

.user-form-remind a {
    color: var(--primary) !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    transition: color 0.3s ease !important;
}

.user-form-remind a:hover {
    color: var(--primary) !important;
    text-decoration: underline !important;
}

.form-button p {
    color: #ffffff !important;
    margin-top: 15px !important;
}

.form-button a {
    color: var(--primary) !important;
    text-decoration: none !important;
    font-weight: 500 !important;
}

.form-button a:hover {
    color: var(--primary) !important;
    text-decoration: underline !important;
}

/* Buttons */
.btn-primary,
.btn-buy,
.buy-btn-box4,
.louk-btn-buy,
button[style*="background: #3B82F6"],
button[style*="background:#3B82F6"],
a[style*="background: #3B82F6"],
a[style*="background:#3B82F6"] {
    position: relative !important;
    overflow: hidden !important;
    transition: all 0.3s ease !important;
}

.btn-primary:hover,
.btn-buy:hover,
.buy-btn-box4:hover,
.louk-btn-buy:hover,
button[style*="background: #3B82F6"]:hover,
button[style*="background:#3B82F6"]:hover,
a[style*="background: #3B82F6"]:hover,
a[style*="background:#3B82F6"]:hover {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.6), 0 0 40px rgba(59, 130, 246, 0.4) !important;
    transform: translateY(-2px) !important;
}

.btn-primary > *,
.btn-buy > *,
.buy-btn-box4 > *,
.louk-btn-buy > * {
    position: relative !important;
    z-index: 2 !important;
}

/* Pagination */
.pagination .page-link {
    background-color: var(--bg-overlay) !important;
    border-color: var(--border-light) !important;
    color: #ffffff !important;
}

.pagination .page-link:hover {
    background-color: var(--primary-light) !important;
    border-color: var(--primary) !important;
    color: var(--primary) !important;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #ffffff !important;
}

/* Table */
.table {
    --bs-table-color: #ffffff !important;
    --bs-table-bg: transparent !important;
    --bs-table-border-color: rgba(255, 255, 255, 0.1) !important;
    --bs-table-striped-color: #ffffff !important;
    --bs-table-striped-bg: rgba(255, 255, 255, 0.02) !important;
    --bs-table-hover-color: #ffffff !important;
    --bs-table-hover-bg: rgba(255, 255, 255, 0.05) !important;
    color: #ffffff !important;
}

.table thead th {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: var(--primary) !important;
    font-weight: 600;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1) !important;
}

.dropdown-menu {
    background-color: #1a1a1a !important;
    border: 1px solid var(--border-light) !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
}

.dropdown-item {
    color: #d1d5db !important;
}

.dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: #ffffff !important;
}

.badge {
    font-weight: 500;
    letter-spacing: 0.025em;
}

/* Top menu (category menu) - exception for non-active items */
#top-menu-left li a:not(.active),
#top-menu-right li a:not(.active) {
    background: rgba(255, 255, 255, 0.9) !important;
    color: #000000 !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

#top-menu-left li a:not(.active) *,
#top-menu-right li a:not(.active) *,
#top-menu-left li a:not(.active) span,
#top-menu-right li a:not(.active) span,
#top-menu-left li a:not(.active) i,
#top-menu-right li a:not(.active) i {
    color: #000000 !important;
}

#top-menu-left li a:not(.active):hover,
#top-menu-right li a:not(.active):hover {
    background: rgba(255, 255, 255, 0.95) !important;
    color: #000000 !important;
}

#top-menu-left li a:not(.active):hover *,
#top-menu-right li a:not(.active):hover * {
    color: #000000 !important;
}

/* Light background overrides */
.bg-white,
[class*="white"],
[style*="background-color: white"],
[style*="background-color:#fff"],
[style*="background-color:#ffffff"],
[style*="background: white"],
[style*="background:#fff"],
[style*="background:#ffffff"] {
    background-color: rgba(31, 31, 31, 0.8) !important;
    color: #ffffff !important;
}

[style*="background: #f5f5f5"],
[style*="background:#f5f5f5"],
[style*="background-color: #f5f5f5"],
[style*="background-color:#f5f5f5"] {
    background-color: var(--bg-input) !important;
    border: 1px solid var(--border-medium) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

button:not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-warning):not(.btn-info),
.btn:not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-warning):not(.btn-info) {
    color: #ffffff !important;
    border-color: var(--border-medium) !important;
}

.account-card a,
.user-card a,
.product-card a {
    color: var(--primary) !important;
}

.account-card a:hover,
.user-card a:hover,
.product-card a:hover {
    color: var(--primary) !important;
}
