/* Visitor guide languages: the flag button in the header and the language menu
   (scripts/i18n.js). --lf-ink and --lf-accent come from the site's colours. */
header.has-lang { position: relative; }
header.has-lang #exhibit-title { padding-right: 118px; }

.lf-stack {
  position: absolute; top: 50%; right: 16px; transform: translateY(-50%);
  display: flex; align-items: center; gap: 6px; padding: 5px 9px 5px 5px; margin: 0;
  border-radius: 999px; background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.22);
  cursor: pointer; z-index: 5; font: inherit; color: #fff;
}
.lf-stack:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.lf-stack.lf-float { position: fixed; top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; transform: none; z-index: 1150; background: rgba(6, 20, 30, 0.55); border-color: rgba(255, 255, 255, 0.3); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.lf-flags { display: flex; align-items: center; }
.lf-f { width: 34px; height: 34px; border-radius: 50%; overflow: hidden; display: block; flex: none; position: relative; box-shadow: 0 0 0 2px #fff, 0 2px 6px rgba(0, 0, 0, 0.35); }
.lf-f svg { width: 100%; height: 100%; display: block; }
.lf-flags .lf-f + .lf-f { margin-left: -14px; }
.lf-flags .lf-f:nth-child(1) { z-index: 3; }
.lf-flags .lf-f:nth-child(2) { z-index: 2; width: 28px; height: 28px; }
.lf-flags .lf-f:nth-child(3) { z-index: 1; width: 24px; height: 24px; }
.lf-chev { width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); opacity: 0.85; }

.lf-back { position: fixed; inset: 0; background: rgba(3, 20, 30, 0.55); z-index: 2000; }
.lf-sheet {
  --lf-ink: #062e43; --lf-accent: #f16a5c;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 2001; max-height: 85vh; overflow-y: auto;
  background: #fff; color: var(--lf-ink); border-radius: 26px 26px 0 0;
  padding: 12px 18px calc(28px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
  font-family: Inter, system-ui, sans-serif; text-align: left;
}
@media (min-width: 640px) { .lf-sheet { left: 50%; right: auto; width: 480px; transform: translateX(-50%); } }
.lf-handle { width: 44px; height: 5px; border-radius: 9px; background: #d5dde2; margin: 0 auto 16px; }
.lf-sheet h3 { margin: 0; font-size: 1.3rem; letter-spacing: -0.02em; text-align: center; color: var(--lf-ink); }
.lf-sub { margin: 4px 0 0; text-align: center; color: #5b7180; font-size: 0.9rem; }
.lf-list { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.lf-row {
  display: flex; align-items: center; gap: 14px; width: 100%; margin: 0; padding: 12px 14px; cursor: pointer;
  border-radius: 18px; border: 1.5px solid #e3ebef; background: #f6fbfd; color: var(--lf-ink); font: inherit; text-align: left;
}
.lf-row:focus-visible { outline: 3px solid var(--lf-accent); outline-offset: 2px; }
.lf-row .lf-f { width: 46px; height: 46px; box-shadow: 0 0 0 2px #fff, 0 1px 4px rgba(0, 0, 0, 0.25); }
.lf-txt { flex: 1; min-width: 0; }
.lf-txt b { display: block; font-size: 1.12rem; letter-spacing: -0.01em; color: var(--lf-ink); }
.lf-txt span { display: block; color: #5b7180; font-size: 0.88rem; }
.lf-row.on { border-color: var(--lf-accent); background: #fff6f4; }
.lf-tick { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #c9d5db; flex: none; display: grid; place-items: center; }
.lf-row.on .lf-tick { background: var(--lf-accent); border-color: var(--lf-accent); }
.lf-row.on .lf-tick::after { content: ""; width: 11px; height: 6px; border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }

body.kiosk .lf-stack { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .lf-sheet { animation: lf-up 220ms ease-out; }
  @keyframes lf-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
  @media (min-width: 640px) { @keyframes lf-up { from { transform: translate(-50%, 24px); opacity: 0; } to { transform: translateX(-50%); opacity: 1; } } }
}
