/* Order page: the steps on the left and a sticky basket ticket on the right.
   On phones the basket sits after the menu, with a bar at the bottom to jump to it. */

.order-hero { padding-block: clamp(32px, 5vw, 56px); }
.order-section { padding-block: clamp(28px, 5vw, 56px) clamp(56px, 8vw, 96px); }
.order-loading { color: var(--muted); }
.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.order-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 23rem); gap: 0 clamp(28px, 4vw, 56px); align-items: start; }
.order-grid > .step { grid-column: 1; min-width: 0; }
.order-grid > .basket { grid-column: 2; grid-row: 1 / span 4; position: sticky; top: 92px; }
@media (max-width: 900px) {
  .order-grid { grid-template-columns: minmax(0, 1fr); }
  .order-grid > .basket { grid-column: 1; grid-row: auto; position: static; }
}

/* Steps */
.step { padding-bottom: clamp(32px, 5vw, 48px); }
.step-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.step-num {
  flex: none; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--lemon); color: var(--ink); border: 2px solid var(--ink);
  font-family: var(--display); font-weight: 700; font-size: 1.05rem; line-height: 1;
}
.step h2 { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem); }
.step-note { color: var(--muted); margin: -6px 0 18px; }
.step.is-waiting > :not(.step-head) { opacity: .55; }
.notice { border: 2px solid var(--edge); border-radius: var(--r); padding: 18px 20px; background: var(--surface); display: grid; gap: 10px; }
.notice h3 { font-size: 1.3rem; }

/* Pitch choices */
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 14px; }
.choice {
  position: relative; display: grid; gap: 4px; align-content: start; padding: 16px 18px;
  border: 2px solid var(--line-strong); border-radius: var(--r); background: var(--paper); cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.choice:hover { border-color: var(--edge); }
.choice:has(input:checked) { border-color: var(--edge); background: var(--today-bg); box-shadow: 4px 4px 0 var(--edge); }
.choice:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 3px; }
.choice.is-off { cursor: default; background: var(--surface); }
.choice.is-off:hover { border-color: var(--line-strong); }
.choice-name { font-family: var(--display); font-weight: 600; font-size: 1.3rem; line-height: 1.15; }
.choice-meta { color: var(--muted); font-size: .95rem; }
.choice-status { font-size: .9rem; font-weight: 600; margin-top: 6px; }
.choice-status.ok { color: var(--basil); }

/* Fee, shown before the first pizza goes in */
.fee-note { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; border: 2px dashed var(--edge); border-radius: var(--r); padding: 10px 14px; margin-bottom: 6px; }
.fee-note strong { font-family: var(--display); font-weight: 600; }
.fee-note span { color: var(--muted); font-size: .95rem; }

