/* label.css and theme.css are linked by the pages themselves (an @import
   here would make the browser fetch them only after this file). */
/* Order flow: order page, checkout, confirmation, account. Builds on
   /shared/kit.css. New components here (not in the kit): .group, .oline,
   .sumcard, .totals, .steps, .step, .errsum, .stop, .pay, .switch, .text-btn,
   .lspec, .thanks-band. The label language (spaced caps, ruled strips) comes
   from /shared/label.css, the item page's can label system. */


.order { padding-bottom: 24px; }
.order__title { margin: 18px 0 28px; }
.order__title:focus { outline: none; }
.order-nojs { margin-bottom: 24px; }
.small { font-size: .875rem; }
.ico { width: 26px; height: 26px; flex: none; }

.order-grid { display: grid; gap: 32px; align-items: start; }
@media (min-width: 960px) {
  .order-grid { grid-template-columns: minmax(0, 1fr) 360px; gap: 48px; }
  .order-aside { position: sticky; top: calc(var(--header-h) + 20px); }
}
.order-main { min-width: 0; }

.order-empty { padding: 8px 0 24px; }
.order-empty .lede { font-family: var(--font-warm); font-weight: 400; font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin-bottom: 10px; line-height: 1.15; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Groups on the order page: one per way the order reaches the customer */
.group { padding: 4px 0 28px; border-top: 2px solid var(--fg); }
.group + .group { margin-top: 8px; }
.group__head { display: flex; gap: 14px; align-items: flex-start; padding: 16px 0 6px; }
.group__head .ico { margin-top: 2px; }
.group__title { font-family: var(--font-body); font-weight: 700; font-size: 1.35rem; line-height: 1.1; }
.group__title:focus { outline: none; }
.group__note { margin: 4px 0 0; color: var(--muted); font-size: .9375rem; }

.olines { list-style: none; margin: 0; padding: 0; }
.oline { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 16px; align-items: start; padding: 16px 0; border-bottom: 1px solid var(--line); }
.oline:last-child { border-bottom: 0; }
.oline .line__swatch { width: 56px; height: 70px; background: none; border-radius: 2px; }
.oline__body { display: grid; gap: 4px; min-width: 0; }
.oline__body p { margin: 0; }
.oline__ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 6px; }
.oline__total { margin: 0; text-align: right; }
.qty button[aria-disabled="true"] { opacity: .35; cursor: not-allowed; }
.qty button:focus-visible { outline-offset: -3px; }
.text-btn { border: 0; background: none; padding: 8px 0; min-height: 40px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; color: var(--muted); font-size: .9375rem; }
.text-btn:hover { color: var(--fg); }
@media (max-width: 520px) {
  .oline { grid-template-columns: 48px minmax(0, 1fr); }
  .oline .line__swatch { width: 48px; height: 60px; }
  .oline__total { grid-column: 2; text-align: left; }
}

.merch-choice { margin: 16px 0 0; }
.merch-choice legend { font-weight: 600; margin-bottom: 10px; }
.choices--two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.choice__text { display: grid; gap: 2px; }
.choice__text .muted { font-size: .875rem; }

