/* =====================================================================
   ORDERING · the parts Cornice did not have yet
   add buttons and steppers on the menu cards, the order drawer, the
   order page (pickup time, contact details, deposit) and the confirmation.
   Same tokens as base.css: spacing steps, Tailwind type, one easing curve.
   ===================================================================== */
[hidden] { display: none !important; }
.ordering-off [data-online] { display: none !important; }
html:not(.ordering-off) [data-offline] { display: none !important; }

/* ---------- menu cards ---------- */
.card-open .card-img { position: relative; }
.chip { position: absolute; left: var(--s100); top: var(--s100); padding: var(--s25) var(--s100); border-radius: 9999px; font-size: 12px; line-height: 16px; font-weight: 600; }
.chip.out { background: var(--text); color: var(--bg); }
.chip.soon { background: var(--surface); color: var(--text); }
.dish-top .chip { position: static; display: inline-block; margin-left: var(--s75); vertical-align: middle; }
.item.off .card-img img { opacity: 0.55; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s200); width: 100%; margin-top: var(--s75); padding-top: var(--s100); box-shadow: inset 0 1px 0 var(--line); }
.price { font-size: 16px; line-height: 24px; }
.price.soft { font-size: 14px; line-height: 20px; font-weight: 400; }
.add { display: inline-flex; align-items: center; gap: var(--s50); padding: var(--s75) var(--s100); border: 0; border-radius: 9999px; background: var(--accent); color: var(--cream-hi); cursor: pointer; font: inherit; font-size: 14px; line-height: 20px; font-weight: 600; transition: transform 500ms var(--ease), background-color 300ms var(--ease); }
.add:hover { transform: translateY(-2px); }
.add:active { transform: translateY(1px) scale(0.98); }
.add .ph { font-size: 16px; }
.qty { display: inline-flex; align-items: center; gap: var(--s50); padding: var(--s25); border-radius: 9999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.qty button { width: 32px; height: 32px; border: 0; border-radius: 9999px; background: var(--bg); color: var(--text); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; transition: transform 300ms var(--ease), background-color 300ms var(--ease); }
.qty button:hover { background: var(--sand); }
.qty button:active { transform: scale(0.94); }
.qty output { min-width: 32px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.add-off { padding: var(--s75) 0; }

/* ---------- drawer ---------- */
.listchip span { display: inline; }
.drawer li { grid-template-columns: 56px 1fr auto; }
.drawer li img { width: 56px; height: 56px; object-fit: cover; border-radius: 12px; }
.drawer li.empty-list { display: block; box-shadow: none; }
.warn { display: block; color: var(--accent); }
.dfoot { display: flex; flex-direction: column; gap: var(--s200); }
.dfoot .btn { align-self: stretch; }
.linkbtn { border: 0; background: none; padding: 0; cursor: pointer; font: inherit; font-size: 14px; line-height: 20px; align-self: flex-start; }

/* ---------- two ways to order (home, how to order) ---------- */
.ways { display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--s300); }
.way { padding: var(--s500); border-radius: 24px; background: var(--surface); display: flex; flex-direction: column; gap: var(--s200); align-items: flex-start; }
.way .ph-big { font-size: 32px; color: var(--accent); }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s200); counter-reset: s; }
.steps li { display: grid; grid-template-columns: 32px 1fr; gap: var(--s100); counter-increment: s; }
.steps li::before { content: counter(s); width: 32px; height: 32px; border-radius: 9999px; background: var(--sand); color: var(--text); display: inline-flex; align-items: center; justify-content: center; font-size: 14px; line-height: 20px; font-weight: 600; }
.timing { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s300); }
.timing div { padding: var(--s400); border-radius: 24px; background: var(--surface); display: flex; flex-direction: column; gap: var(--s75); }
.timing b.big { font-size: 30px; line-height: 36px; font-weight: 600; }

