/* A sliding selection pill; text transitions are handled in app.js. */
html .language-switcher { position: relative; isolation: isolate; }
html .language-switcher::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: 3px;
    bottom: 3px;
    left: 3px;
    width: calc((100% - 6px) / 2);
    border-radius: 999px;
    background: var(--surface);
    box-shadow: 0 2px 7px rgba(0,0,0,.18);
    transition: transform 480ms cubic-bezier(.2,.7,.3,1);
    pointer-events: none;
}
html[lang="en"] .language-switcher::before { transform: translateX(100%); }
html .language-switcher .language-btn.active { background: transparent; box-shadow: none; }
header.adaptive-header.header-compact-controls .language-switcher::before { display: none; }
html header.adaptive-header.header-compact-controls .language-btn.active {
    background: var(--surface-soft);
    animation: language-button-in 280ms ease-out;
}
@keyframes language-button-in {
    from { opacity: .4; }
    to { opacity: 1; }
}
@media (max-width: 520px) {
    html .language-switcher::before { display: none; }
    html .language-switcher .language-btn.active {
        background: var(--surface-soft);
        animation: language-button-in 280ms ease-out;
    }
}
html[data-motion="reduce"] .language-switcher::before { transition: none; }
html[data-motion="reduce"] .language-switcher .language-btn { animation: none; }
@media (prefers-reduced-motion: reduce) {
    html .language-switcher::before { transition: none; }
    html .language-switcher .language-btn { animation: none; }
}
