/* Preferences Dropdown (Language + Currency) */

.preferences-dropdown {
    position: relative;
    display: inline-block;
}

.preferences-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(100, 116, 139, 0.3);
    border-radius: 8px;
    color: #e2e8f0;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.preferences-btn:hover {
    background: rgba(51, 65, 85, 0.9);
    border-color: rgba(100, 116, 139, 0.5);
}

.preferences-btn .pref-flag {
    font-size: 16px;
}

.preferences-btn .pref-currency {
    font-weight: 600;
    font-size: 13px;
    color: #10b981;
}

.preferences-btn .dropdown-arrow {
    opacity: 0.6;
    transition: transform 0.2s ease;
}

.preferences-panel.show + .preferences-btn .dropdown-arrow,
.preferences-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.preferences-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(100, 116, 139, 0.3);
    border-radius: 12px;
    min-width: 220px;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

.preferences-panel.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.pref-section {
    padding: 12px;
}

.pref-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    padding: 0 8px 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pref-section-title i {
    font-size: 12px;
}

.pref-divider {
    height: 1px;
    background: rgba(100, 116, 139, 0.2);
    margin: 0;
}

.pref-options {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pref-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #94a3b8;
    cursor: pointer;
    font-size: 14px;
    text-align: left;
    transition: all 0.15s ease;
}

.pref-option:hover {
    background: rgba(59, 130, 246, 0.15);
    color: #e2e8f0;
}

.pref-option.active {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.pref-option .pref-flag {
    font-size: 18px;
}

.pref-option .pref-symbol {
    font-size: 16px;
    font-weight: 600;
    width: 24px;
    text-align: center;
}

.pref-option .pref-name {
    flex: 1;
}

.pref-option i.fa-check {
    font-size: 12px;
    color: #10b981;
}

/* Markets label styling */
.nav-markets-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    margin-right: 8px;
}

.nav-markets {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 12px;
    border-left: 1px solid rgba(100, 116, 139, 0.2);
    margin-left: 12px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .preferences-btn {
        padding: 6px 10px;
    }

    .preferences-btn .pref-currency {
        display: none;
    }

    .preferences-panel {
        right: -20px;
        min-width: 200px;
    }

    .nav-markets-label {
        display: none;
    }
}

/* Hide old currency toggle since it's now in preferences */
#currencyToggle {
    display: none !important;
}
