/* Customer storefront. Mobile first: most people arrive from a QR code on a phone. */
:root {
  --brand: #ea580c;
  --brand-dark: #c2410c;
  --brand-tint: #fff1e6;
  --ink: #1c1917;
  --ink-2: #57534e;
  --ink-3: #78716c;
  --line: #e7e2dc;
  --ground: #fbfaf8;
  --card: #ffffff;
  --ok: #15803d;
  --ok-tint: #e7f6ec;
  --warn: #b45309;
  --warn-tint: #fef3dc;
  --radius: 14px;
  --gutter: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #fb7a32;
    --brand-dark: #fb923c;
    --brand-tint: #3a2214;
    --ink: #f5f2ee;
    --ink-2: #cfc9c2;
    --ink-3: #a39d95;
    --line: #38332e;
    --ground: #171412;
    --card: #211d1a;
    --ok: #4ade80;
    --ok-tint: #12301c;
    --warn: #fbbf24;
    --warn-tint: #3b2e0e;
  }
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--ground);
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: 1.75rem; font-weight: 800; }
h2 { font-size: 1.1rem; font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0; }
a { color: var(--brand-dark); }
button, input, select, textarea { font: inherit; color: inherit; }

.shell { min-height: 100vh; display: flex; flex-direction: column; }
.shell main { flex: 1; padding-bottom: 88px; }
.foot { text-align: center; color: var(--ink-3); font-size: 0.8rem; padding: 18px var(--gutter) 28px; }

.page { width: 100%; max-width: 720px; margin: 0 auto; padding-inline: var(--gutter); }
.page.narrow { max-width: 560px; }
.notice { text-align: center; padding-block: 64px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.notice p { color: var(--ink-2); max-width: 36ch; }

.boot { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 60vh; color: var(--ink-3); font-family: system-ui, sans-serif; }
.boot-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--brand); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 0.25; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.1); } }
@media (prefers-reduced-motion: reduce) { .boot-dot { animation: none; } }

/* ---- header ---- */
.hero { background: linear-gradient(180deg, var(--brand-tint), var(--ground)); padding-block: 28px 12px; border-bottom: 1px solid var(--line); }
.eyebrow { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--brand-dark); margin-bottom: 4px; }
.lede { color: var(--ink-2); margin-top: 8px; max-width: 52ch; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; color: var(--ink-2); font-size: 0.9rem; margin-top: 10px; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; }
.pill.open { background: var(--ok-tint); color: var(--ok); }
.pill.closed { background: var(--warn-tint); color: var(--warn); }
.banner { background: var(--brand-tint); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-top: 12px; color: var(--ink); }
.banner.warn { background: var(--warn-tint); color: var(--warn); border-color: transparent; }
.hint { color: var(--ink-3); font-size: 0.9rem; margin-top: 8px; }

.recent { margin-top: 14px; }
.recent h2 { font-size: 0.95rem; color: var(--ink-2); margin-bottom: 6px; }
.recent-link { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; margin-bottom: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); }
.recent-link span { color: var(--brand-dark); font-weight: 700; }

/* ---- category bar ---- */
.cats { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--ground) 92%, transparent); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); margin-top: 14px; }
.cats .page { display: flex; gap: 8px; overflow-x: auto; padding-block: 10px; scrollbar-width: none; }
.cats .page::-webkit-scrollbar { display: none; }
.cats a { flex: none; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.cats a:focus-visible, .cats a:hover { border-color: var(--brand); color: var(--brand-dark); }

/* ---- menu ---- */
.menu section { padding-top: 22px; scroll-margin-top: 62px; }
.menu h2 { margin-bottom: 10px; }
.item { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; margin-bottom: 10px; cursor: pointer; }
.item:hover { border-color: var(--brand); }
.item:focus-visible, .btn:focus-visible, .icon:focus-visible, .slot:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; }
.item-thumb { flex: none; width: 64px; height: 64px; border-radius: 12px; background: var(--brand-tint); display: flex; align-items: center; justify-content: center; font-size: 1.7rem; overflow: hidden; }
.item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.item-body strong { font-size: 1rem; }
.price { font-variant-numeric: tabular-nums; color: var(--ink-2); font-weight: 600; }
.allergens { color: var(--ink-3); font-size: 0.78rem; }
.add { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; line-height: 1; }

