/* ============================================
   LANGUAGE TOGGLE IN HEADER
   Desktop: Circular button like controls (48px)
   Mobile: Circular button top left (48px)
   ============================================ */

/* Base styles - circular button */
.language-toggle-header {
    /* Circular button style (matches mute, video, surf, theme buttons) */
    width: 48px;
    height: 48px;
    border-radius: 50%;
    
    /* Same background as other buttons */
    background: linear-gradient(135deg, rgba(20, 30, 48, 0.9), rgba(30, 25, 45, 0.88));
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    
    /* Text styling */
    color: #FFF9F0;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0;
    
    /* Centering */
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Cursor and transitions */
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Desktop positioning - absolute positioned in header */
@media (min-width: 769px) {
    .language-toggle-header {
        position: absolute;
        left: 2rem;
        top: 50%;
        transform: translateY(-50%);
        z-index: 100;
    }
}

.language-toggle-header:hover {
    background: rgba(0, 0, 0, 0.85);
    transform: scale(1.1);
}

.language-toggle-header:active {
    transform: scale(0.95);
}

/* Desktop - adjust transform to include scale on hover */
@media (min-width: 769px) {
    .language-toggle-header:hover {
        transform: translateY(-50%) scale(1.1);
    }
    
    .language-toggle-header:active {
        transform: translateY(-50%) scale(0.95);
    }
}

body[data-theme="day"] .language-toggle-header {
    background: linear-gradient(135deg, rgba(255, 249, 240, 0.9), rgba(255, 245, 235, 0.85));
    color: #2D3748;
    box-shadow: 0 4px 16px rgba(255, 107, 53, 0.25);
}

body[data-theme="day"] .language-toggle-header:hover {
    background: rgba(255, 249, 240, 0.95);
}

/* Mobile - circular button matching other controls */
@media (max-width: 768px) {
    .language-toggle-header {
        position: fixed;
        top: 2rem;
        left: 2rem;
        z-index: 1000;
        
        /* Circular button style (matches mute, video, surf, theme buttons) */
        width: 48px;
        height: 48px;
        border-radius: 50%;
        
        /* Same background as other buttons */
        background: linear-gradient(135deg, rgba(20, 30, 48, 0.9), rgba(30, 25, 45, 0.88));
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        border: none;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
        
        /* Text styling */
        font-size: 0.7rem;
        font-weight: 700;
        padding: 0;
        
        /* Centering */
        display: flex;
        align-items: center;
        justify-content: center;
        
        /* Hover effect like other buttons */
        transition: all 0.3s ease;
    }
    
    .language-toggle-header:hover {
        background: rgba(0, 0, 0, 0.85);
        transform: scale(1.1);
    }
    
    .language-toggle-header:active {
        transform: scale(0.95);
    }
    
    /* Hide language button when tap-to-listen overlay is visible */
    .tap-to-listen-overlay.is-visible ~ .language-toggle-header,
    body.tap-overlay-active .language-toggle-header {
        opacity: 0;
        pointer-events: none;
    }
    
    /* Day theme mobile - matches day theme buttons */
    body[data-theme="day"] .language-toggle-header {
        background: linear-gradient(135deg, rgba(255, 249, 240, 0.9), rgba(255, 245, 235, 0.85));
        color: #2D3748;
        box-shadow: 0 4px 16px rgba(255, 107, 53, 0.25);
    }
    
    body[data-theme="day"] .language-toggle-header:hover {
        background: rgba(255, 249, 240, 0.95);
        transform: scale(1.1);
    }
}

/* ============================================
   SPANISH TEXT SIZE FIXES
   Make Spanish text smaller to prevent overflow
   ============================================ */

/* RETRANSMISIÓN badge - make smaller */
[data-i18n="nowplaying.restream"] {
    font-size: 0.75rem !important;
    letter-spacing: 0.05em;
}

.hero__live-indicator .live-label[data-i18n="nowplaying.restream"] {
    font-size: 0.65rem !important;
}

/* Mobile - even smaller */
@media (max-width: 768px) {
    [data-i18n="nowplaying.restream"] {
        font-size: 0.55rem !important;
    }
}

/* ============================================
   LANGUAGE TOGGLE BUTTON (Bottom - HIDDEN)
   We're using the header button instead
   ============================================ */

.language-toggle-button {
    display: none !important;  /* Hide on all screen sizes */
}

/* ============================================
   LANGUAGE MODAL (First Visit Popup)
   Matches surf widget colorful aesthetic
   ============================================ */

.language-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.language-modal.is-visible {
    display: flex;
}

.language-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.language-modal__content {
    position: relative;
    z-index: 1;
    background: linear-gradient(135deg, rgba(20, 30, 48, 0.95), rgba(30, 25, 45, 0.92));
    border: 2px solid rgba(0, 217, 217, 0.3);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    max-width: 500px;
    width: calc(100% - 2rem);
    text-align: center;
    box-shadow: 
        0 20px 60px rgba(255, 107, 53, 0.15),
        0 10px 30px rgba(0, 217, 217, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

.language-modal__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #FFF9F0;
    margin: 0 0 2rem;
    line-height: 1.4;
}

.language-modal__buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.language-modal__button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, rgba(0, 217, 217, 0.15), rgba(0, 255, 136, 0.1));
    border: 2px solid rgba(0, 217, 217, 0.3);
    border-radius: 16px;
    color: #FFF9F0;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
}

.language-modal__button:hover {
    background: linear-gradient(135deg, rgba(0, 217, 217, 0.25), rgba(0, 255, 136, 0.2));
    border-color: #00D9D9;
    box-shadow: 0 8px 25px rgba(0, 217, 217, 0.3);
}

.language-modal__flag {
    font-size: 3rem;
    line-height: 1;
}

.language-modal__name {
    font-size: 1.1rem;
}

/* Day theme modal */
body[data-theme="day"] .language-modal__content {
    background: linear-gradient(135deg, rgba(255, 249, 240, 0.98), rgba(255, 245, 235, 0.95));
    color: #2D3748;
    border-color: rgba(255, 107, 53, 0.3);
    box-shadow: 
        0 20px 60px rgba(255, 107, 53, 0.12),
        0 10px 30px rgba(0, 217, 217, 0.15),
        0 0 0 1px rgba(255, 107, 53, 0.2);
}

body[data-theme="day"] .language-modal__title {
    color: #2D3748;
}

body[data-theme="day"] .language-modal__button {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.12), rgba(255, 215, 0, 0.08));
    border-color: rgba(255, 107, 53, 0.3);
    color: #2D3748;
}

body[data-theme="day"] .language-modal__button:hover {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.2), rgba(255, 215, 0, 0.15));
    border-color: #FF6B35;
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.3);
}

/* Mobile modal */
@media (max-width: 768px) {
    .language-modal__content {
        padding: 2rem 1.5rem;
    }
    
    .language-modal__title {
        font-size: 1.25rem;
    }
    
    .language-modal__buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .language-modal__button {
        width: 100%;
        min-width: 0;
    }
}