/* =====================================================================
   EDS 2.0 — Lao language (2026-10-24)
   1. Noto Sans Lao Looped for every Lao character (fonts in assets/fonts/lao-fonts.css, Lao-only
      unicode-range, so English words inside Lao sentences keep the EDS fonts).
   2. Lao typography: stacked vowels and tone marks need taller lines and no letter-spacing.
   3. Language switcher ([eds2_lang] shortcode, inc/eds2-wpml.php).
   ===================================================================== */

/* ---------- 1. Font stacks: Latin font first, Noto Sans Lao Looped for Lao ---------- */
:root{
  --font-display:"Newsreader","Noto Sans Lao Looped",Georgia,serif;
  --font-sans:"Instrument Sans","Noto Sans Lao Looped",system-ui,-apple-system,"Segoe UI",sans-serif;
  --font-mono:"IBM Plex Mono","Noto Sans Lao Looped",ui-monospace,monospace;
}
:lang(lo) input,:lang(lo) textarea,:lang(lo) select,:lang(lo) button{font-family:var(--font-sans)}

/* ---------- 2. Lao typography ---------- */
body.eds2:lang(lo),:lang(lo) :is(#jet-theme-core-header,#jet-theme-core-footer){line-height:1.8}
body.eds2:lang(lo) :is(.display,h1,.h1,h2,.h2){line-height:1.3;letter-spacing:0;text-wrap:balance}
body.eds2:lang(lo) :is(h3,.h3,h4,.h4,h5,h6){line-height:1.45;letter-spacing:0}
body.eds2:lang(lo) .lead{line-height:1.8}
body.eds2:lang(lo) :is(p,li,dd,td,th,.text-editor){line-height:1.8}
/* Small mono labels: Lao has no capitals and must not be letter-spaced */
:lang(lo) :is(.eyebrow,.mm-head,.drawer-panel h3,.chapter-label .name,.fact-rail dt,.ph-label,.flag,.meta,.caption){letter-spacing:0;text-transform:none;line-height:1.5}
:lang(lo) :is(.btn,.nav-link,.util-link,.drawer-trigger){letter-spacing:0;line-height:1.4}
:lang(lo) .btn{padding-top:.55em;padding-bottom:.55em}
/* Lao words are not separated by spaces: allow breaking long runs instead of overflowing */
body.eds2:lang(lo){overflow-wrap:anywhere;word-break:normal;line-break:auto}
body.eds2:lang(lo) :is(.display,h1,.h1){word-break:keep-all;overflow-wrap:anywhere}
/* Lao headlines need more room per line than the English 12ch, and read best a step smaller */
body.eds2:lang(lo) .hero-home .display{max-width:18ch;font-size:calc(var(--t-display) * .82)}
body.eds2:lang(lo) .display{font-size:calc(var(--t-display) * .85)}
body.eds2:lang(lo) :is(h1,.h1){font-size:calc(var(--t-h1) * .88)}
body.eds2:lang(lo) :is(h2,.h2){font-size:calc(var(--t-h2) * .92)}

/* ---------- 3. Language switcher ---------- */
.lang-switch{display:inline-flex;align-items:center;flex-shrink:0;border:1px solid var(--border-subtle,#D9D4CC);border-radius:999px;padding:2px;background:#fff;font-family:var(--font-sans);line-height:1}
.lang-switch__link{display:inline-flex;align-items:center;justify-content:center;min-width:40px;min-height:36px;padding:0 10px;border-radius:999px;color:var(--c-ink-900,#12161C);text-decoration:none;font-size:.8125rem;font-weight:600;letter-spacing:.02em;transition:background-color .15s ease,color .15s ease}
.lang-switch__link[lang="lo"]{font-size:.875rem;letter-spacing:0}
.lang-switch__link{gap:6px}
.lang-switch__flag{display:block;width:20px;height:14px;object-fit:cover;border-radius:2px;box-shadow:0 0 0 1px rgba(18,22,28,.12);flex-shrink:0}
.lang-switch__link:hover{background:var(--c-paper,#F6F3EE);text-decoration:none}
.lang-switch__link:focus-visible{outline:2px solid var(--c-ink-900,#12161C);outline-offset:2px}
.lang-switch__link.is-current{background:var(--c-ink-900,#12161C);color:#fff;pointer-events:none}
.lang-switch .sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* Header utilities: one button to the other language, before the CTA, also on phones */
.header-utils .eds2-lang-widget{display:flex;align-items:center}
.lang-switch--compact{border:0;padding:0;background:none}
.lang-switch--compact .lang-switch__link{min-width:44px;min-height:36px;padding:0 10px;border:1px solid var(--c-ink-900,#12161C);border-radius:999px}
.lang-switch--compact .lang-switch__link:hover{background:var(--c-ink-900,#12161C);color:#fff}
/* Laptops (full menu, little room): flag only; the language name stays for screen readers and in the tooltip */
@media (min-width:1024px) and (max-width:1359px){
  .lang-switch--compact .lang-switch__link > span[aria-hidden]{display:none}
  .lang-switch--compact .lang-switch__link{min-width:40px;padding:0 9px}
}
@media (max-width:389px){ .header-utils .eds2-lang-widget{display:none} } /* very small phones: the drawer has the switcher */

/* Mobile drawer: full language names, full width, under the drawer header */
.lang-switch--drawer{display:flex;width:100%;border-radius:var(--radius-1,4px);padding:3px}
.lang-switch--drawer .lang-switch__link{flex:1;min-height:44px;border-radius:calc(var(--radius-1,4px) - 1px);font-size:.9375rem}
.drawer .eds2-lang-drawer{padding:var(--s-4,16px) var(--page-margin,20px) 0}

/* Footer (dark): outline version */
.footer-bottom .lang-switch{background:transparent;border-color:var(--c-ink-700,#2B313A)}
.footer-bottom .lang-switch__link{color:var(--text-inverse-muted,#A3A9B2);min-height:36px}
.footer-bottom .lang-switch__link:hover{background:var(--c-ink-800,#1C222B);color:#fff}
.footer-bottom .lang-switch__link.is-current{background:#fff;color:var(--c-ink-900,#12161C)}
.footer-bottom .eds2-lang-footer{display:flex;align-items:center}
