/* Interim machine-translation toggle: switcher, note, and suppression of
   Google's own injected UI so the layout never shifts. Loaded on every public
   page; see assets/js/language.js. */

/* ---------- Switcher ---------- */
.lang-switch {
  display: inline-flex;
  align-items: center;
  flex: none;
  margin: 0 0 0 .35rem;
  padding: 0;
  color: inherit;
  /* Latin face has no Ethiopic or CJK glyphs; fall back to system fonts for them. */
  font-family: var(--font, "Montserrat"), "Nyala", "Ebrima", "Noto Sans Ethiopic", "Noto Sans SC", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}
.lang-switch__btn {
  appearance: none;
  -webkit-appearance: none;
  min-width: 34px;
  min-height: 32px;
  padding: 0 8px;
  margin: 0;
  border: 0;
  border-radius: 30px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .03em;
  white-space: nowrap;
  opacity: .66;
  cursor: pointer;
  transition: opacity .25s ease, background-color .25s ease;
}
.lang-switch__btn + .lang-switch__btn { position: relative; }
.lang-switch__btn + .lang-switch__btn::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 9px;
  bottom: 9px;
  width: 1px;
  background: currentColor;
  opacity: .28;
}
.lang-switch__btn:hover { opacity: 1; }
.lang-switch__btn[aria-pressed="true"] {
  opacity: 1;
  background: color-mix(in srgb, currentColor 14%, transparent);
  font-weight: 700;
}
.lang-switch__btn[aria-pressed="true"]::before,
.lang-switch__btn[aria-pressed="true"] + .lang-switch__btn::before { opacity: 0; }
.lang-switch__btn:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; opacity: 1; }

/* Header copy: desktop only. The drawer carries its own copy below 1080px. */
.site-header .lang-switch { display: none; }
@media (min-width: 1080px) { .site-header .lang-switch { display: inline-flex; } }
@media (min-width: 1080px) and (max-width: 1239px) {
  .site-header .lang-switch { margin-left: 0; }
  .site-header .lang-switch__btn { min-width: 30px; padding: 0 6px; font-size: 11px; }
}

/* Drawer copy */
.mobile-nav__lang { display: flex; align-items: center; gap: .75rem; margin: 0 0 1rem; color: #fff; }
.mobile-nav__lang .lang-switch { margin: 0; padding: 3px; border: 1px solid var(--line-dark-strong, rgba(165, 204, 237, .34)); border-radius: 40px; }
.mobile-nav__lang .lang-switch__btn { min-height: 40px; min-width: 56px; padding: 0 14px; font-size: 13px; opacity: .8; }
.mobile-nav__lang .lang-switch__btn[aria-pressed="true"] { opacity: 1; background: rgba(255, 255, 255, .16); }

/* ---------- Note ---------- */
.lang-note {
  position: fixed;
  left: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: min(420px, calc(100vw - 24px));
  padding: 7px 8px 7px 14px;
  border-radius: 14px;
  background: rgba(11, 21, 47, .88);
  color: #fff;
  font-size: 12px;
  line-height: 1.4;
  box-shadow: 0 6px 22px rgba(11, 21, 47, .25);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.lang-note[hidden] { display: none; }
.lang-note__text { margin: 0; }
.lang-note__close {
  flex: none;
  appearance: none;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.lang-note__close:hover { background: rgba(255, 255, 255, .16); }
.lang-note__close:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }

/* ---------- Keep Google's injected UI out of the layout ---------- */
.apex-translate-host {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
body > .skiptranslate,
iframe.goog-te-banner-frame,
.goog-te-banner-frame,
.VIpgJd-ZVi9od-ORHb-OEVmcd,
.VIpgJd-ZVi9od-aZ2wEe-wOHMyf,
.VIpgJd-yAWNEb-L7lbkb,
#goog-gt-tt,
.goog-te-balloon-frame,
.goog-tooltip,
.goog-tooltip:hover { display: none !important; visibility: hidden !important; }
html { top: 0 !important; }
body { top: 0 !important; }
.goog-text-highlight,
.VIpgJd-yAWNEb-hvhgNd { background: none !important; box-shadow: none !important; }
