/* Same palette and type as the store (styles.css), so checkout reads as
   part of the shop rather than a separate payment page. */
:root {
  --text: #141414;
  --soft: #3c3c38;
  --muted: #6d6d68;
  --line: #e3e3df;
  --danger: #8d2f2f;
  --summary: #f7f7f5;
  --ink: #141414;
  --ink-hover: #2a2a2a;
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: #fff;
  color: var(--text);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-underline-offset: 2px; }
::selection { background: #dedcd6; }
[hidden] { display: none !important; }

.co { display: grid; grid-template-columns: 1fr 1fr; min-height: 100svh; }

/* Who made the site, kept faint, under the page. */
.credit-line { margin: 0; padding: 14px 16px 18px; border-top: 1px solid var(--line); text-align: center; color: var(--muted); }
.credit { font-size: 12px; text-decoration: none; opacity: .6; transition: opacity .25s ease; }
.credit:hover, .credit:focus-visible { opacity: 1; text-decoration: underline; }

.summary {
  background: var(--summary);
  padding: 48px 48px 48px max(32px, calc(50vw - 480px));
}
.summary > * { max-width: 420px; }
.pay { padding: 36px 28px 48px 48px; max-width: 460px; }

.merchant { margin-bottom: 28px; }
.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.03em;
}
.back:hover span { text-decoration: underline; text-underline-offset: 3px; }

.pay-to { margin: 0; color: var(--muted); font-size: 15px; }
.amount {
  margin: 2px 0 28px;
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.items { list-style: none; margin: 0; padding: 0; }
.items li {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}
.items .thumb {
  position: relative;
  width: 42px;
  height: 54px;
  overflow: hidden;
  background: #eceae4;
}
.iname { font-weight: 500; color: var(--text); }
.iname small { display: block; margin-top: 2px; font-weight: 400; color: var(--muted); font-size: 13px; }
.iprice { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
.iprice s, .iprice small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.sum {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 0;
  margin: 8px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.sum dt { color: var(--muted); font-weight: 400; }
.sum dt small { display: block; font-size: 12px; }
.sum dd { margin: 0; padding-left: 16px; text-align: right; color: var(--text); }
.sum .total { margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--text); font-weight: 600; }
.viewing { margin: 18px 0 0; color: var(--muted); font-size: 13px; }
.viewing-who { margin: 2px 0 0; color: var(--muted); font-size: 12px; font-style: italic; opacity: .8; }

.queue {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  background: var(--summary);
}
.queue-text { width: min(26rem, 100%); text-align: center; }
.queue h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
  outline: none;
}
.queue p { margin: 10px 0 0; color: var(--muted); }

h2 { margin: 22px 0 8px; font-size: 16px; font-weight: 600; color: var(--text); }
form > h2:first-child { margin-top: 4px; }

.pickup-note { margin: 0; color: var(--muted); font-size: 14px; }

.agree {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: flex-start;
  margin-top: 18px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.45;
}
.agree input { width: 20px; height: 20px; margin: 0; accent-color: var(--ink); }

.err { margin: 6px 0 0; color: var(--danger); font-size: 13px; }

.paybtn {
  position: relative;
  display: block;
  width: 100%;
  margin-top: 18px;
  padding: 14px 16px;
  border: 0;
  background: var(--ink);
  color: #f7f7f5;
  font-size: 15px;
  text-align: center;
  text-decoration: none;
}
.paybtn:hover { background: var(--ink-hover); }
.paybtn:disabled { opacity: .35; cursor: not-allowed; }
.paybtn .spin {
  display: none;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  margin: -9px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.paybtn.busy .label { visibility: hidden; }
.paybtn.busy .spin { display: block; }
@keyframes spin { to { transform: rotate(1turn); } }

@media (prefers-reduced-motion: reduce) {
  .paybtn .spin { animation: none; }
}

.legal { margin: 14px 0 0; text-align: center; color: var(--muted); font-size: 12px; line-height: 1.45; }

.done {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  background: var(--summary);
  color: var(--text);
}
.done-card { width: min(440px, 100%); }
.done .kicker { margin: 0 0 10px; color: var(--muted); font-size: 13px; }
.done h1 { margin: 0 0 8px; font-size: 28px; font-weight: 600; letter-spacing: -0.03em; }
.done .amount { margin: 0 0 8px; font-size: 32px; }
.done .ref { margin: 0 0 18px; color: var(--soft); }
.done-items { list-style: none; margin: 0 0 16px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.done-items li { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; }
.done-items small { display: block; color: var(--muted); }
/* Nothing ships: the day, the place and the invoice to bring are the
   order's most important lines, so they are bold, never fine print. */
.done-pickup { margin: 0 0 10px; font-weight: 600; line-height: 1.45; color: var(--text); }
/* A paid order is a pickup ticket, on the paper of the rail's hanger tickets:
   the thing to screenshot and show on the day. A string hole at the top, and
   a perforated stub with the day, the hours and the place. */
.ticket {
  position: relative;
  margin: 6px 2px 20px;
  background: #f4f1e8;
  color: #2a2824;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .14), 0 14px 28px -18px rgba(0, 0, 0, .45);
  transform: rotate(-1deg);
}
.ticket[hidden] { display: none; }
.ticket::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 50%;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border-radius: 50%;
  background: var(--summary);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, .25);
}
.ticket-head { display: flex; justify-content: space-between; margin: 0; padding: 30px 18px 0; color: #6f6a5e; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.ticket-ref { margin: 4px 0 0; padding: 0 18px 16px; font-size: 34px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.ticket-stub { position: relative; padding: 14px 18px 18px; border-top: 2px dashed rgba(42, 40, 36, .3); }
.ticket-stub::before, .ticket-stub::after {
  content: "";
  position: absolute;
  top: -9px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--summary);
}
.ticket-stub::before { left: -8px; }
.ticket-stub::after { right: -8px; }
.ticket-stub p { margin: 0; }
.ticket-when { font-size: 19px; font-weight: 700; line-height: 1.3; white-space: pre-line; }
.ticket-where { margin-top: 6px !important; font-size: 14px; }
.ticket-only { margin-top: 8px !important; font-size: 13px; font-weight: 600; }
.done .legal { text-align: left; margin: 0 0 8px; }
.done .paybtn { width: auto; display: inline-block; padding: 12px 22px; }

@media (max-width: 860px) {
  .co { grid-template-columns: 1fr; }
  .summary { padding: 20px 16px 8px; }
  .pay { padding: 8px 16px 40px; max-width: none; }
  .amount { font-size: 30px; margin-bottom: 18px; }
}

/* Fingers need about 44px. Grow the hit area, not the layout. */
@media (pointer: coarse) {
  .back { padding: 7px 0; margin: -7px 0; }
}
