/**
 * Currency Selector Integration Styles
 * Light and elegant design for multi-currency plugin integration
 */

/* Header Currency Selector */
.header-actions-right .multi-currency-selector {
    margin-right: var(--spacing-sm);
    margin-left: var(--spacing-sm);
    position: relative;
}

.header-actions-right .multi-currency-dropdown {
    min-width: 130px;
    font-size: 14px;
    padding: 12px 20px;
    padding-right: 45px;
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    color: #2c3e50;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="%234a5568"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"/></svg>');
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 14px;
    position: relative;
    overflow: hidden;
}

.header-actions-right .multi-currency-dropdown::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    transition: left 0.5s;
}

.header-actions-right .multi-currency-dropdown:hover::before {
    left: 100%;
}

.header-actions-right .multi-currency-dropdown:hover {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
    transform: translateY(-1px);
}

.header-actions-right .multi-currency-dropdown:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    transform: translateY(-1px);
}

.header-actions-right .multi-currency-dropdown:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 123, 255, 0.2);
}

/* Mobile Currency Selector */
.mobile-currency-selector {
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-md);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 249, 250, 0.9) 100%);
    border-radius: 12px;
    border: 1px solid rgba(225, 229, 233, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.mobile-currency-selector::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.3) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.mobile-currency-selector:hover::before {
    transform: translateX(100%);
}

.mobile-currency-selector .multi-currency-dropdown {
    width: 100%;
    font-size: 16px;
    padding: 14px 20px;
    padding-right: 50px;
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    color: #2c3e50;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="%234a5568"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"/></svg>');
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    position: relative;
    overflow: hidden;
}

.mobile-currency-selector .multi-currency-dropdown::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    transition: left 0.5s;
}

.mobile-currency-selector .multi-currency-dropdown:hover::before {
    left: 100%;
}

.mobile-currency-selector .multi-currency-dropdown:hover {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
    transform: translateY(-1px);
}

.mobile-currency-selector .multi-currency-dropdown:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    transform: translateY(-1px);
}

/* Loading State */
.multi-currency-selector.loading .multi-currency-dropdown {
    opacity: 0.7;
    cursor: not-allowed;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-color: #dee2e6;
}

.multi-currency-selector.loading .multi-currency-dropdown::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid #6c757d;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

/* Dropdown Options Styling */
.multi-currency-dropdown option {
    padding: 8px 12px;
    background: #ffffff;
    color: #2c3e50;
    font-weight: 500;
    border: none;
    outline: none;
}

.multi-currency-dropdown option:hover {
    background: #f8f9fa;
    color: #007bff;
}

.multi-currency-dropdown option:checked {
    background: #007bff;
    color: #ffffff;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-actions-right .multi-currency-dropdown {
        min-width: 100px;
        font-size: 13px;
        padding: 10px 16px;
        padding-right: 35px;
    }
    
    .mobile-currency-selector .multi-currency-dropdown {
        font-size: 15px;
        padding: 12px 18px;
        padding-right: 45px;
    }
}

@media (max-width: 480px) {
    .header-actions-right .multi-currency-dropdown {
        min-width: 90px;
        font-size: 12px;
        padding: 8px 14px;
        padding-right: 30px;
    }
    
    .mobile-currency-selector {
        padding: var(--spacing-sm);
    }
    
    .mobile-currency-selector .multi-currency-dropdown {
        font-size: 14px;
        padding: 10px 16px;
        padding-right: 40px;
    }
}

/* Tablet Landscape */
@media (min-width: 769px) and (max-width: 1024px) {
    .header-actions-right .multi-currency-dropdown {
        min-width: 110px;
        font-size: 13px;
        padding: 11px 18px;
        padding-right: 40px;
    }
}

/* Desktop Large */
@media (min-width: 1200px) {
    .header-actions-right .multi-currency-dropdown {
        min-width: 140px;
        font-size: 15px;
        padding: 13px 22px;
        padding-right: 50px;
    }
}

/* Focus and Accessibility */
.multi-currency-dropdown:focus-visible {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .header-actions-right .multi-currency-dropdown,
    .mobile-currency-selector .multi-currency-dropdown {
        border: 2px solid #000000;
        background: #ffffff;
        color: #000000;
    }
    
    .header-actions-right .multi-currency-dropdown:hover,
    .mobile-currency-selector .multi-currency-dropdown:hover {
        background: #f0f0f0;
        border-color: #000000;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .multi-currency-dropdown,
    .multi-currency-dropdown::before,
    .mobile-currency-selector::before {
        transition: none;
        animation: none;
    }
    
    .multi-currency-dropdown:hover {
        transform: none;
    }
}

/* Print Styles */
@media print {
    .multi-currency-selector {
        display: none;
    }
}