/* ---------- order page ---------- */
.orderhead { padding: 144px 0 var(--s500); }
.order-grid { display: grid; grid-template-columns: 1fr 400px; gap: var(--s600); align-items: start; }
.order-sum { position: sticky; top: 112px; padding: var(--s400); border-radius: 24px; background: var(--surface); display: flex; flex-direction: column; gap: var(--s200); }
.order-sum ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s100); }
.order-sum li { display: grid; grid-template-columns: 48px 1fr auto; gap: var(--s100); align-items: center; padding-bottom: var(--s100); box-shadow: inset 0 -1px 0 var(--line); }
.order-sum li img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; }
.order-sum li small { display: block; color: var(--soft); }
.order-sum .qty button { width: 28px; height: 28px; }
.order-sum .qty output { min-width: 24px; }
.form { display: flex; flex-direction: column; gap: var(--s500); }
.fset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s200); }
.fset legend { padding: 0; margin-bottom: var(--s200); }
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s200); }
.field { display: flex; flex-direction: column; gap: var(--s50); }
.field label { font-size: 14px; line-height: 20px; font-weight: 500; }
.field input, .field select, .field textarea { width: 100%; padding: var(--s100) var(--s200); border: 0; border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; font-size: 16px; line-height: 24px; box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow 300ms var(--ease); }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 256 256'%3E%3Cpath fill='%236b6158' d='M213.66 101.66l-80 80a8 8 0 0 1-11.32 0l-80-80a8 8 0 0 1 11.32-11.32L128 164.69l74.34-74.35a8 8 0 0 1 11.32 11.32Z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: var(--s500); }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--accent); }
.field .hint { font-size: 12px; line-height: 16px; color: var(--soft); }
.field .ferr { display: none; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--accent); }
.field.err input, .field.err select, .field.err textarea { box-shadow: inset 0 0 0 2px var(--accent); }
.field.err .ferr { display: block; }
.check { display: grid; grid-template-columns: 24px 1fr; gap: var(--s100); align-items: start; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); }
.lead-note { padding: var(--s200) var(--s300); border-radius: 16px; background: var(--sand); }
.alert { padding: var(--s200) var(--s300); border-radius: 16px; background: #fbe4e2; color: #6d1d24; font-size: 14px; line-height: 20px; font-weight: 500; }
.alert:focus { outline: none; }
.paybox { padding: var(--s400); border-radius: 24px; background: var(--surface); display: flex; flex-direction: column; gap: var(--s200); }
.paybox .btn { align-self: flex-start; }
.btn.busy { opacity: 0.7; pointer-events: none; }
.btn.busy .ph { animation: spin 1000ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.secure { display: inline-flex; align-items: center; gap: var(--s75); }
.secure .ph { font-size: 20px; color: var(--sage-d); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- confirmation ---------- */
.conf { max-width: 720px; display: flex; flex-direction: column; gap: var(--s200); }
.refno { font-size: 48px; line-height: 48px; font-weight: 600; letter-spacing: 0.04em; color: var(--accent); font-variant-numeric: tabular-nums; }
.conf-lines { list-style: none; margin: var(--s100) 0; padding: var(--s300); border-radius: 16px; background: var(--surface); display: flex; flex-direction: column; gap: var(--s75); }
.conf-dep { padding: var(--s200) var(--s300); border-radius: 16px; background: var(--sand); }
.conf-dep.paid { background: #e3eddf; }
.conf-dep.declined { background: #fbe4e2; }
.skel { height: 24px; border-radius: 8px; background: var(--sand); animation: pulse 1400ms var(--ease) infinite alternate; }
.skel.lg { height: 48px; width: 60%; }
@keyframes pulse { from { opacity: 0.5; } to { opacity: 1; } }

@media (max-width: 1000px) {
  .order-grid { grid-template-columns: 1fr; }
  .order-sum { position: static; order: -1; }
  .ways, .timing { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .frow { grid-template-columns: 1fr; }
  .way, .paybox, .order-sum { padding: var(--s300); }
  .refno { font-size: 36px; line-height: 40px; }
  .orderhead { padding-top: 120px; }
  .card-foot { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { .skel, .btn.busy .ph { animation: none; } }

/* card form: each box is a Clover iframe, styled from outside */
.cardbox { display: flex; flex-direction: column; gap: var(--s200); width: 100%; }
.flabel { font-size: 14px; line-height: 20px; font-weight: 500; }
.cfield { height: 48px; border-radius: 12px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); padding: 0 var(--s200); transition: box-shadow 300ms var(--ease); overflow: hidden; }
.cfield iframe { display: block; width: 100%; height: 100%; border: 0; background: transparent; }
.cfield.focus { box-shadow: inset 0 0 0 2px var(--accent); }
.field.err .cfield { box-shadow: inset 0 0 0 2px var(--accent); }
.frow3 { display: grid; grid-template-columns: 2fr 1fr 1.4fr; gap: var(--s200); }
.cardbox.loading .cfield { background: var(--sand, #e9dcc6); }
.alert.test { display: flex; gap: var(--s100); align-items: flex-start; background: #e3e4f6; color: #343a86; margin-bottom: var(--s200); }
.alert.test .ph-fill { font-size: 20px; flex: none; }
@media (max-width: 640px) { .frow3 { grid-template-columns: 1fr 1fr; } .frow3 .field:last-child { grid-column: 1 / -1; } }

/* breathing room between the menu photo header and the note below it */
.menu-sec { padding-top: var(--s600); }
@media (max-width: 640px) { .menu-sec { padding-top: var(--s400); } }

/* links: no underlines. Colour and weight mark them; hover fades */
.textlink, .card-open .see, .foot a, .legal a { text-decoration: none; }
.textlink, .card-open .see { transition: opacity 300ms var(--ease); }
.textlink:hover, .card-open:hover .see { opacity: 0.7; }
.textlink:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* payment box, checkout style */
.pay-head { display: flex; flex-direction: column; gap: var(--s50); }
.paycard { width: 100%; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line); background: var(--bg); overflow: hidden; }
.pc-head { display: flex; align-items: center; gap: var(--s100); padding: var(--s200); background: var(--surface); box-shadow: inset 0 0 0 2px var(--text); border-radius: 16px 16px 0 0; }
.pc-radio { width: 20px; height: 20px; flex: none; border-radius: 9999px; }
.pc-radio { background: var(--surface); box-shadow: inset 0 0 0 6px var(--text); }
.brands { margin-left: auto; display: flex; gap: var(--s50); }
.brands svg { width: 38px; height: 24px; display: block; }
.pc-body { padding: var(--s200); display: flex; flex-direction: column; gap: var(--s200); }
.pc-body .cardbox { gap: var(--s100); }
.pc-body .frow { gap: var(--s100); }
.pc-body .field { position: relative; }
.pc-body .cfield { background: var(--surface); height: 52px; }
.pc-body .field:has(.cf-icon) .cfield { padding-right: var(--s500); }
.cf-icon { position: absolute; right: var(--s200); top: 14px; font-size: 20px; line-height: 24px; color: var(--soft); pointer-events: none; }
.cf-icon[title] { pointer-events: auto; cursor: help; }
.pc-by { display: inline-flex; align-items: center; gap: var(--s50); margin: 0; }
.pc-by b { color: var(--text); font-weight: 600; }
.dep-note { margin: 0; }
.paybox .pay-btn { align-self: stretch; }
.terms { margin: 0; }
.terms .textlink { font-weight: 600; }
.sum-row { display: flex; justify-content: space-between; gap: var(--s200); }
.sum-row.due { color: var(--text); font-weight: 600; margin-bottom: var(--s50); }
@media (max-width: 640px) { .pc-body .frow { grid-template-columns: 1fr 1fr; } }
.pc-head b { white-space: nowrap; }
@media (max-width: 640px) {
  .paybox { padding: var(--s300) var(--s200); }
  .pc-head, .pc-body { padding: var(--s100); }
  .pc-body .frow { grid-template-columns: 1fr; }
  .brands svg { width: 32px; height: 20px; }
}
