/* Переключатель языка (static/js/i18n.js) */
.lang-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-right: 10px;
    flex-shrink: 0;
}

.lang-switch-floating {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 10050;
    margin: 0;
}

.lang-switch-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    color: #334155;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.4px;
    cursor: pointer;
    line-height: 1;
}

.lang-switch-btn:hover {
    border-color: #667eea;
}

.lang-switch-btn svg {
    width: 16px;
    height: 16px;
}

.lang-switch-menu {
    display: none;
    position: fixed;
    min-width: 150px;
    padding: 6px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
    z-index: 2147483647;
}

.lang-switch-menu.open {
    display: block;
}

.lang-switch-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    border: none;
    border-radius: 8px;
    background: none;
    color: #1e293b;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.lang-switch-item:hover {
    background: #f1f5f9;
}

.lang-switch-item.active {
    background: #eef2ff;
    color: #4f46e5;
}

.lang-switch-item .lang-code {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
}

/* Выбор языка в меню пользователя */
.user-menu-lang {
    margin: 4px 0;
    padding: 12px 16px 14px;
    border-radius: 10px;
}

.user-menu-lang-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.user-menu-lang-ico {
    display: inline-flex;
    flex-shrink: 0;
    color: #667eea;
}

.user-menu-lang-title {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.user-menu-lang-current {
    padding: 3px 9px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
}

/* Сегментный переключатель с «бегунком», который плавно переезжает на выбранный язык */
.user-menu-lang-seg {
    --idx: 0;
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 3px;
    border-radius: 11px;
    background: #f1f5f9;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
}

.user-menu-lang-thumb {
    position: absolute;
    top: 3px;
    bottom: 3px;
    left: 3px;
    width: calc((100% - 6px) / 3);
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.45);
    transform: translateX(calc(var(--idx) * 100%));
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.user-menu-lang-pill {
    position: relative;
    z-index: 1;
    padding: 8px 0;
    border: none;
    border-radius: 8px;
    background: none;
    color: #64748b;
    font: inherit;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.6px;
    cursor: pointer;
    transition: color 0.15s ease;
}

.user-menu-lang-pill:hover {
    color: #4f46e5;
}

.user-menu-lang-pill.active,
.user-menu-lang-pill.active:hover {
    color: #fff;
}