/* Menu */
.items { list-style: none; margin: 0; padding: 0; }
.item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 20px; padding-block: 18px; border-bottom: 1px dashed var(--line-strong); }
.item-main { min-width: 0; display: grid; gap: 4px; align-content: start; }
.item-name { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.item-name h3, .item-name h4 { font-size: 1.35rem; }
/* Sides sit under their own heading, after the pizzas; their names are h4s under it */
.item-name h4 { font-family: var(--display); font-weight: 700; line-height: 1.08; margin: 0; letter-spacing: -.01em; }
.menu-group { margin: 30px 0 2px; font-size: 1.7rem; }
.chip-special { background: var(--lemon); color: var(--ink); font-size: .75rem; font-weight: 700; border-radius: 999px; padding: .2em .7em; }
.item .desc { color: var(--muted); font-size: .975rem; line-height: 1.5; }
.allergens { font-size: .875rem; color: var(--muted); }
.allergens strong { color: var(--fg); font-weight: 600; }
.item-buy { display: grid; gap: 8px; align-content: start; justify-items: end; }
.size-btn {
  font: inherit; font-weight: 600; min-height: 44px; min-width: 9rem;
  display: inline-flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: .45em .9em; border: 2px solid var(--edge); border-radius: 8px;
  background: var(--paper); color: var(--fg); cursor: pointer; box-shadow: 2px 2px 0 var(--edge);
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.size-btn:hover:not(:disabled) { background: var(--today-bg); transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--edge); }
.size-btn:active:not(:disabled) { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--edge); }
.size-btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.size-btn .sz { font-family: var(--display); }
.size-btn .pr { font-variant-numeric: tabular-nums; font-weight: 500; }
.stepper {
  display: inline-grid; grid-template-columns: 44px minmax(4.4rem, auto) 44px; align-items: center; min-width: 9rem;
  border: 2px solid var(--edge); border-radius: 8px; background: var(--today-bg);
}
.stepper button { font: inherit; font-size: 1.3rem; font-weight: 700; line-height: 1; width: 44px; height: 44px; border: 0; background: transparent; color: var(--fg); cursor: pointer; border-radius: 6px; }
.stepper button:hover:not(:disabled) { background: color-mix(in srgb, var(--fg) 10%, transparent); }
.stepper button:disabled { opacity: .35; cursor: not-allowed; }
.stepper output { text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.item.is-unavailable .item-main { opacity: .6; }
.unavailable { font-size: .9rem; font-weight: 600; color: var(--muted); text-align: right; max-width: 12rem; }
@media (max-width: 560px) {
  .item { grid-template-columns: minmax(0, 1fr); }
  .item-buy { justify-items: stretch; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .size-btn, .stepper { min-width: 0; width: 100%; }
  .unavailable { text-align: left; max-width: none; grid-column: 1 / -1; }
}

/* Collection times */
.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.4rem, 1fr)); gap: 10px; }
.time { position: relative; display: block; }
.time input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.time span {
  display: grid; place-items: center; min-height: 48px; border: 2px solid var(--line-strong); border-radius: 8px;
  font-weight: 600; font-variant-numeric: tabular-nums; background: var(--paper); pointer-events: none;
}
.time:hover span { border-color: var(--edge); }
.time input:checked + span { background: var(--fg); color: var(--paper); border-color: var(--fg); }
.time input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 3px; }

/* Details and pay */
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; }
.check input { flex: none; width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--fg); }
.field .hint { color: var(--muted); font-size: .85rem; }
.field input[aria-invalid="true"] { border-color: var(--ember); }
.allergy-note { font-size: .95rem; border-left: 4px solid var(--lemon); padding: 4px 0 4px 14px; margin-top: 22px; }
.pay { margin-top: 22px; display: grid; gap: 12px; }
.pay-total { display: flex; justify-content: space-between; gap: 12px; font-family: var(--display); font-size: 1.45rem; font-weight: 600; border-top: 2px solid var(--edge); padding-top: 14px; font-variant-numeric: tabular-nums; }
.pay .btn { width: 100%; font-size: 1.15rem; padding-block: .85em; }
.pay .btn:disabled { opacity: .6; cursor: progress; transform: none; }
.pay-note { color: var(--muted); font-size: .9rem; }
.form-alert { border: 2px solid var(--ember); border-radius: 8px; padding: 12px 14px; }
.form-alert p { font-weight: 600; }
.form-alert ul { margin: 6px 0 0; padding-left: 1.2em; }
.form-alert a { color: inherit; }
.form-info { border: 2px solid var(--edge); border-radius: 8px; padding: 12px 14px; background: var(--today-bg); }

/* Basket ticket */
.basket { border: 2px solid var(--edge); border-radius: var(--r); background: var(--ticket-bg); box-shadow: 6px 6px 0 var(--edge); padding: 20px 20px 22px; margin-bottom: 40px; }
.basket h2 { font-size: 1.6rem; }
.basket-where { color: var(--muted); font-size: .95rem; margin: 4px 0 14px; }
.basket-empty { color: var(--muted); border-top: 1px dashed var(--line-strong); padding-top: 12px; }
.basket-lines { list-style: none; margin: 0; padding: 0; border-top: 1px dashed var(--line-strong); }
.basket-lines li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 12px; padding-block: 10px; border-bottom: 1px dashed var(--line-strong); }
.bl-name { font-weight: 600; line-height: 1.3; }
.bl-name small { display: block; font-weight: 400; color: var(--muted); font-size: .875rem; }
.bl-price { font-variant-numeric: tabular-nums; text-align: right; font-weight: 500; }
.basket .bl-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.basket .stepper { min-width: 0; grid-template-columns: 40px minmax(2.6rem, auto) 40px; }
.bl-name .bl-changes { color: var(--fg); font-weight: 500; }
.basket .stepper button { width: 40px; height: 40px; font-size: 1.15rem; }
.totals { display: grid; gap: 6px; margin-top: 14px; font-variant-numeric: tabular-nums; }
.totals div { display: flex; justify-content: space-between; gap: 12px; }
.totals .grand { font-family: var(--display); font-weight: 700; font-size: 1.35rem; border-top: 2px solid var(--edge); padding-top: 10px; margin-top: 4px; }
.basket-limit { font-size: .9rem; color: var(--ember); margin-top: 10px; }
.basket-slot { margin-top: 12px; font-weight: 600; }

