/**
 * ChaosBoost Currency Switcher Styles
 * Diseño exacto basado en referencia visual
 */

/* ==========================================
   CONTAINER PRINCIPAL
   ========================================== */
.chaosboost-currency-switcher {
    position: relative;
    display: inline-block;
    font-family: 'Rajdhani', 'Inter', sans-serif;
    z-index: 1000;
}

/* ==========================================
   TOGGLE BUTTON (Botón principal)
   ========================================== */
.currency-switcher-toggle {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    width: 130px;
    height: 39px;
    
    /* Gradiente dorado exacto del diseño */
    background: linear-gradient(180deg, #FFC908 -30.77%, rgba(153, 121, 5, 0) 165.38%);
    border: none;
    border-radius: 12px;
    
    cursor: pointer;
    transition: all 0.3s ease;
    
    /* Sombra del diseño */
    filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.25));
}

.currency-switcher-toggle:hover {
    transform: translateY(-2px);
    filter: drop-shadow(0px 6px 8px rgba(0, 0, 0, 0.3));
}

.currency-switcher-toggle:active {
    transform: translateY(0);
    filter: drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.25));
}

/* Ícono del mundo */
.currency-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.currency-icon img {
    width: 24px;
    height: 24px;
    display: block;
}

/* Display del currency */
.currency-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex: 1;
}

.currency-code,
.currency-symbol {
    font-family: 'Rajdhani', sans-serif;
    font-style: normal;
    font-weight: 700;
    font-size: 16px;
    line-height: 86.14%;
    color: #FFFFFF;
    text-align: center;
}

/* Flecha del dropdown */
.dropdown-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 12px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.currency-switcher-toggle.open .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-arrow img {
    width: 26px;
    height: 12px;
    display: block;
}

/* ==========================================
   DROPDOWN MENU
   ========================================== */
.currency-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    min-width: 280px;
    
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 201, 8, 0.3);
    border-radius: 12px;
    
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.6),
        0 0 20px rgba(255, 201, 8, 0.2);
    
    overflow: hidden;
    z-index: 1001;
    
    animation: dropdownFadeIn 0.3s ease;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   CURRENCY OPTION
   ========================================== */
.currency-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    width: 100%;
    
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 201, 8, 0.1);
    
    cursor: pointer;
    transition: all 0.25s ease;
    
    font-family: 'Rajdhani', 'Inter', sans-serif;
    text-align: left;
    color: #fff;
}

.currency-option:last-child {
    border-bottom: none;
}

.currency-option:hover {
    background: rgba(255, 201, 8, 0.12);
    padding-left: 20px;
}

.currency-option.active {
    background: rgba(255, 201, 8, 0.15);
    border-left: 3px solid #FFC908;
}

/* Flag emoji */
.currency-flag {
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
}

/* Info del currency */
.currency-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.currency-name {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.3px;
}

.currency-code-dropdown {
    font-size: 13px;
    font-weight: 500;
    color: #FFC908;
    letter-spacing: 0.5px;
}

/* Check mark */
.currency-check {
    font-size: 18px;
    color: #FFC908;
    font-weight: 700;
    margin-left: auto;
    animation: checkPulse 0.3s ease;
}

@keyframes checkPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
    .currency-switcher-toggle {
        width: 112px;
        height: 36px;
        padding: 8px 14px;
        gap: 6px;
        
    }
    
    .currency-icon {
        width: 20px;
        height: 20px;
    }
    
    .currency-icon img {
        width: 20px;
        height: 20px;
    }
    
    .currency-code,
    .currency-symbol {
        font-size: 14px;
    }
    
    .dropdown-arrow {
        width: 22px;
        height: 10px;
    }
    
    .dropdown-arrow img {
        width: 22px;
        height: 10px;
    }
    
    .currency-dropdown {
        min-width: 192px;
    }
    
    .currency-option {
        padding: 12px 14px;
    }
    
    .currency-flag {
        font-size: 24px;
    }
}

/* ==========================================
   ESTADOS DE CARGA
   ========================================== */
.currency-switcher-toggle.loading {
    pointer-events: none;
    opacity: 0.7;
}

.currency-switcher-toggle.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 16px;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #FFFFFF;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==========================================
   ACCESIBILIDAD
   ========================================== */
.currency-switcher-toggle:focus,
.currency-option:focus {
    outline: 3px solid rgba(255, 201, 8, 0.5);
    outline-offset: 2px;
}

.currency-switcher-toggle:focus:not(:focus-visible),
.currency-option:focus:not(:focus-visible) {
    outline: none;
}