/* Ready Up customer pages. Phone first. Brand: green #22C232, dark green #146B1F,
   cream #FBF5EA, charcoal #1A1A1A. */
:root {
  --green: #22C232; --green-dark: #146B1F; --cream: #FBF5EA; --ink: #1A1A1A; --grey: #4A4A52;
  --line: #E6DECF; --soft: #F4FBF4; --danger: #B3261E; --radius: 14px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
}
a { color: var(--green-dark); }
button { font: inherit; }

.topbar {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  background: var(--ink); color: #fff; border-bottom: 4px solid var(--green);
  position: sticky; top: 0; z-index: 5;
}
.brand-logo { height: 44px; width: auto; border-radius: 10px; background: var(--cream); padding: 2px 4px; display: block; }
.vendor-name { margin: 0; font-size: 1.25rem; line-height: 1.2; }
.topbar .sub { margin: 2px 0 0; font-size: 0.9rem; color: #D6D6DC; }
.topbar .sub a { color: var(--green); }

.test-banner { background: #FFF4CC; color: #3D2B00; padding: 8px 16px; font-size: 0.85rem; text-align: center; }
.page { max-width: 720px; margin: 0 auto; padding: 16px; }
.foot { text-align: center; font-size: 0.85rem; color: var(--grey); padding: 24px 16px; }

.notice { background: #fff; border-radius: var(--radius); padding: 12px 14px; margin: 0 0 14px; border: 1px solid var(--line); }
.notice-paused { background: #FFF4CC; border-color: #F5C451; }
.notice-error { background: #FDECEA; border-color: #F28B82; color: #5C130E; }
.wait-chip {
  display: inline-block; background: var(--green); color: #0B2E10; font-weight: 600;
  padding: 6px 12px; border-radius: 999px; margin-bottom: 8px;
}

.menu-section h2, .section-title {
  font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--green-dark);
  margin: 18px 0 8px; padding-left: 10px; border-left: 4px solid var(--green);
}
.items { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.item {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: left;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; cursor: pointer;
  color: inherit; min-height: 56px; transition: transform 0.08s, box-shadow 0.15s, border-color 0.15s;
}
.item:hover { border-color: var(--green); box-shadow: 0 2px 10px rgba(20, 107, 31, 0.10); }
.item:active { transform: scale(0.99); }
.item:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.item.added { border-color: var(--green); background: var(--soft); }
.item.sold-out, .item:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }
.item-text { display: flex; flex-direction: column; gap: 2px; }
.item-name { font-weight: 600; }
.item-desc { color: var(--grey); font-size: 0.9rem; }
.item-price { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Coffee carts: a quick two-column grid of big buttons. */
.layout-quick_grid .items { grid-template-columns: 1fr 1fr; }
.layout-quick_grid .item { flex-direction: column; align-items: flex-start; min-height: 92px; }
/* High-volume venues: compact rows. */
.layout-fast_list .item { padding: 10px 14px; min-height: 48px; }
.layout-fast_list .item-desc { display: none; }

.btn {
  border: 0; border-radius: 999px; padding: 12px 20px; font-weight: 600; cursor: pointer; min-height: 48px;
}
.btn-primary { background: var(--green-dark); color: #fff; }
.btn-primary:hover { background: var(--green); color: #0B2E10; }
.btn-primary:disabled { opacity: 0.6; cursor: progress; }
.btn-ghost { background: transparent; color: var(--green-dark); }
.btn-wide { width: 100%; }
.link-btn { background: none; border: 0; color: var(--danger); text-decoration: underline; cursor: pointer; padding: 0 0 0 6px; font-size: 0.85rem; }

.cart-bar {
  position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--cream) 70%, rgba(251, 245, 234, 0));
}
.cart-bar .btn { max-width: 688px; margin: 0 auto; display: block; font-size: 1.05rem; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18); }

dialog.sheet {
  border: 0; padding: 0; width: min(560px, 100vw); max-height: 92vh; border-radius: 20px 20px 0 0;
  margin: auto auto 0; background: #fff; color: var(--ink);
}
dialog.sheet::backdrop { background: rgba(26, 26, 26, 0.55); }
@media (min-width: 600px) { dialog.sheet { border-radius: 20px; margin: auto; } }
.sheet-body { padding: 20px 18px calc(18px + env(safe-area-inset-bottom)); }
.sheet-body h2 { margin: 0 0 4px; font-size: 1.2rem; }
.sheet-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.sheet-actions .btn-primary { flex: 1; }
.sheet-error { color: var(--danger); min-height: 1.2em; margin: 8px 0 0; }

.group { border: 0; padding: 0; margin: 14px 0 0; }
.group legend { font-weight: 700; margin-bottom: 6px; }
.hint { font-weight: 400; color: var(--grey); font-size: 0.85rem; }
.choice {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 10px; margin-bottom: 6px; cursor: pointer;
}
.choice:has(input:checked) { border-color: var(--green); background: var(--soft); }
.choice input { width: 20px; height: 20px; accent-color: var(--green-dark); }
.choice span:nth-of-type(1) { flex: 1; }
.choice-price { color: var(--grey); font-variant-numeric: tabular-nums; }
.choice.sold-out { opacity: 0.5; cursor: not-allowed; }
.qty { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 16px; font-size: 1.2rem; font-weight: 700; }
.qty-btn { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--green-dark); background: #fff; color: var(--green-dark); font-size: 1.3rem; cursor: pointer; }

.cart-lines { list-style: none; margin: 10px 0; padding: 0; }
.cart-lines li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.line-choices { display: block; color: var(--grey); font-size: 0.85rem; }
.line-right { white-space: nowrap; font-variant-numeric: tabular-nums; }
.totals { margin: 8px 0 14px; }
.totals div { display: flex; justify-content: space-between; padding: 2px 0; }
.totals dt, .totals dd { margin: 0; }
.totals dd { font-variant-numeric: tabular-nums; }
.totals .grand { font-weight: 700; font-size: 1.1rem; border-top: 2px solid var(--ink); margin-top: 6px; padding-top: 6px; }
.field { display: block; margin: 12px 0; font-weight: 600; }
.field input {
  display: block; width: 100%; margin-top: 4px; padding: 12px; font-size: 16px; border: 1px solid #C9C9C9; border-radius: 10px;
}
.field input:focus { outline: 3px solid var(--green); border-color: var(--green-dark); }
.field .hint { display: block; margin-top: 4px; }

.card { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); padding: 16px; margin-bottom: 14px; }
.card h2 { margin: 0 0 6px; font-size: 1.1rem; }
#payment-element { margin: 8px 0 12px; }

.status-card {
  background: #fff; border-radius: 20px; padding: 24px 18px; text-align: center; margin-bottom: 12px;
  border: 3px solid var(--line);
}
.status-title { font-size: 1.6rem; font-weight: 800; margin: 0; }
.status-code { font-size: 2rem; font-weight: 800; margin: 10px 0; color: var(--green-dark); }
.status-detail { margin: 6px 0; color: var(--grey); }
.status-wait { font-weight: 600; margin: 6px 0 0; }
.status-new, .status-cooking { border-color: var(--green); }
.status-ready { border-color: var(--green); background: var(--green); color: #0B2E10; animation: pop 0.6s ease-out; }
.status-ready .status-code { color: #0B2E10; font-size: 2.4rem; }
.status-ready .status-detail { color: #0B2E10; }
.status-refused, .status-not_collected { border-color: #F28B82; }
.keep-open { text-align: center; color: var(--grey); font-size: 0.9rem; margin: 0 0 14px; }
@keyframes pop { 0% { transform: scale(0.96); } 60% { transform: scale(1.02); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .status-ready { animation: none; } .item { transition: none; } }

.vendor-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.vendor-card {
  display: flex; justify-content: space-between; align-items: center; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; text-decoration: none; color: inherit; font-weight: 600;
}
.vendor-card:hover { border-color: var(--green); }
.vendor-card-wait { background: var(--green); color: #0B2E10; border-radius: 999px; padding: 4px 10px; font-size: 0.85rem; }
.vendor-card.paused { opacity: 0.6; }
.vendor-card.paused .vendor-card-wait { background: #D6D6DC; }

/* Keep Cancel / Add visible at the bottom of a long options list. */
dialog.sheet .sheet-body { padding-bottom: 0; }
dialog.sheet .sheet-actions {
  position: sticky; bottom: 0; background: #fff; margin: 16px 0 0;
  padding: 12px 0 calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line);
}

/* Contact details: how we'll reach you, and fixing mistakes. */
.tell-me { border: 0; padding: 0; margin: 8px 0 4px; }
.tell-me legend { font-weight: 600; margin-bottom: 4px; }
.tick-row { display: flex; gap: 18px; flex-wrap: wrap; }
.tick { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; min-height: 44px; }
.tick input { width: 22px; height: 22px; accent-color: var(--green-dark); }
.remember { margin-top: 4px; color: var(--grey); }
.forget-row { margin: 8px 0 0; color: var(--grey); }
.typo-hint { color: #7A4B00; }
.link-btn-plain { color: var(--green-dark); font-weight: 600; padding: 0; }
.sound-note { color: var(--grey); margin: 0 0 12px; }
.contact-card h2 { margin-bottom: 8px; }
.contact-ways { list-style: none; margin: 0 0 8px; padding: 0; }
.contact-ways li { padding: 6px 0; word-break: break-all; }
.way-label { display: inline-block; min-width: 3.5em; color: var(--grey); }
.contact-ways li.failed strong { color: var(--danger); text-decoration: line-through; }
.way-problem { display: block; color: var(--danger); font-size: 0.9rem; }
.contact-problem { border-color: #F28B82; background: #FFF7F6; }
.contact-card details summary { cursor: pointer; color: var(--green-dark); font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.notice-ok { background: var(--soft); border-color: var(--green); }
.check-card { border-color: var(--brand, #146B1F); border-width: 2px; }
.check-card form { margin: 12px 0 6px; }

/* The pickup word: the one thing the customer has to remember. */
.pickup { background: #fff; border: 2px dashed var(--green, #22C232); border-radius: 16px; padding: 14px 16px 16px; margin: 14px 0 10px; }
.pickup-label { margin: 0; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 800; color: var(--green-dark, #146B1F); }
.pickup-word { margin: 4px 0 6px; font-size: 3rem; line-height: 1.05; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: #0B2E10; word-break: break-word; }
.pickup-say { margin: 0; font-size: 1.05rem; color: #1A1A1A; }
.status-ready .pickup { border-style: solid; background: #F1FBF2; box-shadow: 0 0 0 4px rgba(34,194,50,.18); }
.status-ready .pickup-word { font-size: 3.4rem; }

/* Progress tracker: Order in → Being made → Ready → Collected. Readable at arm's length. */
.status-title { font-size: 2rem; letter-spacing: -.01em; }
.progress { margin: 16px 2px 8px; }
.progress-track { height: 16px; border-radius: 999px; background: #ECEAE3; overflow: hidden; }
.progress-fill { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--green, #22C232); transition: width .8s ease; }
.progress[data-step="1"] .progress-fill { width: 18%; }
.progress[data-step="2"] .progress-fill { width: 58%; background-image: repeating-linear-gradient(-45deg, rgba(255,255,255,.28) 0 10px, transparent 10px 20px); background-size: 28px 28px; animation: cooking 1s linear infinite; }
.progress[data-step="3"] .progress-fill, .progress[data-step="4"] .progress-fill { width: 100%; }
.status-ready .progress-track { background: rgba(255,255,255,.55); }
.status-ready .progress-fill { background: #0B2E10; }
.progress-steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); margin: 10px 0 0; padding: 0; }
.progress-steps li { display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: .82rem; font-weight: 600; color: #9A988F; }
.progress-steps i { width: 14px; height: 14px; border-radius: 50%; background: #ECEAE3; border: 2px solid #ECEAE3; }
.progress[data-step="1"] li[data-n="1"], .progress[data-step="2"] li[data-n="1"], .progress[data-step="2"] li[data-n="2"],
.progress[data-step="3"] li:not([data-n="4"]), .progress[data-step="4"] li { color: #1A1A1A; }
.progress[data-step="1"] li[data-n="1"] i, .progress[data-step="2"] li[data-n="1"] i, .progress[data-step="2"] li[data-n="2"] i,
.progress[data-step="3"] li:not([data-n="4"]) i, .progress[data-step="4"] li i { background: var(--green, #22C232); border-color: var(--green, #22C232); }
/* The step happening now gets a ring and bold label. */
.progress[data-step="1"] li[data-n="1"], .progress[data-step="2"] li[data-n="2"], .progress[data-step="3"] li[data-n="3"] { font-weight: 800; }
.progress[data-step="1"] li[data-n="1"] i, .progress[data-step="2"] li[data-n="2"] i, .progress[data-step="3"] li[data-n="3"] i { box-shadow: 0 0 0 5px rgba(34,194,50,.25); animation: beat 1.4s ease-in-out infinite; }
.status-ready .progress-steps li { color: #0B2E10; }
.status-ready .progress-steps i { background: #0B2E10 !important; border-color: #0B2E10 !important; }
.status-ready .progress-steps li[data-n="4"] i { background: rgba(255,255,255,.55) !important; border-color: transparent !important; }
.status-wait { font-size: 1.15rem; }
@keyframes cooking { to { background-position: 28px 0; } }
@keyframes beat { 50% { box-shadow: 0 0 0 9px rgba(34,194,50,.12); } }
@media (prefers-reduced-motion: reduce) { .progress-fill, .progress-steps i { animation: none !important; transition: none; } }

/* Order line on the status card, and "Your orders" remembered on this phone. */
.status-items { margin: 14px 0 0; font-size: .95rem; color: #3A3A36; }
.status-items a { font-weight: 700; color: var(--green-dark, #146B1F); white-space: nowrap; }
.status-ready .status-items, .status-ready .status-items a { color: #0B2E10; }
.my-orders .sub { color: var(--grey); margin: 0 0 10px; font-size: .9rem; }
.my-orders-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.my-order { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: inherit; }
.my-order:hover { border-color: var(--green); }
.my-order-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.my-order-word { font-weight: 900; letter-spacing: .06em; color: #0B2E10; background: #EAF8EB; border-radius: 8px; padding: 2px 8px; font-size: .85rem; }
.my-order-items { color: #3A3A36; font-size: .92rem; }
.my-order-meta { color: var(--grey); font-size: .85rem; }
.my-order-status { font-weight: 700; color: #1A1A1A; }
.my-order-status.st-ready { color: #138A24; }
.my-orders-more, .my-orders-forget { margin: 10px 0 0; }
.linkish { background: none; border: 0; padding: 0; color: var(--green-dark, #146B1F); font-weight: 700; font-size: .92rem; cursor: pointer; text-decoration: underline; }
.my-orders-forget .linkish { color: var(--grey); font-weight: 500; font-size: .85rem; }

/* Event page and "Also at this event". */
.event-lede { color: var(--grey); margin: -4px 0 12px; }
.vendor-card-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.vendor-card-blurb { font-weight: 400; color: var(--grey); font-size: .92rem; }
.vendor-card-wait { white-space: nowrap; margin-left: 10px; }
.also-here { margin-top: 26px; padding-top: 6px; border-top: 1px solid var(--line); }
.also-all { text-align: center; margin: 14px 0 0; font-weight: 700; }
.also-all a { color: var(--green-dark, #146B1F); }
.notice-test { background: #FFF4CC; border-color: #F5C451; }

/* Carts kept from earlier, and unfinished orders at other stalls. */
.cart-kept { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.other-carts { display: grid; gap: 8px; margin: 0 0 14px; }
.other-cart { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: #FFF4CC; border: 1px solid #F5C451; border-radius: var(--radius); padding: 10px 14px; }
.other-cart span { flex: 1 1 220px; }
.other-cart .btn { padding: 8px 14px; }
.status-again { margin: 14px 0 0; }
.cart-kept[hidden], .other-carts[hidden] { display: none; }

/* Where to collect, and the far-away check before paying. */
.collect-at p { margin: 4px 0; }
.far-away p { margin: 0 0 10px; }
.far-away .btn { margin: 4px 6px 0 0; }
.far-away[hidden] { display: none; }
#pay-button.held { opacity: .45; }
.item-left { display: inline-block; margin-top: 4px; font-size: .82rem; font-weight: 800; color: #92400E; background: #FFF4CC; border-radius: 999px; padding: 2px 9px; align-self: flex-start; }

/* ---- Cart quantities, "add another, different way", the service fee explainer (pull request: cart quantities and fee) ---- */
.line-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.line-qty { display: inline-flex; align-items: center; gap: 8px; }
.qty-mini { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 1.15rem; font-weight: 800; cursor: pointer; line-height: 1; }
.qty-mini:disabled { opacity: .35; cursor: default; }
.qty-num { min-width: 1.2em; text-align: center; font-weight: 800; }
.line-price { font-weight: 600; }
.line-another { display: block; margin-top: 6px; font-size: .85rem; }
.item-in-cart { display: inline-block; margin-top: 4px; font-size: .82rem; font-weight: 800; color: var(--green-dark); background: var(--soft); border-radius: 999px; padding: 2px 9px; align-self: flex-start; }
.item-in-cart[hidden] { display: none; }
.toast { position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 20px); background: #1A1A1A; color: #fff; padding: 12px 16px; border-radius: 12px; font-size: .95rem; max-width: 92vw; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 100; text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.fee-what { display: inline; font-weight: 400; }
.fee-what summary { display: inline; cursor: pointer; color: var(--green-dark); text-decoration: underline; font-size: .82rem; margin-left: 6px; list-style: none; }
.fee-what summary::-webkit-details-marker { display: none; }
.fee-what p { margin: 6px 0 4px; font-size: .88rem; color: var(--grey); font-weight: 400; }

/* Temporary price drops */
.menu-specials { background: #eaf6ec; border-radius: 14px; padding: 4px 12px 8px; }
.menu-specials h2 { color: #146B1F; }
.item-price .item-was { color: #8a857c; font-weight: 400; margin-right: 4px; }
.item-price .item-special { color: #146B1F; font-weight: 800; }
.item-price .item-today { display: block; font-size: .75rem; font-weight: 700; color: #146B1F; text-align: right; }

/* Orders still under way, at the top of a menu (history is at the bottom) */
.active-orders { display: grid; gap: 8px; margin: 0 0 12px; }
.active-order { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 14px; border-radius: 12px; background: #fff; border: 2px solid #e6decf; color: inherit; text-decoration: none; }
.active-order.st-ready { background: #146B1F; border-color: #146B1F; color: #fff; }
.active-order span { font-size: .95rem; }
/* Link to the rest of the event, and the order history, at the bottom of a menu */
.other-stalls { display: grid; gap: 4px; margin-top: 16px; text-decoration: none; color: inherit; }
.other-stalls strong { color: #146B1F; }
details.my-orders { margin-top: 16px; }
details.my-orders > summary { cursor: pointer; list-style: none; }
details.my-orders > summary::-webkit-details-marker { display: none; }
details.my-orders > summary h2 { display: inline; font-size: 1.05rem; }
details.my-orders > summary h2::after { content: " ▾"; color: #146B1F; }
details.my-orders[open] > summary h2::after { content: " ▴"; }

/* Find food (the customer home page) */
.find-search { display: flex; gap: 8px; margin: 0 0 12px; }
.find-search input { flex: 1; min-width: 0; padding: 12px 14px; border-radius: 12px; border: 2px solid #e6decf; font: inherit; font-size: 1rem; background: #fff; }
.find-for { margin: 0 0 8px; color: #4a4a52; }
.find-more { margin: 20px 0 0; text-align: center; color: #4a4a52; }
.find-more a { color: #146B1F; font-weight: 700; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.vendor-card-where { display: block; font-size: .85rem; color: #146B1F; margin-top: 2px; }
.vendor-card-where::before { content: "\1F4CD  "; }
.near-me { margin: 0 0 10px; }
.vendor-card-when { display: block; font-size: .85rem; font-weight: 600; color: #4A4A52; margin-top: 2px; }
.vendor-card.paused .vendor-card-wait { background: #E6DECF; color: #4A4A52; }

/* Problem with my order */
.problem-link { margin: 12px 0; }
.problem-order { margin: 8px 0 12px; padding-left: 20px; }
.problem-form { display: grid; gap: 16px; }
.problem-form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.problem-form legend { font-weight: 700; margin-bottom: 6px; }
.problem-form textarea, .problem-form input[type=email] { font: inherit; padding: 12px; border: 1px solid #c9c4bb; border-radius: 12px; width: 100%; box-sizing: border-box; }
.field-error { color: #B3261E; font-weight: 600; font-size: .92rem; }
