/* ==============================================
   MULTI-LANGUAGE SWITCHER
   ============================================== */

/* Language Switcher Container */
.lang-switcher {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Language Button */
.lang-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 140px;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateX(-3px);
}

.lang-btn.active {
    background: #D21E2D;
    color: #fff;
    border-color: #D21E2D;
}

.lang-btn .flag {
    font-size: 20px;
}

.lang-btn .name {
    flex: 1;
}

/* Phase 2 Languages (Coming Soon) */
.lang-btn.phase2 {
    opacity: 0.4;
    cursor: not-allowed;
    position: relative;
}

.lang-btn.phase2:hover {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    transform: none;
}

.lang-btn.phase2::after {
    content: 'Soon';
    position: absolute;
    right: 10px;
    font-size: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Mobile: Compact Horizontal Layout */
@media (max-width: 768px) {
    .lang-switcher {
        top: auto;
        bottom: 20px;
        right: 20px;
        flex-direction: row;
        padding: 8px;
        gap: 6px;
    }
    
    .lang-btn {
        min-width: auto;
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .lang-btn .name {
        display: none;
    }
    
    .lang-btn .flag {
        font-size: 18px;
    }
}

/* Very Small Mobile: Icon Only */
@media (max-width: 480px) {
    .lang-switcher {
        padding: 6px;
        gap: 4px;
    }
    
    .lang-btn {
        padding: 6px 10px;
    }
    
    .lang-btn .flag {
        font-size: 16px;
    }
}

/* RTL Support */
[dir="rtl"] .lang-switcher {
    right: auto;
    left: 20px;
}

[dir="rtl"] .lang-btn:hover {
    transform: translateX(3px);
}

[dir="rtl"] .lang-btn.phase2::after {
    right: auto;
    left: 10px;
}

/* Language Switcher Toggle (Mobile Hamburger Style) */
.lang-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 101;
    width: 50px;
    height: 50px;
    background: #D21E2D;
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(210, 30, 45, 0.4);
    transition: all 0.3s ease;
}

.lang-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(210, 30, 45, 0.6);
}

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

/* Show toggle on mobile when switcher is collapsed */
@media (max-width: 480px) {
    .lang-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .lang-switcher.collapsed {
        display: none;
    }
}

/* Language Badge (Top Bar) */
.lang-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

.lang-badge .flag {
    font-size: 16px;
}

/* Dropdown Style (Alternative) */
.lang-dropdown {
    position: relative;
    display: inline-block;
}

.lang-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-dropdown-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.lang-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 8px;
    min-width: 160px;
    display: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.lang-dropdown.open .lang-dropdown-menu {
    display: block;
}

/* Animation */
@keyframes langFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lang-switcher {
    animation: langFadeIn 0.4s ease;
}

/* Phase Indicator */
.phase-badge {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(210, 30, 45, 0.2);
    border: 1px solid rgba(210, 30, 45, 0.4);
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    color: #D21E2D;
    text-transform: uppercase;
    margin-left: 8px;
}

/* Language Switcher Header */
.lang-switcher-header {
    padding: 8px 0 4px;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 8px;
}

/* Accessibility */
.lang-btn:focus {
    outline: 2px solid #D21E2D;
    outline-offset: 2px;
}

.lang-toggle:focus {
    outline: 3px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}