/* Summary card (aside) */
.sumcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; gap: 14px; }
.sumcard p { margin: 0; }
.sumcard__title { font-family: var(--font-body); font-weight: 700; font-size: 1.2rem; }
.sumcard__more { text-align: center; font-size: .9375rem; }
.totals { margin: 0; display: grid; gap: 6px; }
.totals div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.totals dt { font-size: .9375rem; }
.totals dd { margin: 0; }
.totals .price { font-size: 1.15rem; }
.totals__total { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; }
.totals__total dt { font-weight: 600; }
.totals__total .price { font-size: 1.6rem; }
.totals__cur { display: block; font-family: var(--font-body); font-size: .875rem; font-weight: 600; color: var(--muted); }
.mini { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mini li { display: flex; justify-content: space-between; gap: 12px; font-size: .9375rem; }
.mini__v { display: block; font-size: .8125rem; color: var(--muted); }
.mini .price { font-size: 1.05rem; }
/* Mug Club on the confirmation: each membership, with its printed gift beside it (mug-gift-print.js). */
.mini--gifts li { align-items: center; flex-wrap: wrap; }

/* Checkout steps: a ruled strip, like the label's fine print */
.steps { list-style: none; margin: 0 0 24px; padding: 10px 0; display: flex; flex-wrap: wrap; gap: 6px 0; border-block: 1px solid var(--fg); font-family: var(--font-body); font-weight: 600; font-size: .875rem; line-height: 1.3; }
.steps__item { display: flex; align-items: center; gap: 8px; color: var(--muted); padding-inline: 14px; }
.steps__item:first-child { padding-left: 0; }
.steps__item + .steps__item { border-left: 1px solid var(--line); }
.steps__n { font-family: var(--font-body); font-weight: 600; display: inline-grid; place-items: center; min-width: 1.4em; }
.steps__n svg { width: 14px; height: 14px; }
.steps__item--current { color: var(--fg); font-weight: 800; }
.steps__item--current .steps__n { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.steps__item--done { color: var(--ok); }

.step { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; }
.step--current { border: 2px solid var(--fg); }
.step--next { background: transparent; }
.step--next .step__title { color: var(--muted); }
.step__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 20px; }
.step__count { font-family: var(--font-body); font-weight: 700; font-size: .875rem; color: var(--fg); margin: 0 0 6px; }
.step__title { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: .95; scroll-margin-top: calc(var(--header-h) + 72px); }
.step__title:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.step__title:focus:not(:focus-visible) { outline: none; }
.step__body { padding: 0 20px 22px; }
.step--current .step__head { margin: 0 20px 18px; padding-inline: 0; border-bottom: 1px solid var(--fg); }
.step__actions { margin-top: 8px; }
.step .recap { padding: 0 20px 18px; }

.recap { margin: 0; display: grid; gap: 6px; }
.recap div { display: grid; grid-template-columns: minmax(110px, 30%) 1fr; gap: 12px; font-size: .9375rem; }
.recap dt { color: var(--muted); }
.recap dd { margin: 0; overflow-wrap: anywhere; }
.recap--inline { display: flex; flex-wrap: wrap; gap: 4px 28px; margin-top: 8px; }
.recap--inline div { display: flex; gap: 8px; }

.dob__row { display: flex; gap: 12px; flex-wrap: wrap; }
.dob__row > div { display: grid; gap: 6px; width: 5.5rem; }
.dob__row > .dob__y { width: 7.5rem; }
.dob__row label { font-weight: 400; font-size: .875rem; }

.block { padding: 18px 0; border-top: 1px solid var(--line); }
.block:first-of-type { border-top: 0; padding-top: 4px; }
.errsum + .block, .errsum ~ .block:first-of-type { border-top: 0; }
.block__title { display: flex; align-items: center; gap: 10px; font-family: var(--font-body); font-weight: 700; font-size: 1rem; margin-bottom: 10px; }
.block__title .ico { width: 22px; height: 22px; }
.block__note { color: var(--muted); font-size: .9375rem; }
.id-note { font-weight: 600; display: flex; gap: 8px; align-items: center; }
.id-note::before { content: ""; width: 18px; height: 12px; border: 2px solid currentColor; border-radius: 2px; flex: none; }
/* Unpasteurised: keep it cold (a snowflake before the line) */
.cold-note { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 0; font-weight: 700; color: var(--fg); }
.cold-note::before { content: ""; width: 18px; height: 18px; margin-top: 2px; flex: none; background: currentColor; -webkit-mask: var(--snow) center / contain no-repeat; mask: var(--snow) center / contain no-repeat; }
.cold-note { --snow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2.5 12 21.5M9.6 4.3 12 6.7 14.4 4.3M20.2 7.2 3.8 16.8M17.5 6.1 16.6 9.3 19.9 10.2M20.2 16.8 3.8 7.3M19.9 13.8 16.6 14.6 17.5 17.9M14.4 19.7 12 17.3 9.6 19.7M6.5 17.9 7.4 14.7 4.1 13.8M4.1 10.2 7.4 9.3 6.5 6.1'/%3E%3C/g%3E%3C/svg%3E"); }
.sumcard .cold-note { font-size: .875rem; }
.group > .cold-note { margin: 4px 0 12px; }
.deliv-facts { margin: 0 0 14px; padding-left: 1.2em; display: grid; gap: 4px; font-size: .9375rem; }
.id-ok { margin: 6px 0 14px; padding: 12px 14px; border-radius: var(--radius); background: color-mix(in oklab, var(--ok) 14%, var(--surface)); }
.next__instr { color: var(--muted); font-style: italic; }

/* Account: details, delivery and password fields */
.acct-form { display: grid; gap: 4px; }
.acct-form .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; align-items: center; }
.pw { display: flex; gap: 12px; align-items: center; }
.pw .input { flex: 1; min-width: 0; }


.days { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.choice--day { padding: 10px 12px; }
.choice--day .choice__text span { font-size: .875rem; color: var(--muted); }
.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
.choice--time { padding: 10px 12px; align-items: center; font-variant-numeric: tabular-nums; }
.choice--time input, .choice--day input { margin-top: 0; }
.choice:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.field legend { margin-bottom: 4px; }

.gift { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 14px 16px 2px; margin: 0 0 12px; }
.gift p { margin: 0 0 12px; }
.gift__head { font-weight: 600; padding: 0 4px; }
div.gift .gift__head { padding: 0; margin-bottom: 4px; }

/* Errors and the under-18 stop */
.errsum { border: 2px solid var(--error); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 18px; background: var(--panel); }
.errsum:focus-visible { outline: 3px solid var(--error); outline-offset: 2px; }
.errsum:focus:not(:focus-visible) { outline: none; }
.errsum__title { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.errsum ul { margin: 0; padding-left: 20px; }
.errsum a { color: var(--error); font-weight: 600; text-underline-offset: 3px; }
.stop { background: var(--surface-2); color: var(--fg); border: 2px solid var(--error); border-radius: var(--radius); padding: 18px 20px; margin: 0 0 18px; }
.stop:focus-visible { outline: 3px solid var(--error); outline-offset: 2px; }
.stop:focus:not(:focus-visible) { outline: none; }
.stop__title { font-family: var(--font-body); font-weight: 700; font-size: 1.35rem; margin-bottom: 8px; }
.stop p:last-child { margin: 0; }

/* Payment placeholder, set as a label info box: tag, title, copy and a
   ruled fine-print strip. It is a marked slot, never a form. */
.pay { padding: 18px 20px 16px; margin: 0 0 18px; border: 2px solid var(--fg); border-radius: 2px; background: var(--surface-2); }
.pay__tag { font-family: var(--font-body); font-weight: 700; font-size: .875rem; margin: 0 0 8px; color: var(--fg); }
.pay__title { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: .95; margin-bottom: 10px; }
.pay p { font-size: .9375rem; }
.pay__foot { display: flex; align-items: end; gap: 16px; }
.pay__strip { list-style: none; margin: 0; padding: .6em 0; flex: 1; display: flex; flex-wrap: wrap; gap: 2px 0; border-block: 1px solid var(--fg); font-family: var(--font-body); font-weight: 600; font-size: .875rem; line-height: 1.35; }
.pay__strip li { padding-inline: 10px; }
.pay__strip li:first-child { padding-left: 0; }
.pay__strip li + li { border-left: 1px solid var(--fg); }
.pay__lock { margin: 0; display: grid; justify-items: center; gap: 4px; font-family: var(--font-body); font-weight: 600; font-size: .875rem; }
.pay__lock span { margin-right: -.4em; }
.pay__lock .ico { width: 24px; height: 24px; }
@media (max-width: 520px) {
  .pay__lock { display: none; }
  .pay__strip { flex-direction: column; }
  .pay__strip li { padding-inline: 0; }
  .pay__strip li + li { border-left: 0; }
}
.save-card { margin-bottom: 18px; }
.step .totals { margin-bottom: 18px; max-width: 420px; }
.btn--place { min-height: 52px; padding-inline: 28px; font-size: 1.1rem; }

/* Confirmation */
.confirm { padding-bottom: 28px; }
.confirm .lede { font-family: var(--font-warm); font-weight: 400; font-size: clamp(1.4rem, 2.6vw, 2rem); margin-bottom: 18px; line-height: 1.15; }
.ref { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin: 0 0 14px; padding: 10px 0; border-block: 1px solid var(--fg); }
.ref__label { font-family: var(--font-body); font-weight: 700; font-size: .875rem; color: var(--fg); }
.ref__code { font-family: var(--font-display); font-weight: 800; font-size: clamp(2rem, 5vw, 3rem); letter-spacing: .03em; line-height: 1; }
.section-title { font-family: var(--font-body); font-weight: 700; font-size: 1.15rem; padding-top: 18px; border-top: 2px solid var(--fg); margin-bottom: 4px; }
.nexts { list-style: none; margin: 0; padding: 0; }
.next { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.next p { margin: 0 0 6px; }
.next .mini { margin-top: 10px; }
.next__title { font-family: var(--font-body); font-weight: 700; font-size: 1rem; margin-bottom: 6px; }
.next__when { font-family: var(--font-body); font-weight: 500; font-size: 1.2rem; }

/* Account */
.account-note { margin-bottom: 28px; }
.acct-grid { display: grid; gap: 32px; margin-bottom: 32px; }
@media (min-width: 960px) { .acct-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 48px; } }
.acct-sec { border-top: 2px solid var(--fg); padding-top: 16px; margin-bottom: 32px; }
.acct-grid .acct-sec { margin-bottom: 0; }
.acct-sec > .group__title { margin-bottom: 14px; }
.acct-sec .block__title { margin-top: 22px; }
.plans, .orders { list-style: none; margin: 0; padding: 0; }
.plan { display: grid; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 640px) { .plan { grid-template-columns: minmax(0, 1fr) 230px; } }
.plan p { margin: 0; }
.plan__name { font-weight: 600; }
.plan__renew { display: grid; gap: 6px; align-content: start; }
.plan__renew .hint { font-size: .8125rem; color: var(--muted); }
.orderrow { display: grid; grid-template-columns: 160px minmax(0, 1fr) auto; gap: 8px 20px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); }
.orderrow p { margin: 0; }
.orderrow__ref { font-family: var(--font-body); font-weight: 600; }
.orderrow__items { font-size: .9375rem; }
@media (max-width: 640px) { .orderrow { grid-template-columns: minmax(0, 1fr) auto; } .orderrow__items { grid-column: 1 / -1; grid-row: 2; } }
.reset-confirm { display: grid; gap: 12px; }
.reset-confirm p { margin: 0; }

/* Renewal switch */
.switch { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 0; border: 0; background: none; cursor: pointer; font-weight: 600; text-align: left; }
.switch__track { width: 46px; height: 26px; border-radius: 13px; background: var(--surface-2); border: 2px solid var(--line-strong); position: relative; flex: none; transition: background .2s; }
.switch__thumb { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--paper); box-shadow: 0 1px 2px rgba(0, 0, 0, .5); transition: transform .2s var(--ease-out); }
.switch[aria-checked="true"] .switch__track { background: var(--ok); border-color: var(--ok); }
.switch[aria-checked="true"] .switch__thumb { background: var(--ground); }
.switch[aria-checked="true"] .switch__thumb { transform: translateX(20px); }
.switch[aria-disabled="true"] { cursor: not-allowed; opacity: .55; }

/* Thank-you band on the confirmation: a wide label, full bleed */
.thanks-band { position: relative; width: 100vw; margin: 0 calc(50% - 50vw) 32px; height: clamp(220px, 26vw, 340px); }
.thanks-band__in { position: absolute; inset: 0; }
.thanks-band .bl .bl__info { --bl-fine: max(12px, 4.2cqh); width: auto; right: 30cqw; }
.thanks-band .bl .bl__cold { --bl-fine: max(10px, 3.4cqh); }
@media (max-width: 640px) { .thanks-band .bl .bl__info { right: 5cqw; letter-spacing: .06em; } .thanks-band .bl .bl__cold { display: none; } }

/* The discount and gift card code fields, in the summary (cart and checkout). */
.codes { display: grid; gap: 14px; margin: 0 0 16px; }
.codes__form { display: grid; gap: 6px; }
.codes__form p { margin: 0; }
.codes__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.codes__row .input { flex: 1 1 auto; min-width: 0; }

/* Mug Club terms: the link, the tick and the typed signature (order.js), boxed like a gift card. */
.terms { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 14px 16px 4px; margin: 14px 0 0; }
.terms__head { font-weight: 600; padding: 0 4px; }
.terms .hint { margin: 0 0 10px; }
.terms__agree { margin-bottom: 12px; }
.terms #f-signature { font-family: var(--font-display); font-size: 1.35rem; font-style: italic; }
.terms:has([aria-invalid]) { border-color: var(--err, currentColor); border-width: 2px; }
