/* Язык в мобильной шапке: кнопка рядом со счётчиком онлайн и полноэкранная панель, выезжающая справа налево.
   Кнопка и пункты наследуют вид переключателя языка на компьютере (.navbar-lang-btn). Углы — var(--radius) = 4px. */
.navbar-mobile-tools {
    display: none;
}

.lang-sheet {
    display: none;
}

@media (max-width: 1200px) {
    .navbar-mobile-tools {
        display: flex;
        align-items: center;
        gap: 12px;
        flex-shrink: 0;
    }

    .navbar-lang-btn-mobile {
        cursor: pointer;
    }

    .lang-sheet {
        display: flex;
        flex-direction: column;
        position: fixed;
        inset: 0;
        z-index: 2000;
        background: var(--bg, #050709);
        transform: translateX(100%);
        visibility: hidden;
        transition: transform 0.28s ease, visibility 0s linear 0.28s;
        overscroll-behavior: contain;
    }

    .lang-sheet.is-open {
        transform: translateX(0);
        visibility: visible;
        transition: transform 0.28s ease, visibility 0s;
    }

    .lang-sheet-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 14px 20px;
        background: var(--box);
        box-shadow: 0 1px 5px 1px rgb(0 0 0 / 45%);
    }

    .lang-sheet-title {
        color: #fff;
        font-size: 17px;
        font-weight: 700;
    }

    .lang-sheet-close {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: transparent;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        color: #fff;
        cursor: pointer;
    }

    .lang-sheet-close svg {
        width: 20px;
        height: 20px;
        stroke: currentColor;
        fill: none;
        stroke-width: 2;
    }

    .lang-sheet-list {
        flex: 1;
        overflow-y: auto;
        padding: 14px 20px calc(20px + env(safe-area-inset-bottom, 0px));
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .lang-sheet-item {
        display: flex;
        align-items: center;
        gap: 14px;
        min-height: 56px;
        padding: 0 16px;
        background: var(--box);
        border: 1px solid #22242c;
        border-radius: var(--radius);
        color: var(--white-1);
        font-size: 16px;
        font-weight: 600;
    }

    .lang-sheet-item .flag-icon {
        border-radius: 2px;
        flex-shrink: 0;
    }

    .lang-sheet-item:active {
        background: rgba(255, 255, 255, 0.05);
    }

    .lang-sheet-item.is-active {
        color: #fff;
        border-color: var(--accent, #1fd742);
    }

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

    .lang-sheet-check {
        width: 20px;
        height: 20px;
        stroke: var(--accent-hover, #1fd742);
        fill: none;
        stroke-width: 2.2;
        flex-shrink: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lang-sheet,
    .lang-sheet.is-open {
        transition: none;
    }
}
