/*
 * QR / mobile menu. Everything is scoped under .menu-content so the same
 * component can sit inside the dashboard preview and the homepage mockups;
 * only body.public-menu styles the standalone page.
 */

body.public-menu {
  margin: 0;
  background: #fbf7f0;
  color: #1e2327;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.menu-content {
  --menu-bg: #fbf7f0;
  --menu-ink: #1e2327;
  --menu-soft: #535a62;
  --menu-line: #eadfcd;
  --menu-accent: color-mix(in srgb, var(--brand-primary, #0f766e) 82%, #000);
  --menu-heading: color-mix(in srgb, var(--brand-secondary, #134e4a) 88%, #000);
  max-width: 640px;
  margin: 0 auto;
  padding: 28px 20px 48px;
  color: var(--menu-ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.45;
}
.menu-content *, .menu-content *::before, .menu-content *::after { box-sizing: border-box; }
/* Owners pick any brand colors. Cap their lightness so text in those colors
   (and white text on them) always stays readable on the light page. */
@supports (color: oklch(from red l c h)) {
  .menu-content {
    --menu-accent: oklch(from var(--brand-primary, #0f766e) min(l, 0.5) c h);
    --menu-heading: oklch(from var(--brand-secondary, #134e4a) min(l, 0.42) c h);
  }
}

.menu-header { text-align: center; margin-bottom: 20px; }
.menu-logo { width: 72px; height: 72px; object-fit: contain; border-radius: 16px; margin-bottom: 10px; background: #fff; }
.menu-header h1 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 650;
  font-size: 1.85rem;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--menu-heading);
}
.menu-header .menu-name {
  margin: 8px 0 0;
  color: var(--menu-soft);
  font-size: 0.8rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* Sticky, horizontally scrolling section links. */
.menu-nav {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: 0 -20px 8px;
  padding: 10px 0;
  background: color-mix(in srgb, var(--menu-bg) 92%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--menu-line);
}
.menu-nav ul {
  list-style: none;
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0 20px;
  overflow-x: auto;
  scrollbar-width: none;
}
.menu-nav ul::-webkit-scrollbar { display: none; }
.menu-nav a {
  display: block;
  white-space: nowrap;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--menu-line);
  background: #fff;
  color: var(--menu-ink);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}
.menu-nav a:hover { border-color: var(--menu-accent); }
.menu-nav a:focus-visible { outline: 3px solid var(--menu-accent); outline-offset: 2px; }
.menu-nav a.is-active { background: var(--menu-accent); border-color: var(--menu-accent); color: #fff; }

.menu-category { padding-top: 22px; scroll-margin-top: 64px; }
.menu-category h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 4px;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 650;
  font-size: 1.4rem;
  color: var(--menu-heading);
}
.menu-category h2::after { content: ""; flex: 1; height: 2px; background: var(--menu-line); border-radius: 2px; }

.menu-item { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--menu-line); }
.menu-item:last-child { border-bottom: none; }
.menu-item-body { flex: 1; min-width: 0; }
.menu-item-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.menu-item-name { font-weight: 650; font-size: 1.05rem; line-height: 1.3; }
.menu-item-price { font-weight: 700; font-size: 1.05rem; color: var(--menu-accent); white-space: nowrap; font-variant-numeric: tabular-nums; }
.menu-item-desc { margin: 4px 0 0; color: var(--menu-soft); font-size: 0.92rem; line-height: 1.45; }
.menu-item-variants { list-style: none; display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 0; padding: 0; }
.variant-pill {
  display: inline-flex; gap: 6px; align-items: baseline;
  background: #fff; border: 1px solid var(--menu-line); border-radius: 999px;
  padding: 4px 11px; font-size: 0.86rem;
}
.variant-pill span { color: var(--menu-soft); }
.variant-pill strong { color: var(--menu-accent); font-weight: 700; }
.menu-item-photo { width: 84px; height: 84px; border-radius: 14px; object-fit: cover; flex-shrink: 0; background: var(--menu-line); }

.sold-out-tag {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 9px;
  border-radius: 999px;
  background: #c73e1d;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
/* Sold out: muted but still readable (explicit colors, not opacity). */
.menu-item.is-sold-out .menu-item-name { color: var(--menu-soft); }
.menu-item.is-sold-out .menu-item-price,
.menu-item.is-sold-out .variant-pill strong { color: var(--menu-soft); text-decoration: line-through; }
.menu-item.is-sold-out .menu-item-photo { opacity: 0.6; filter: grayscale(70%); }

.menu-empty, .menu-category-empty { text-align: center; color: var(--menu-soft); padding: 40px 0; }
.menu-category-empty { padding: 12px 0; text-align: left; font-size: 0.9rem; }

.menu-footer { text-align: center; padding: 8px 0 36px; font-size: 0.8rem; }
.menu-footer a { color: #6a6f76; text-decoration: none; }
.menu-footer a:hover { text-decoration: underline; }

.menu-banner {
  background: #0c3b3d; color: #fbf5ea; text-align: center;
  padding: 10px 16px; font-size: 0.88rem; line-height: 1.4;
}
.menu-banner a { color: #f9a68e; margin-left: 6px; font-weight: 600; }
.menu-banner.is-draft { background: #fcefd6; color: #6d3f00; }

.unavailable-page { max-width: 420px; margin: 0 auto; padding: 18vh 24px 40px; text-align: center; }
.unavailable-page h1 { font-family: "Fraunces", Georgia, serif; font-weight: 650; font-size: 1.6rem; margin: 0 0 10px; color: #0c3b3d; }
.unavailable-page p { color: #535a62; margin: 0; }
