/**
 * Currency Dropdown Styles
 */

.currency-selector {
    position: relative;
    z-index: 50;
}

.currency-selector button {
    transition: all 0.2s ease;
    border-radius: 6px;
    padding: 8px 12px;
}

.currency-selector button:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.currency-selector svg {
    transition: transform 0.2s ease;
}

.currency-selector button[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.currency-selector .currency-symbol {
    font-weight: 600;
    min-width: 20px;
    text-align: left;
}

.currency-selector .currency-code {
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.025em;
}

/* Dropdown menu */
#currency-dropdown-menu {
    min-width: 180px;
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: slideDown 0.15s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#currency-dropdown-menu.hidden {
    display: none;
}

.currency-option {
    display: block;
    width: 100%;
    padding: 12px 16px;
    text-align: left;
    border: none;
    background: transparent;
    transition: background-color 0.15s ease;
    cursor: pointer;
    font-size: 0.875rem;
}

.currency-option:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.currency-option:focus {
    outline: none;
    background-color: rgba(0, 0, 0, 0.05);
}

.currency-option.bg-gray-100 {
    background-color: rgba(0, 0, 0, 0.05);
}

.currency-option span {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.currency-option .text-green-600 {
    color: #059669; /* Green-600 for branding consistency */
    font-weight: 600;
}

.currency-option .text-primary {
    color: #059669; /* Fallback for any remaining primary references */
    font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .currency-selector {
        order: -1; /* Move before other buttons on mobile */
    }
    
    #currency-dropdown-menu {
        right: 0;
        left: auto;
        min-width: 160px;
    }
    
    .currency-option {
        padding: 10px 14px;
        font-size: 0.8125rem;
    }
}

/* Integration with existing header styles */
.header-visible .currency-selector {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Dark mode support (if needed) */
@media (prefers-color-scheme: dark) {
    #currency-dropdown-menu {
        background: #1f2937;
        border-color: #374151;
    }
    
    .currency-option {
        color: #f9fafb;
    }
    
    .currency-option:hover,
    .currency-option:focus {
        background-color: rgba(255, 255, 255, 0.1);
    }
    
    .currency-option.bg-gray-100 {
        background-color: rgba(255, 255, 255, 0.1);
    }
}