/* Guest QR menu. Two themes as variables on .menu-root[data-theme], one accent
   per page from [data-accent]. Every rule is scoped under .menu-root because
   this file is also linked by the panel layouts (stylesheet_link_tag :all). */

.menu-root {
  --menu-bg: #ffffff;
  --menu-ink: #0a0a0a;
  --menu-muted: #71717a;
  --menu-line: #e4e4e7;
  --menu-surface: #f4f4f5;
  --menu-hover: #fafafa;
  --menu-bar: rgba(255, 255, 255, 0.9);
  --menu-accent: #d13128;
  --menu-accent-text: var(--menu-accent);
  --menu-on-accent: #ffffff;
  color-scheme: light;
  background-color: var(--menu-bg);
  color: var(--menu-ink);
}

.menu-root[data-theme="dark"] {
  --menu-bg: #0a0a0a;
  --menu-ink: rgba(255, 255, 255, 0.92);
  --menu-muted: #a1a1aa;
  --menu-line: #27272a;
  --menu-surface: #18181b;
  --menu-hover: #111113;
  --menu-bar: rgba(10, 10, 10, 0.9);
  color-scheme: dark;
}

/* Accent text is lifted on dark so plum or ocean stay readable on #0a0a0a.
   Guarded: without color-mix the property would compute to invalid and take
   focus rings and the active rule with it, so the plain accent stays the default. */
