/* ==========================================
   LANGUAGE SWITCHER COMPONENT STYLES
   Дата: 22 ноября 2025
   ========================================== */

.lang-switch {
    position: fixed;
    top: 20px;
    right: 20px;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.5px;
    z-index: 200;
    background: transparent;
    padding: 0;
    display: flex;
    gap: 0;
    align-items: center;
}

/* Desktop переключатель - на уровне логотипа */
.desktop-lang-switch {
    display: flex !important;
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    z-index: 10 !important;
    background: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    border: none !important;
}

.desktop-lang-switch a.active {
    background: none !important;
    color: #333 !important;
}

/* Mobile переключатель - скрыт на desktop */
.mobile-lang-switch {
    display: none;
}

.lang-switch a {
    color: #999;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.2s ease;
    padding: 0 10px;
    position: relative;
}

.lang-switch .separator {
    color: #ddd;
    font-weight: 200;
    font-size: 10px;
}

.lang-switch a:hover {
    color: #333;
}

.lang-switch a.active {
    color: #333;
    font-weight: 500;
}

.lang-switch a.active::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 10px;
    right: 10px;
    height: 1px;
    background: #333;
}

/* === LANGUAGE SEPARATOR === */
.lang-switch .separator {
    color: #ddd;
    font-weight: 300;
}

/* === DROPDOWN VARIANT === */
.lang-switch.dropdown {
    padding: 8px 12px;
    cursor: pointer;
}

.lang-switch.dropdown .current-lang {
    display: flex;
    align-items: center;
    gap: 5px;
}

.lang-switch.dropdown .current-lang::after {
    content: '▾';
    font-size: 10px;
}

.lang-switch.dropdown .lang-options {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    margin-top: 5px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 5px;
    min-width: 80px;
}

.lang-switch.dropdown:hover .lang-options,
.lang-switch.dropdown.open .lang-options {
    display: flex;
    flex-direction: column;
    animation: slideDown 0.2s ease-out;
}

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

.lang-switch.dropdown .lang-options a {
    padding: 8px 12px;
    text-align: center;
    width: 100%;
}

/* === MOBILE STYLES === */
@media (max-width: 768px) {
    /* Скрываем desktop переключатель на mobile */
    .desktop-lang-switch {
        display: none !important;
        visibility: hidden !important;
    }
    
    /* Mobile переключатель - красиво внизу бургер-меню */
    .mobile-lang-switch {
        display: flex !important;
        position: static !important;
        background: transparent !important;
        box-shadow: none !important;
        justify-content: center !important;
        gap: 15px !important;
        padding: 20px !important;
        margin-top: 10px !important;
        border-top: 1px solid #eee !important;
    }
    
    .mobile-lang-switch a {
        padding: 8px 16px !important;
        font-size: 13px !important;
        font-weight: 500 !important;
        color: #888 !important;
        border: none !important;
        border-radius: 4px !important;
        text-transform: uppercase !important;
        letter-spacing: 1px !important;
        transition: all 0.3s ease !important;
        background: transparent !important;
        text-decoration: none !important;
    }
    
    .mobile-lang-switch a:hover {
        color: #333 !important;
        background: #f5f5f5 !important;
    }
    
    .mobile-lang-switch a.active {
        color: #333 !important;
        background: #f0f0f0 !important;
        font-weight: 600 !important;
    }
}

/* === ALTERNATIVE BOTTOM POSITION === */
.lang-switch.bottom {
    position: fixed;
    top: auto;
    bottom: 20px;
    right: 20px;
}

/* === INLINE VARIANT (для header) === */
.lang-switch.inline {
    position: static;
    background: transparent;
    box-shadow: none;
    padding: 0;
    border-radius: 0;
}

/* === FLAG ICONS SUPPORT === */
.lang-switch .flag-icon {
    width: 16px;
    height: 12px;
    display: inline-block;
    margin-right: 4px;
    border-radius: 2px;
}