/* Phone bar that jumps to the basket */
.basket-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: var(--ink); color: var(--lemon); border-top: 2px solid var(--lemon); padding-bottom: env(safe-area-inset-bottom, 0px); }
.basket-bar-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.basket-bar-text { font-family: var(--display); font-weight: 600; font-variant-numeric: tabular-nums; }
.basket-bar .btn { box-shadow: none; border-color: var(--lemon); }
body.has-bar { padding-bottom: 72px; }
@media (min-width: 901px) { .basket-bar { display: none !important; } body.has-bar { padding-bottom: 0; } }
@media (prefers-reduced-motion: reduce) { .size-btn, .choice { transition: none; } }

/* Fieldsets used only to group radios */
.plain { border: 0; margin: 0; padding: 0; min-width: 0; }
.step-body > .notice { margin-block: 12px 4px; }

/* Order confirmed page */
.confirm { display: grid; grid-template-columns: minmax(0, 26rem) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.confirm > * { min-width: 0; }
.confirm-ticket { margin-bottom: 0; }
.confirm-next { display: grid; gap: 14px; align-content: start; }
@media (max-width: 760px) { .confirm { grid-template-columns: minmax(0, 1fr); } }

/* Change toppings box */
.change-btn { font: inherit; font-size: .9rem; font-weight: 600; background: none; border: 0; padding: 4px 2px; min-height: 44px; color: var(--fg); text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
.change-btn:disabled { opacity: .45; cursor: not-allowed; }
.item-buy .change-btn { grid-column: 1 / -1; justify-self: end; }
.changes { width: min(100% - 24px, 32rem); max-height: min(100dvh - 32px, 50rem); overflow: auto; border: 2px solid var(--edge); border-radius: var(--r); padding: 0; background: var(--paper); color: var(--fg); box-shadow: 6px 6px 0 var(--edge); }
.changes::backdrop { background: rgb(0 0 0 / .5); }
.changes form { display: grid; gap: 14px; padding: 18px 20px 0; }
.chg-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.chg-head h2 { font-size: 1.5rem; }
.chg-close { flex: none; font: inherit; font-size: 1.6rem; line-height: 1; width: 44px; height: 44px; border: 2px solid var(--line-strong); border-radius: 8px; background: transparent; color: var(--fg); cursor: pointer; }
.chg-legend { font-family: var(--display); font-weight: 600; font-size: 1.1rem; padding: 0; margin-bottom: 8px; }
.chg-size { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; margin: 0 8px 8px 0; border: 2px solid var(--line-strong); border-radius: 8px; font-weight: 600; cursor: pointer; }
.chg-size:has(input:checked) { border-color: var(--edge); background: var(--today-bg); }
.chg-size input { accent-color: var(--fg); }
.chg-opt { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 2px 10px; min-height: 44px; border-bottom: 1px dashed var(--line-strong); cursor: pointer; }
.chg-opt input { width: 20px; height: 20px; margin: 0; accent-color: var(--fg); }
.chg-opt.is-off { color: var(--muted); cursor: default; }
.chg-price { font-variant-numeric: tabular-nums; font-weight: 600; }
.chg-note { grid-column: 2 / -1; font-size: .85rem; color: var(--ember); padding-bottom: 6px; }
.chg-warn { font-size: .9rem; border-left: 4px solid var(--lemon); padding: 4px 0 4px 12px; }
.chg-foot { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 0 18px; background: var(--paper); border-top: 1px solid var(--line); }
.chg-foot .btn { flex: 1 1 12rem; }
.chg-foot .stepper { min-width: 0; grid-template-columns: 44px 2.4rem 44px; }

/* Check your order: the last look before Stripe, with Add a side */
.chk-when { margin: 0; }
.check .basket-lines { margin-top: 2px; }
.check .totals { margin-top: 0; }
.chk-sides { display: grid; margin-top: 10px; padding-top: 16px; border-top: 2px solid var(--line); }
.chk-sides h3 { font-size: 1.3rem; margin-bottom: 6px; }
.chk-sides h3:focus { outline: none; }
.chk-side { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; padding-block: 10px; border-bottom: 1px dashed var(--line-strong); }
.chk-side-main { min-width: 0; display: grid; gap: 2px; }
.chk-side-name { font-weight: 600; }
.chk-side-buy { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.chk-side .chg-note { grid-column: 1 / -1; padding-bottom: 0; }
.check .stepper { min-width: 0; grid-template-columns: 40px minmax(2.6rem, auto) 40px; }
.check .stepper button { width: 40px; height: 40px; font-size: 1.15rem; }
@media (max-width: 420px) { .chk-side { grid-template-columns: minmax(0, 1fr); } .chk-side-buy { justify-content: flex-start; } }

/* Account page: sign in with an emailed code, past orders, saved details */
.account { display: grid; gap: 34px; }
.account > * { max-width: 46rem; }
.account-card { display: grid; gap: 16px; max-width: 34rem; border: 2px solid var(--edge); border-radius: var(--r); background: var(--surface); padding: 20px; }
.account-card .muted, .account-block > .muted { margin: 0; }
.account-links { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; margin: 0; }
.link-btn { font: inherit; font-weight: 600; background: none; border: 0; padding: 8px 0; min-height: 44px; color: var(--fg); text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
.link-btn:disabled { opacity: .5; cursor: not-allowed; }
.link-btn.danger { color: var(--ember); }
.account-ok { border-left: 4px solid var(--lemon); padding: 4px 0 4px 12px; font-weight: 600; }
.account-stats { display: flex; flex-wrap: wrap; gap: 12px; }
.account-stats p { margin: 0; border: 2px solid var(--edge); border-radius: var(--r); padding: 10px 18px; background: var(--ticket-bg); box-shadow: 4px 4px 0 var(--edge); }
.account-stats strong { font-family: var(--display); font-size: 1.8rem; margin-right: 2px; font-variant-numeric: tabular-nums; }
.account-block { display: grid; gap: 14px; }
.account-block h2 { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem); }
.account-orders { display: grid; gap: 24px; }
.account-order { margin-bottom: 0; }
.account-order-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.account-order-head h3 { font-size: 1.3rem; }
.chip-status { font-size: .8rem; font-weight: 700; border-radius: 999px; padding: .25em .8em; border: 1.5px solid var(--line-strong); }
.chip-status.st-collected { background: var(--lemon); color: var(--ink); border-color: var(--edge); }
.chip-status.st-refunded { color: var(--ember); border-color: var(--ember); }
.account-again { margin: 14px 0 0; }
.account-delete { display: grid; gap: 4px; }
.account-delete p { margin: 0; }
.account-note { margin: 0 0 18px; color: var(--muted); }
.account-note a { color: var(--fg); font-weight: 600; }

/* A round photo beside each pizza and side (an empty plate until its photo is added) */
.item { grid-template-columns: var(--photo) minmax(0, 1fr) auto; --photo: 5.5rem; }
.item-photo { width: var(--photo); height: var(--photo); border-radius: 50%; object-fit: cover; border: 2px solid var(--edge); background: var(--surface); }
.item-photo.is-empty { border-style: dashed; border-color: var(--line-strong); background: var(--surface) url("img/logo.png") center / 42% no-repeat; opacity: .55; }
.item.is-unavailable .item-photo { opacity: .5; filter: grayscale(1); }
@media (max-width: 560px) {
  .item { grid-template-columns: var(--photo) minmax(0, 1fr); --photo: 4.25rem; column-gap: 14px; }
  .item-buy { grid-column: 1 / -1; }
}