@supports (color: color-mix(in srgb, red, red)) {
  .menu-root[data-theme="dark"] { --menu-accent-text: color-mix(in srgb, var(--menu-accent) 62%, #ffffff); }
}

.menu-root[data-accent="seal"] { --menu-accent: #d13128; }
.menu-root[data-accent="olive"] { --menu-accent: #4d7c0f; }
.menu-root[data-accent="ocean"] { --menu-accent: #0369a1; }
.menu-root[data-accent="amber"] { --menu-accent: #b45309; }
.menu-root[data-accent="plum"] { --menu-accent: #6b21a8; }
.menu-root[data-accent="ink"] { --menu-accent: #0a0a0a; }
.menu-root[data-theme="dark"][data-accent="ink"] { --menu-accent: #ffffff; --menu-accent-text: #ffffff; --menu-on-accent: #0a0a0a; }

.menu-root *,
.menu-root ::before,
.menu-root ::after { border-color: var(--menu-line); }
.menu-root ::selection { background-color: var(--menu-accent); color: var(--menu-on-accent); }
.menu-root :focus-visible { outline: 2px solid var(--menu-accent-text); outline-offset: 2px; }

/* The finder hides rows, notes and JS-only controls with the hidden
   attribute, which a display utility such as .flex would otherwise beat. */
.menu-root [hidden] { display: none !important; }

/* When nothing matches at all, the page-wide note speaks alone. */
.menu-root:has([data-role="nothing-found"]:not([hidden])) [data-role="section-empty"] { display: none !important; }

.menu-root .menu-muted { color: var(--menu-muted); }
.menu-root .menu-link { text-decoration: underline; text-underline-offset: 3px; color: var(--menu-ink); }
/* Sections stop just under the sticky finder; the scrollspy writes its height. */
.menu-root .menu-section { scroll-margin-top: calc(var(--menu-finder-h, 64px) + 8px); }
.menu-root .menu-logo { border-radius: 12px; }

/* Sticky finder on phones: the ground at 90% behind a blur, a hairline under it. */
.menu-root .menu-finder {
  background-color: var(--menu-bar);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--menu-line);
}

.menu-root .menu-search {
  border: 1px solid var(--menu-line);
  background-color: transparent;
  color: var(--menu-ink);
  transition: border-color 150ms ease;
}
.menu-root .menu-search::placeholder { color: var(--menu-muted); opacity: 1; }
.menu-root .menu-search:focus { border-color: var(--menu-muted); box-shadow: none; outline: none; }
.menu-root .menu-search:focus-visible { outline: 2px solid var(--menu-accent-text); outline-offset: 2px; }

/* Category links: a tab row on phones, the rail's list on lg. Accent text and
   a 2px rule mark the section being read, never a filled block. */
.menu-root .menu-cats { scroll-behavior: smooth; }
.menu-root .menu-cats a {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  min-height: 44px;
  padding: 0 0.625rem;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 500;
  color: var(--menu-muted);
  transition: color 150ms ease;
}
.menu-root .menu-cats a:hover { color: var(--menu-ink); }
.menu-root .menu-cats a.is-active { color: var(--menu-accent-text); }
.menu-root .menu-cats a.is-active::after {
  content: "";
  position: absolute;
  left: 0.625rem;
  right: 0.625rem;
  bottom: 0;
  height: 2px;
  border-radius: 1px;
  background-color: var(--menu-accent-text);
}

/* Pills: footer links, the filter button, the language switch, Apply, filter chips. */
.menu-root .menu-pill,
.menu-root .menu-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 1rem;
  border: 1px solid var(--menu-line);
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--menu-ink);
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
}
.menu-root .menu-pill:hover,
.menu-root .menu-chip:hover { border-color: var(--menu-muted); }
.menu-root .menu-pill--accent,
.menu-root .menu-pill--accent:hover { border-color: var(--menu-accent); background-color: var(--menu-accent); color: var(--menu-on-accent); }
.menu-root .menu-pill--ink,
.menu-root .menu-pill--ink:hover {
  border-color: var(--menu-ink);
  background-color: var(--menu-ink);
  color: var(--menu-bg);
  font-weight: 600;
}

.menu-root .menu-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 9999px;
  background-color: var(--menu-accent);
  color: var(--menu-on-accent);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Diet and allergen chips share the pill shape. Pressed is the one filled accent in the sheet. */
.menu-root .menu-chip[aria-pressed="true"] { border-color: var(--menu-accent); background-color: var(--menu-accent); color: var(--menu-on-accent); }

/* Category cards: the photo is the card, the name sits on a scrim that is only as dark as it needs to be. */
.menu-root .menu-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 12px;
  background-color: var(--menu-surface);
  isolation: isolate;
}
.menu-root .menu-card img { transition: transform 200ms ease; }
.menu-root .menu-card:hover img { transform: scale(1.02); }
.menu-root .menu-card-name {
  position: absolute;
  inset: auto 0 0 0;
  padding: 2.5rem 0.875rem 0.75rem;
  background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.55));
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}
.menu-root .menu-tile {
  display: block;
  aspect-ratio: 4 / 3;
  padding: 16px;
  border: 1px solid var(--menu-line);
  border-radius: 12px;
  color: var(--menu-ink);
  transition: border-color 150ms ease;
}
.menu-root .menu-tile:hover { border-color: var(--menu-muted); }

/* Service hours: the window under a card's name; outside it the card is dimmed and the section says when it opens. */
.menu-root .menu-card-window { display: block; margin-top: 2px; font-size: 13px; font-weight: 400; font-variant-numeric: tabular-nums; opacity: 0.85; }
.menu-root .menu-tile .menu-card-window { color: var(--menu-muted); opacity: 1; }
.menu-root [data-closed="true"] { opacity: 0.6; }
.menu-root .menu-closed-note { padding: 14px 0; border-top: 1px solid var(--menu-line); color: var(--menu-muted); }

.menu-root .menu-band { border-radius: 12px; }
.menu-root .menu-thumb { border-radius: 10px; }

/* On dark the photos melt into the ground, so a faint white hairline keeps their edge. */
.menu-root[data-theme="dark"] .menu-photo { outline: 1px solid rgba(255, 255, 255, 0.1); outline-offset: -1px; }
.menu-root[data-theme="dark"] .menu-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  pointer-events: none;
}

/* Rows: hairlines between visible rows only, so a filtered list keeps clean edges. */
.menu-root .menu-rows > li:not([hidden]) ~ li:not([hidden]) { border-top: 1px solid var(--menu-line); }
.menu-root .menu-row { transition: background-color 150ms ease; }
.menu-root .menu-row:hover,
.menu-root .menu-row:active { background-color: var(--menu-hover); }
.menu-root .menu-row[data-sold-out] h3 { color: var(--menu-muted); }
.menu-root .menu-row[data-sold-out] img { opacity: 0.55; }
.menu-root .menu-price { font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--menu-ink); }

.menu-root .menu-badge,
.menu-root .menu-tag { display: inline-block; border-radius: 9999px; white-space: nowrap; }
.menu-root .menu-badge {
  padding: 2px 8px;
  background-color: var(--menu-surface);
  font-size: 11px;
  font-weight: 600;
  line-height: 16px;
}
.menu-root .menu-tag { padding: 4px 10px; border: 1px solid var(--menu-line); }

/* Sheets: a bottom sheet with a drag handle on phones, a centred panel on lg. The only shadow on the page. */
.menu-root .menu-sheet {
  width: 100%;
  max-width: none;
  max-height: 90vh;
  margin: auto 0 0;
  padding: 0;
  overflow-y: auto;
  border: 0;
  border-radius: 20px 20px 0 0;
  background-color: var(--menu-bg);
  color: var(--menu-ink);
  box-shadow: 0 28px 70px -28px rgba(10, 10, 10, 0.28), 0 10px 30px -16px rgba(10, 10, 10, 0.12);
  padding-bottom: env(safe-area-inset-bottom);
}
.menu-root .menu-sheet::before {
  content: "";
  display: block;
  width: 36px;
  height: 4px;
  margin: 8px auto 4px;
  border-radius: 2px;
  background-color: var(--menu-line);
}
/* On dark the sheet lifts one step off the ground so its edge reads against the dimmed page. */
.menu-root[data-theme="dark"] .menu-sheet,
.menu-root[data-theme="dark"] .menu-sheet .menu-close { background-color: var(--menu-surface); }
.menu-root[data-theme="dark"] .menu-sheet .menu-badge { background-color: var(--menu-line); }
.menu-root .menu-sheet::backdrop { background-color: rgba(0, 0, 0, 0.5); }
.menu-root .menu-sheet-actions { border-top: 1px solid var(--menu-line); }
.menu-root .menu-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  background-color: var(--menu-bg);
  color: var(--menu-ink);
}