/* ---- basket bar ---- */
.basket-bar { position: fixed; left: var(--gutter); right: var(--gutter); bottom: max(14px, env(safe-area-inset-bottom)); z-index: 10; max-width: 688px; margin-inline: auto; display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--brand); color: #fff; border-radius: 16px; padding: 14px 18px; text-decoration: none; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22); }
.basket-bar strong { font-variant-numeric: tabular-nums; }

/* ---- the item sheet ---- */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.45); z-index: 20; }
.sheet { position: fixed; z-index: 21; left: 0; right: 0; bottom: 0; max-width: 560px; margin-inline: auto; max-height: 88vh; overflow-y: auto; background: var(--card); border-radius: 20px 20px 0 0; padding: 18px var(--gutter) max(18px, env(safe-area-inset-bottom)); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.sheet fieldset, .card fieldset { border: 0; padding: 0; margin: 12px 0; }
.sheet legend, .card legend { font-weight: 700; margin-bottom: 6px; padding: 0; }
.sheet-foot { display: flex; gap: 12px; align-items: center; margin-top: 16px; }

/* ---- forms and buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-weight: 700; cursor: pointer; text-decoration: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.wide { width: 100%; padding-block: 15px; font-size: 1.05rem; margin-top: 6px; }
.btn.grow { flex: 1; }
.icon { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); font-size: 1.2rem; line-height: 1; cursor: pointer; }
.qty { display: inline-flex; align-items: center; gap: 10px; }
.qty span { min-width: 1.5ch; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }

.field { display: flex; flex-direction: column; gap: 5px; margin-top: 12px; }
.field > span { font-weight: 600; font-size: 0.9rem; color: var(--ink-2); }
.field input, .field select, .field textarea, .sheet .field input { width: 100%; padding: 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--ground); }
.choice { display: flex; align-items: center; gap: 10px; padding: 10px 0; }
.choice .price { margin-left: auto; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.choice.big { padding: 11px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--ground); cursor: pointer; }
.choice.big.on { border-color: var(--brand); background: var(--brand-tint); font-weight: 700; }
.choice.big input { accent-color: var(--brand); }
.slots { display: flex; flex-wrap: wrap; gap: 8px; }
.slot { padding: 9px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--ground); font-variant-numeric: tabular-nums; cursor: pointer; }
.slot.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; }

/* A field only automated scripts fill in: off-screen for people and for screen readers. */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ---- checkout and tracking ---- */
.checkout, .track { padding-block: 20px; }
.back { display: inline-block; margin-bottom: 10px; text-decoration: none; font-weight: 600; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-top: 14px; }
.card h2 { margin-bottom: 4px; }
.line { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.line:last-of-type { border-bottom: 0; }
.line-main { display: flex; flex-direction: column; min-width: 0; }
.sub { color: var(--ink-3); font-size: 0.85rem; }
.line-total { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 5.5ch; text-align: right; }
.totals { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 6px; display: flex; flex-direction: column; gap: 4px; color: var(--ink-2); }
.totals > div { display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; }
.totals .grand { color: var(--ink); font-weight: 800; font-size: 1.15rem; margin-top: 4px; }
.instructions { white-space: pre-line; background: var(--brand-tint); border-radius: 10px; padding: 10px 12px; margin: 8px 0; font-weight: 600; }
.pay p { margin-top: 6px; }

.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 0; margin: 18px 0 6px; }
.steps li { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--ink-3); text-align: center; }
.steps .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--line); }
.steps li.done .dot { background: var(--ok); }
.steps li.current { color: var(--ink); font-weight: 700; }
.steps li.current .dot { background: var(--brand); box-shadow: 0 0 0 5px color-mix(in srgb, var(--brand) 28%, transparent); }

#blazor-error-ui { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 99; padding: 12px var(--gutter); background: var(--warn-tint); color: var(--warn); }
#blazor-error-ui .dismiss { cursor: pointer; float: right; }

@media (min-width: 720px) {
  h1 { font-size: 2.1rem; }
  .basket-bar { max-width: 688px; }
}

.item.sold-out { opacity: .6; cursor: not-allowed; }
.item.sold-out:hover { border-color: var(--line); }
.stock-note { display: block; font-size: .8rem; font-weight: 600; margin-top: 2px; }
.stock-note.out { color: var(--danger, #b42318); }
.stock-note.low { color: var(--warn, #9a6700); }

.tips { border: 0; padding: 0; margin: 12px 0; }
.tips legend { font-weight: 600; margin-bottom: 6px; }
.choice:not(.big) { padding: 8px 14px; }
