/* Выбор языка (главная): масштабируется на десятки локалей */
.b24-lang-picker {
    position: relative;
    flex-shrink: 0;
}

.b24-lang-picker__trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: min(168px, 42vw);
    padding: 6px 10px 6px 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.92);
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    white-space: nowrap;
}

.b24-lang-picker__trigger:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.22);
}

.b24-lang-picker__trigger:focus-visible {
    outline: 2px solid rgba(226, 232, 240, 0.85);
    outline-offset: 2px;
}

.b24-lang-picker__trigger[aria-expanded='true'] {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.28);
}

.b24-lang-picker__label {
    overflow: hidden;
    text-overflow: ellipsis;
}

.b24-lang-picker__chevron {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    opacity: 0.65;
    transition: transform 0.2s ease;
}

.b24-lang-picker__trigger[aria-expanded='true'] .b24-lang-picker__chevron {
    transform: rotate(180deg);
}

.b24-lang-picker__panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 1100;
    display: none;
    flex-direction: column;
    width: min(280px, calc(100vw - 24px));
    max-height: min(360px, 70vh);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #18181b;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.b24-lang-picker.is-open .b24-lang-picker__panel {
    display: flex;
}

.b24-lang-picker__search-wrap {
    padding: 10px 10px 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.b24-lang-picker__search {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.25);
    color: #f4f4f5;
    font: inherit;
    font-size: 0.8125rem;
}

.b24-lang-picker__search::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.b24-lang-picker__search:focus {
    outline: none;
    border-color: rgba(226, 232, 240, 0.45);
}

.b24-lang-picker__list {
    list-style: none;
    margin: 0;
    padding: 6px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.b24-lang-picker__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #e4e4e7;
    font: inherit;
    font-size: 0.875rem;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease;
}

.b24-lang-picker__item:hover,
.b24-lang-picker__item:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    outline: none;
}

.b24-lang-picker__item.is-active {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.b24-lang-picker__item-native {
    font-weight: 600;
}

.b24-lang-picker__item-secondary {
    font-size: 0.75rem;
    color: #a1a1aa;
    flex-shrink: 0;
}

.b24-lang-picker__item.is-active .b24-lang-picker__item-secondary {
    color: #d4d4d8;
}

.b24-lang-picker__empty {
    padding: 14px 12px;
    font-size: 0.8125rem;
    color: #a1a1aa;
    text-align: center;
}

html[data-color-scheme='light'] .b24-lang-picker__trigger {
    background: rgba(15, 23, 42, 0.06);
    border-color: rgba(15, 23, 42, 0.1);
    color: #0f172a;
}

html[data-color-scheme='light'] .b24-lang-picker__trigger:hover {
    background: rgba(15, 23, 42, 0.09);
    border-color: rgba(15, 23, 42, 0.16);
}

html[data-color-scheme='light'] .b24-lang-picker__panel {
    background: #fff;
    border-color: #e2e8f0;
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.14), 0 0 0 1px rgba(148, 163, 184, 0.15);
}

html[data-color-scheme='light'] .b24-lang-picker__search-wrap {
    border-bottom-color: #e2e8f0;
}

html[data-color-scheme='light'] .b24-lang-picker__search {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #0f172a;
}

html[data-color-scheme='light'] .b24-lang-picker__search::placeholder {
    color: #94a3b8;
}

html[data-color-scheme='light'] .b24-lang-picker__item {
    color: #334155;
}

html[data-color-scheme='light'] .b24-lang-picker__item:hover,
html[data-color-scheme='light'] .b24-lang-picker__item:focus-visible {
    background: #f1f5f9;
}

html[data-color-scheme='light'] .b24-lang-picker__item.is-active {
    background: #e8efff;
    color: #0f172a;
}

html[data-color-scheme='light'] .b24-lang-picker__item-secondary {
    color: #64748b;
}

@media (max-width: 720px) {
    .b24-lang-picker__trigger {
        max-width: min(132px, 38vw);
        padding: 6px 8px 6px 14px;
        font-size: 0.75rem;
    }

    .b24-lang-picker__panel {
        right: 0;
        width: min(260px, calc(100vw - 16px));
    }
}