.menu-root .menu-footer { border-top: 1px solid var(--menu-line); padding-bottom: calc(2.5rem + env(safe-area-inset-bottom)); }
.menu-root .menu-wordmark { color: var(--menu-muted); letter-spacing: -0.01em; }
.menu-root .menu-wordmark:hover { color: var(--menu-ink); }

@media (min-width: 1024px) {
  .menu-root .menu-section { scroll-margin-top: 32px; }
  .menu-root .menu-finder { background: none; border-bottom: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .menu-root .menu-cats a { min-height: 36px; padding: 0 0.75rem; border-left: 2px solid transparent; }
  .menu-root .menu-cats a.is-active { border-left-color: var(--menu-accent-text); }
  .menu-root .menu-cats a.is-active::after { content: none; }
  .menu-root .menu-cats a[data-closed="true"] { flex-direction: column; align-items: flex-start; justify-content: center; padding-block: 4px; line-height: 1.3; }
  .menu-root .menu-sheet { max-width: 32rem; margin: auto; border-radius: 20px; padding-bottom: 0; }
  .menu-root .menu-sheet::before { content: none; }
}

@media (prefers-reduced-motion: no-preference) {
  html:has(.menu-root) { scroll-behavior: smooth; }
}

@media print {
  .menu-root,
  .menu-root[data-theme="dark"] {
    --menu-bg: #ffffff;
    --menu-ink: #000000;
    --menu-muted: #3f3f46;
    --menu-line: #d4d4d8;
    --menu-surface: #ffffff;
    --menu-hover: #ffffff;
    color-scheme: light;
  }
  .menu-root .menu-finder,
  .menu-root .menu-sheet,
  .menu-root .menu-footer-pills { display: none !important; }
  .menu-root .menu-row { break-inside: avoid; }
}
