/* The language picker on every Thuma site (TB-1726). One file, copied into
   each site's css/ by tools/gen_site_lang.py; the markup is written into
   every page by the same tool, so it works with no script at all.

   It takes each site's own colours where the site names them (thumabooks.com
   and thumapay.com: --panel, --line, --white, --grey and their accent;
   thumaexpress.com: --grey-panel, --grey-line, --accent), and a site may set
   --lp-* to override. Language names are shown in their own language, never
   as flags or codes alone (W3C Internationalization). */
.lang-nav{ display:inline-flex; align-items:center; flex-shrink:0; }
.lp-slot{ margin-left:auto; display:flex; align-items:center; }
/* A header the picker joined (the English-only legal and trust pages) lays
   its brand and the picker out in one row, wrapping on a narrow phone. */
:has(> .lp-slot){ display:flex; align-items:center; flex-wrap:wrap; gap:8px 12px; }
.lang-pick{ position:relative; display:inline-block; flex-shrink:0;
  --lp-bg-x:var(--lp-bg,var(--panel,var(--grey-panel,#ffffff)));
  --lp-fg-x:var(--lp-fg,var(--white,#111111));
  --lp-muted-x:var(--lp-muted,var(--grey,var(--grey-mid,#5e5e5e)));
  --lp-line-x:var(--lp-line,var(--line,var(--grey-line,#d9d9d9)));
  --lp-accent-x:var(--lp-accent,var(--plum,var(--gold,var(--accent,currentColor)))); }
.lang-pick > summary{ list-style:none; display:inline-flex; align-items:center; gap:6px;
  min-height:36px; padding:6px 10px; border:1px solid var(--lp-line-x); border-radius:999px;
  font:600 13px/1 inherit; font-family:inherit; color:var(--lp-fg-x); cursor:pointer;
  user-select:none; white-space:nowrap; background:transparent; }
.lang-pick > summary::-webkit-details-marker{ display:none; }
.lang-pick > summary:hover{ border-color:var(--lp-accent-x); }
.lang-pick > summary:focus-visible{ outline:2px solid var(--lp-accent-x); outline-offset:2px; }
.lang-pick .lp-globe,.lang-pick .lp-chev{ width:16px; height:16px; flex-shrink:0; }
.lang-pick .lp-chev{ width:12px; height:12px; transition:transform .2s; }
.lang-pick[open] .lp-chev{ transform:rotate(180deg); }
.lang-pick .lp-short{ display:none; }
.lang-pick .lp-sr{ position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden;
  clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.lang-pick .lp-menu{ position:absolute; right:0; top:calc(100% + 8px); z-index:60; min-width:220px;
  margin:0; padding:6px; list-style:none; background:var(--lp-bg-x); color:var(--lp-fg-x);
  border:1px solid var(--lp-line-x); border-radius:14px;
  box-shadow:0 18px 48px rgba(9,13,18,.18); }
.lang-pick .lp-note{ padding:8px 10px 6px; font-size:12px; line-height:1.4; color:var(--lp-muted-x); }
.lang-pick .lp-menu a,.lang-pick .lp-menu button{ display:flex; align-items:center; justify-content:space-between; gap:12px;
  min-height:44px; padding:10px 12px; border-radius:10px; font-size:15px; font-weight:500;
  color:var(--lp-fg-x); text-decoration:none; width:100%; border:0; background:none; font-family:inherit; cursor:pointer; text-align:left; }
.lang-pick .lp-menu a:hover,.lang-pick .lp-menu a:focus-visible,.lang-pick .lp-menu button:hover,.lang-pick .lp-menu button:focus-visible{
  background:color-mix(in srgb,var(--lp-accent-x) 10%,transparent); outline:none; }
.lang-pick .lp-menu a:focus-visible,.lang-pick .lp-menu button:focus-visible{ box-shadow:inset 0 0 0 2px var(--lp-accent-x); }
.lang-pick .lp-menu [aria-current="true"]{ font-weight:700; color:var(--lp-accent-x); }
.lang-pick .lp-menu [aria-current="true"]::after{ content:"\2713"; font-weight:700; }
.lang-pick .lp-menu .lp-home{ font-size:12px; font-weight:500; color:var(--lp-muted-x); }
@media (max-width:600px){
  .lang-pick > summary{ padding:6px 8px; }
  .lang-pick .lp-now{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }
  .lang-pick .lp-short{ display:inline; font-size:12px; letter-spacing:.04em; }
  .lang-pick .lp-menu{ position:fixed; left:12px; right:12px; top:72px; min-width:0; }
}
/* thumaexpress.com's one-row header: on a phone its brand, the country chip
   and the picker fill the row, and the header buttons were clipped off the
   right edge, unreachable (the language research of 26 Oct measured them at
   x 352-578 on a 390 px screen). Each of them is also in the page itself, so
   on a phone the header keeps the brand, the country and the language. */
@media (max-width:600px){ .nav:has(> .lang-nav) > .nav-cta{ display:none !important; } }
@media (max-width:360px){
  .lang-pick > summary{ gap:4px; padding:6px; }
  .lang-pick .lp-chev{ display:none; }
}
@media (prefers-reduced-motion:reduce){ .lang-pick .lp-chev{ transition:none; } }

/* The suggestion, never a redirect: shown only when the browser prefers one of
   this page's other languages and the visitor has not chosen or dismissed it.
   It is decided after the page has drawn, so it sits fixed at the foot of the
   screen (above a site's cookie bar, when that bar says its height in
   --consent-h) instead of pushing the page down: nothing the visitor is
   reading moves (CLS, WORKBOOK.md §6.4). .lp-room keeps the page's last line
   clear of it. */
.lp-suggest{ display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:8px 14px;
  position:fixed; left:0; right:0; bottom:var(--consent-h,0px);
  padding:10px max(16px,env(safe-area-inset-right,0px)) max(10px,env(safe-area-inset-bottom,0px)) max(16px,env(safe-area-inset-left,0px));
  font-size:14px; line-height:1.4; text-align:center;
  background:color-mix(in srgb,var(--lp-accent,var(--plum,var(--gold,var(--accent,currentColor)))) 10%,var(--lp-bg,var(--panel,var(--grey-panel,#ffffff))));
  color:var(--lp-fg,var(--white,#111111));
  border-top:1px solid var(--lp-line,var(--line,var(--grey-line,#d9d9d9)));
  box-shadow:0 -4px 16px rgba(0,0,0,.08); z-index:70; }
.lp-room{ display:block; }
.lp-suggest a{ font-weight:700; color:inherit; text-decoration:underline; text-underline-offset:3px; }
.lp-suggest button{ min-width:44px; min-height:44px; margin:-10px 0; border:0; background:none;
  color:inherit; font:inherit; font-size:20px; line-height:1; cursor:pointer; }
.lp-suggest button:focus-visible,.lp-suggest a:focus-visible{ outline:2px solid currentColor; outline-offset:2px; }

/* Every footer: the five languages inline, always visible, no script. */
.lang-foot{ display:flex; align-items:center; flex-wrap:wrap; gap:6px 4px; margin-top:20px; width:100%;
  font-size:13px; color:var(--lp-muted,var(--grey,var(--grey-mid,#5e5e5e))); }
.lang-foot .lp-globe{ width:16px; height:16px; margin-right:4px; flex-shrink:0; }
.lang-foot ul{ display:flex; flex-wrap:wrap; gap:2px 4px; margin:0; padding:0; list-style:none; }
.lang-foot a,.lang-foot button,.lang-foot span{ display:inline-flex; align-items:center; min-height:32px; padding:4px 8px;
  border-radius:8px; color:inherit; text-decoration:none; font:inherit; background:none; border:0; cursor:pointer; }
.lang-foot a:hover,.lang-foot button:hover{ color:var(--lp-fg,var(--white,#111111)); text-decoration:underline; text-underline-offset:3px; }
.lang-foot a:focus-visible,.lang-foot button:focus-visible{ outline:2px solid currentColor; outline-offset:1px; }
.lang-foot [aria-current="true"]{ font-weight:700; color:var(--lp-fg,var(--white,#111111)); cursor:default; }
