.language-switcher-panel {
    min-width: 0;
    direction: ltr;
}

.language-switcher-top {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 0 0 15px;
}

.language-switcher-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 50%;
    margin: 0 0 0 auto;
    padding: 0 10px;
    border: 1px solid #dfe5e8;
    border-radius: 7px;
    background: #fff;
    color: #84949c;
}

.language-switcher-search:focus-within {
    border-color: #dfe5e8;
    box-shadow: none;
}

.language-switcher-search input {
    width: 100%;
    min-width: 0;
    height: 36px;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #222;
    font-family: inherit;
    font-size: 12px;
    line-height: inherit;
}

.language-switcher-section--current {
    display: flex;
    align-items: center;
    min-width: 0;
    margin: 0;
    padding: 0;
}

.language-switcher-section--popular {
    margin-bottom: 8px;
    padding: 0 0 9px;
}

.language-switcher-recommendations {
    margin-top: 15px;
}

.language-switcher-recommendations .language-switcher-grid {
    grid-template-columns: minmax(0, 1fr);
}

.language-switcher-group-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 3px;
    color: #71828a;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.25;
    white-space: nowrap;
}

.language-switcher-group-heading::before,
.language-switcher-group-heading::after {
    content: '';
    height: 1px;
    background: #e4e8ea;
}

.language-switcher-group-heading::before {
    flex: 0 0 12px;
}

.language-switcher-group-heading::after {
    flex: 1 1 auto;
}

.language-switcher-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 16px;
}

.language-switcher-item {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    min-height: 30px;
    color: #222;
    font-size: 13px;
    line-height: 1.25;
    text-decoration: none;
    white-space: nowrap;
    direction: ltr;
    text-align: left;
}

.language-switcher-item:hover,
.language-switcher-item:focus-visible {
    color: #666;
    text-decoration: none;
}

.language-switcher-item img {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    object-fit: cover;
}

.language-switcher-item span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.language-switcher-item--current {
    font-size: 14px;
    font-weight: 500;
    cursor: default;
}

.language-switcher-item--current img {
    width: 20px;
    height: 20px;
}

.language-switcher-section[hidden],
.language-switcher-item[hidden] {
    display: none !important;
}

.lang-menu {
    width: 760px;
    max-width: calc(100vw - 30px);
}

.lang-menu-inner {
    grid-template-columns: minmax(0, 1fr) 220px;
}

.lang-menu .lang-list {
    gap: 0;
}

.lang-drawer .language-switcher-panel {
    flex: 1;
    min-height: 0;
    padding-bottom: 16px;
    overflow-y: auto;
}

@media (max-width: 767px) {
    .language-switcher-recommendations {
        margin: 15px 16px 0;
    }

    .language-switcher-top {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 7px;
        margin: 0 16px 15px;
    }

    .language-switcher-search {
        width: auto;
        margin: 0;
    }

    .language-switcher-section--current {
        justify-content: flex-start;
        margin: 0;
        padding: 0;
    }

    .language-switcher-section--popular {
        margin: 0 16px 8px;
    }

    .language-switcher-section--all {
        margin: 0 16px;
    }

    .language-switcher-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    .language-switcher-item {
        min-height: 46px;
        border-bottom: 1px solid #f1f3f4;
        font-size: 16px;
    }

    .language-switcher-item--current {
        font-size: 17px;
    }
}
