/* Language switcher (public/assets/js/lang-switcher.js). Floating at the bottom right
   on app pages; inline in the sign-in footer. Uses the member theme's tokens where the
   page has them, with plain fallbacks elsewhere. */
.lang-switch { position: relative; z-index: 1040; font-family: var(--font-sans, system-ui, sans-serif); font-size: 14px; line-height: 1.4; }
.lang-switch.is-float { position: fixed; right: 16px; bottom: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); }

.lang-switch__btn {
    display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 13px 0 11px;
    border: 1px solid var(--ui-line-2, #d7dbea); border-radius: 999px;
    background: var(--ui-surface, #fff); color: var(--ui-ink-2, #2a3052);
    font: inherit; font-size: 13px; font-weight: 600; letter-spacing: .02em; cursor: pointer;
    box-shadow: 0 1px 2px rgba(15, 19, 48, .06), 0 8px 20px -14px rgba(15, 19, 48, .45);
}
.lang-switch.is-inline .lang-switch__btn { height: 34px; box-shadow: none; }
.lang-switch__btn:hover { border-color: var(--ui-faint, #8a90ad); color: var(--ui-ink, #0f1330); }
.lang-switch__btn:focus-visible { outline: 2px solid var(--ui-brand, #4f46e5); outline-offset: 2px; }
.lang-switch__btn svg { width: 17px; height: 17px; }
.lang-switch.is-busy .lang-switch__btn svg { animation: lang-switch-spin 1.2s linear infinite; }
@keyframes lang-switch-spin { to { transform: rotate(360deg); } }

.lang-switch__menu {
    position: absolute; right: 0; bottom: calc(100% + 8px); width: 264px; max-width: calc(100vw - 32px);
    display: flex; flex-direction: column; max-height: min(420px, 70vh); overflow: hidden;
    border: 1px solid var(--ui-line, #e6e8f2); border-radius: 14px; background: var(--ui-surface, #fff);
    box-shadow: 0 18px 44px -18px rgba(15, 19, 48, .45), 0 2px 6px rgba(15, 19, 48, .06);
}
.lang-switch__menu[hidden] { display: none; }
.lang-switch__search {
    margin: 10px 10px 6px; height: 38px; padding: 0 12px;
    border: 1px solid var(--ui-line-2, #d7dbea); border-radius: 10px; background: var(--ui-sunken, #f5f6fb);
    color: var(--ui-ink, #0f1330); font: inherit; font-size: 15px;
}
.lang-switch__search:focus { outline: none; border-color: var(--ui-brand, #4f46e5); box-shadow: 0 0 0 3px rgba(79, 70, 229, .18); }
.lang-switch__list { flex: 1; min-height: 0; margin: 0; padding: 2px 6px 6px; overflow-y: auto; list-style: none; overscroll-behavior: contain; }
.lang-switch__list [hidden] { display: none; }
.lang-switch__opt {
    display: flex; align-items: baseline; justify-content: space-between; gap: 10px; width: 100%;
    padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: var(--ui-ink, #0f1330);
    font: inherit; font-size: 14.5px; text-align: left; cursor: pointer;
}
.lang-switch__opt small { color: var(--ui-faint, #8a90ad); font-size: 12.5px; }
.lang-switch__opt:hover, .lang-switch__opt:focus-visible { outline: none; background: var(--ui-sunken, #f0f1f8); }
.lang-switch__opt[aria-current="true"] { color: var(--ui-brand, #4f46e5); font-weight: 600; }
.lang-switch__note { margin: 0; padding: 8px 14px 10px; border-top: 1px solid var(--ui-line, #e6e8f2); color: var(--ui-faint, #8a90ad); font-size: 12px; line-height: 1.4; }

/* Google's own banner, tooltips and highlight stay out of the way. */
iframe.skiptranslate, .goog-te-banner-frame, #goog-gt-tt, .goog-te-balloon-frame, .goog-te-spinner-pos,
.VIpgJd-ZVi9od-ORHb-OEVmcd, .VIpgJd-ZVi9od-aZ2wEe-wOHMyf, .VIpgJd-yAWNEb-L7lbkb { display: none !important; }
body { top: 0 !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }

@media print { .lang-switch { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .lang-switch.is-busy .lang-switch__btn svg { animation: none; } }
