/* ==========================================================================
   public/css/lang-menu.css — the language menu (lib/seo.js languageMenu) and
   the footer language links (languageLinks), shared by every pre-login page.
   Written in logical properties: the menu opens towards the inline END of the
   header in both directions — right-aligned in LTR, left-aligned in RTL.
   Colours come from the design-system tokens with page-level fallbacks, so
   the menu sits on the welcome page and the marketing chrome alike.
   ========================================================================== */
.hz-lang { position: relative; display: inline-block; }
.hz-lang > summary { list-style: none; }
.hz-lang > summary::-webkit-details-marker { display: none; }
.hz-lang__btn {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding-block: 0; padding-inline: 10px 8px;
  border-radius: 999px; cursor: pointer; user-select: none;
  font: inherit; font-size: 13px; font-weight: 700; letter-spacing: .03em;
  color: var(--w-muted, var(--hz-text-2, currentColor));
  background: var(--w-fill, var(--hz-surface-2, rgba(127, 127, 127, .12)));
}
.hz-lang__btn:hover { color: var(--w-text, var(--hz-text-1, currentColor)); }
.hz-lang__btn:focus-visible { outline: 2px solid var(--hz-accent, var(--hz-brand)); outline-offset: 2px; }
.hz-lang__chev { transition: transform .15s ease; }
.hz-lang[open] .hz-lang__chev { transform: rotate(180deg); }
.hz-lang__list {
  position: absolute; z-index: 60; inset-block-start: calc(100% + 6px); inset-inline-end: 0;
  min-inline-size: 172px; margin: 0; padding: 6px; list-style: none;
  border-radius: 14px;
  background: var(--w-canvas, var(--hz-surface-1, #fff));
  color: var(--w-text, var(--hz-text-1, #111));
  box-shadow: 0 12px 32px rgba(0, 0, 0, .18), 0 0 0 1px rgba(127, 127, 127, .16);
}
.hz-lang__opt {
  display: flex; align-items: center; min-height: 40px; padding-inline: 12px;
  border-radius: 10px; text-decoration: none; font-size: 15px; font-weight: 600;
  color: inherit; text-align: start;
}
.hz-lang__opt:hover, .hz-lang__opt:focus-visible { background: var(--w-fill, rgba(127, 127, 127, .12)); outline: none; }
/* The current language in the page's link ink: on the pages drawn in the
   pre-login page's design that is --w-brand-ink (AA on both themes — the bare
   the deep blue is 3.5:1 on the dark canvas); elsewhere the accent, and the
   brand's reading ink where neither is defined. */
.hz-lang__opt[aria-current="true"] { color: var(--hz-accent, var(--w-brand-ink, var(--hz-brand-ink))); }
.hz-lang__opt[aria-current="true"]::after {
  content: ""; inline-size: 7px; block-size: 7px; margin-inline-start: auto;
  border-radius: 50%; background: currentColor;
}
@media (max-width: 480px) {
  .hz-lang__btn { min-height: 44px; min-width: 44px; padding-inline: 10px; }
  .hz-lang__chev { display: none; }
}
@media (prefers-reduced-motion: reduce) { .hz-lang__chev { transition: none; } }

.hz-lang-links { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; }
.hz-lang-links a { color: inherit; opacity: .78; text-decoration: none; }
.hz-lang-links a:hover { opacity: 1; text-decoration: underline; }
.hz-lang-links a[aria-current="true"] { opacity: 1; font-weight: 700; }
/* Touch: each language is a comfortable target (Apple HIG 44pt, Material
   48dp) — 13px text alone is a 20px-tall strip. The target grows without
   moving a single word: 44px tall (the rows touch — the height spaces them),
   and 10px wider on each side, taken back by an equal negative margin, so the
   targets meet in the middle of the 20px gap and the text sits exactly where
   it would without them — on the column's edge, in either direction. */
@media (pointer: coarse) {
  .hz-lang-links { gap: 0 20px; }
  .hz-lang-links a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 10px; margin-inline: -10px; }
}

/* An OPEN language menu is what the person is looking at: the cookie banner
   (an overlay, --hz-z-overlay) steps beneath the page header that holds the
   menu — the welcome header (30) and the marketing header (50) — for as long
   as the menu is open, so no language is hidden behind it. CSS only, so it
   holds for the script-free <details> too. */
html:has(details[data-hz-lang-menu][open]) .hz-cookie { z-index: 25; }
