/* ==========================================================================
   The menu board (shared/menu.js). Everything is scoped under .wu-menu and written in the theme's variables, so a
   venue's brand and each house theme carry. Made for a screen across a room: big, high contrast, no external
   fonts or pictures. Sizes come from --wu-u (default 1vmin, not set here so a parent can set it); set it on the board or its box to scale the whole thing
   (a small preview can use 1cqmin). Everything inside is in em, so it all scales together.
   ========================================================================== */

.wu-menu {
  box-sizing: border-box; display: flex; flex-direction: column;
  width: 100%; height: 100%; min-height: 0;
  padding: calc(var(--wu-u, 1vmin) * 3) calc(var(--wu-u, 1vmin) * 4);
  color: var(--ink); font-family: var(--body);
  /* The item names: about 3.2vmin, never under 1rem, never over 3rem. */
  font-size: clamp(1rem, calc(var(--wu-u, 1vmin) * 3.2), 3rem);
  line-height: 1.2;
}
.wu-menu *, .wu-menu *::before, .wu-menu *::after { box-sizing: border-box; }

/* ---------------- the header ---------------- */
.wu-menu__head {
  flex: none; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; column-gap: 1em;
  margin: 0 0 .9em; padding-bottom: .5em; border-bottom: 1px solid var(--rule);
}
.wu-menu__name-big {
  margin: 0; font-family: var(--display); font-weight: var(--display-weight, 800); letter-spacing: var(--display-tracking, .01em);
  text-transform: uppercase; font-size: 2em; line-height: 1; color: var(--ink);
  text-shadow: var(--star-shadow, none);
}
.wu-menu__page {
  grid-column: 2; grid-row: 1; font-family: var(--display); font-weight: 700; letter-spacing: .08em;
  font-size: .7em; color: var(--muted); white-space: nowrap;
}
.wu-menu__note { grid-column: 1 / -1; margin: .3em 0 0; font-size: .7em; line-height: 1.25; color: var(--muted); }

/* ---------------- the body: sections laid out in columns ----------------
   The columns fill one after another (column-fill: auto) inside the board's height, so a section that doesn't fit
   moves to the next column instead of stretching them all. pages() reads the overflow to know when to start a new page. */
.wu-menu__body {
  flex: 1 1 0; min-height: 0; overflow: hidden;
  padding-inline: .15em;
  column-count: 2; column-gap: 3.5em; column-fill: auto; column-rule: 1px solid var(--rule);
}
.wu-menu[data-cols="1"] .wu-menu__body { column-count: 1; }
.wu-menu[data-cols="2"] .wu-menu__body { column-count: 2; }
.wu-menu[data-cols="3"] .wu-menu__body { column-count: 3; column-gap: 2.6em; }

.wu-menu__sec { break-inside: avoid; margin: 0 0 1.5em; }
.wu-menu__sec:last-child { margin-bottom: 0; }
.wu-menu__title {
  break-after: avoid;
  margin: 0 0 .6em; padding-bottom: .22em; border-bottom: .12em solid var(--accent-bright);
  font-family: var(--display); font-weight: var(--display-weight, 800); letter-spacing: var(--display-tracking, .01em);
  text-transform: uppercase; font-size: 1.15em; line-height: 1.1; color: var(--ink);
}

/* ---------------- one item: name ........ price ---------------- */
.wu-menu__item { break-inside: avoid; margin: 0 0 .75em; }
.wu-menu__item:last-child { margin-bottom: 0; }
.wu-menu__row { display: flex; align-items: baseline; gap: .4em; }
.wu-menu__name { flex: 0 1 auto; min-width: 0; font-weight: 600; overflow-wrap: break-word; color: var(--ink); }
.wu-menu__lead {
  flex: 1 1 1em; min-width: 1em; align-self: baseline; height: 0;
  border-bottom: .12em dotted var(--muted); opacity: .75;
  position: relative; top: -.28em;
}
.wu-menu__price {
  flex: none; white-space: nowrap; font-weight: 800; font-variant-numeric: tabular-nums;
  color: var(--accent-bright); text-shadow: 0 0 .7em var(--glow, transparent);
}
.wu-menu__desc { margin-top: .12em; padding-right: 2.5em; font-size: .64em; line-height: 1.3; color: var(--muted); }

/* The tag ("NEW", "GF") and the "Sold out" mark: small pills after the name. */
.wu-menu__tag {
  flex: none; align-self: center; white-space: nowrap;
  padding: .12em .6em; border: .09em solid var(--accent-bright); border-radius: 999px;
  font-family: var(--display); font-weight: 700; font-size: .5em; letter-spacing: .09em; text-transform: uppercase;
  color: var(--accent-bright);
}
.wu-menu__tag--out { border-color: var(--muted); background: var(--muted); color: var(--paper); }

/* ---------------- sold out ---------------- */
.wu-menu__item.is-out .wu-menu__name { text-decoration: line-through; text-decoration-thickness: .08em; color: var(--muted); }
.wu-menu__item.is-out .wu-menu__price { text-decoration: line-through; color: var(--muted); text-shadow: none; }
.wu-menu__item.is-out .wu-menu__desc { opacity: .75; }
.wu-menu__item.is-out .wu-menu__lead { opacity: .35; }

/* ---------------- nothing to show ---------------- */
.wu-menu.is-empty { justify-content: center; }
.wu-menu__empty {
  text-align: center; font-family: var(--display); font-weight: var(--display-weight, 800); letter-spacing: var(--display-tracking, .01em);
  text-transform: uppercase; font-size: 1.8em; color: var(--muted);
}
