/**
 * Language Switcher Styles
 * Best Ascon Multilingual Plugin
 * 
 * Минималистичные стили для переключателя языков
 */

/* Основной контейнер */
.bam-lang-switcher {
    position: fixed;
    top: 15px;
    right: 20px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    line-height: 1;
    transition: all 0.3s ease;
}

.bam-lang-switcher:hover {
    background: rgba(0, 0, 0, 0.85);
}

/* Ссылки на языки */
.bam-lang-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.bam-lang-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.bam-lang-link.active {
    color: #ffffff;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.15);
}

/* Разделитель */
.bam-lang-separator {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 300;
    user-select: none;
}

/* Флаги (опционально) */
.bam-lang-flag {
    font-size: 16px;
    line-height: 1;
}

/* Название языка */
.bam-lang-name {
    white-space: nowrap;
}

/* ===================================
   Стиль: simple (по умолчанию)
   =================================== */
.bam-lang-switcher--simple .bam-lang-flag {
    display: none;
}

/* ===================================
   Стиль: flags
   =================================== */
.bam-lang-switcher--flags .bam-lang-flag {
    display: inline;
}

/* ===================================
   Стиль: dropdown (для мобильных)
   =================================== */
.bam-lang-switcher--dropdown {
    position: relative;
}

.bam-lang-switcher--dropdown .bam-lang-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    min-width: 120px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.bam-lang-switcher--dropdown:hover .bam-lang-dropdown {
    display: block;
}

.bam-lang-switcher--dropdown .bam-lang-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    transition: background 0.2s ease;
}

.bam-lang-switcher--dropdown .bam-lang-dropdown-item:hover {
    background: #f5f5f5;
}

.bam-lang-switcher--dropdown .bam-lang-dropdown-item.active {
    background: #f0f0f0;
    font-weight: 600;
}

/* ===================================
   Адаптивность для мобильных
   =================================== */
@media (max-width: 768px) {
    .bam-lang-switcher {
        top: 10px;
        right: 10px;
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .bam-lang-link {
        padding: 3px 6px;
    }
    
    .bam-lang-separator {
        display: none;
    }
}

/* ===================================
   Тёмная тема (если поддерживается)
   =================================== */
@media (prefers-color-scheme: dark) {
    .bam-lang-switcher {
        background: rgba(255, 255, 255, 0.1);
    }
    
    .bam-lang-switcher:hover {
        background: rgba(255, 255, 255, 0.2);
    }
    
    .bam-lang-link.active {
        background: rgba(255, 255, 255, 0.2);
    }
}

/* ===================================
   Печать (скрываем переключатель)
   =================================== */
@media print {
    .bam-lang-switcher {
        display: none !important;
    }
}

/* ===================================
   Анимация появления
   =================================== */
@keyframes bam-fade-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bam-lang-switcher {
    animation: bam-fade-in 0.3s ease-out;
}

/* ===================================
   Состояние загрузки
   =================================== */
body:not(.bam-translations-loaded) .bam-lang-switcher {
    opacity: 0.5;
}
