/* Currency Selector Styles */

.currency-selector {
    position: relative;
    margin-right: 1rem;
}

.currency-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: transparent;
    border: 1px solid var(--gray-light);
    color: var(--white);
    padding: 0.5rem 0.75rem;
    font-family: inherit;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s;
}

.currency-btn:hover {
    border-color: var(--accent);
}

.currency-flag {
    font-size: 0.9rem;
    font-weight: 700;
}

.currency-code {
    font-weight: 700;
    letter-spacing: 0.05em;
}

.currency-arrow {
    font-size: 0.6rem;
    color: var(--text-muted);
    transition: transform 0.3s;
}

.currency-dropdown.open + .currency-btn .currency-arrow,
.currency-selector:has(.currency-dropdown.open) .currency-arrow {
    transform: rotate(180deg);
}

/* Dropdown */
.currency-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--gray);
    border: 1px solid var(--gray-light);
    min-width: 240px;
    max-height: 350px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 1000;
}

.currency-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.currency-dropdown-header {
    padding: 0.75rem 1rem;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid var(--gray-light);
    background: var(--black);
    position: sticky;
    top: 0;
}

.currency-list {
    padding: 0.5rem 0;
}

.currency-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    color: var(--white);
    font-family: inherit;
    font-size: 0.8rem;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s;
}

.currency-option:hover {
    background: var(--black);
}

.currency-option.active {
    background: rgba(255, 61, 0, 0.1);
    border-left: 2px solid var(--accent);
}

.currency-option-symbol {
    width: 24px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent);
}

.currency-option-code {
    font-weight: 700;
    min-width: 35px;
}

.currency-option-name {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* Scrollbar for dropdown */
.currency-dropdown::-webkit-scrollbar {
    width: 4px;
}

.currency-dropdown::-webkit-scrollbar-track {
    background: var(--gray);
}

.currency-dropdown::-webkit-scrollbar-thumb {
    background: var(--gray-light);
}

.currency-dropdown::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    /* Currency selector inside mobile nav menu - scrolls with content */
    .nav .currency-selector {
        position: relative !important;
        width: 100%;
        margin-top: 2rem;
        padding-top: 1.5rem;
        border-top: 1px solid var(--gray-light);
    }

    .nav .currency-btn {
        width: 100%;
        justify-content: center;
        background: var(--gray-light);
        border-radius: 4px;
        padding: 1rem;
        box-shadow: none;
        border: 1px solid var(--gray-light);
    }

    .nav .currency-btn:hover {
        border-color: var(--accent);
    }

    .nav .currency-dropdown {
        bottom: calc(100% + 0.5rem);
        top: auto;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 250px;
    }

    .nav .currency-dropdown.open {
        transform: translateY(0);
    }
}