/* Checkout sheet: the last step before an order is sent (2026-11-12).
   Everything here is scoped to .checkout-sheet or to a checkout-* class, so
   the item, cart and address sheets keep their own look. Loaded after the
   menu's inline styles and storefront-browser.css. Bump ?v= on edit.

   What happens while the keyboard is up lives with the other sheets' rules,
   in the menu view (body.kb-open) and its keyboard script. */

/* ── Type ────────────────────────────────────────────────────────────────
   The page resets every control to `font: inherit` (body.customer-ordering
   button, input, textarea, select), and that rule outranks the size and
   weight utilities written on the controls themselves: whatever its classes
   said, every button in this sheet rendered 16px regular. The checkout
   states its own sizes. Fields stay at 16px, below which an iPhone zooms the
   page into the field being typed in. */
.checkout-sheet .customer-sheet-body button { font-size: 14px; font-weight: 600; line-height: 1.25; }
.checkout-sheet .customer-sheet-body .checkout-link { color: #315f49; font-size: 12.5px; font-weight: 650; }
.checkout-sheet .customer-sheet-body .checkout-link:hover { color: #183e2e; }

/* ── Labels ──────────────────────────────────────────────────────────────
   A section's name is a quiet line of text. They were small capitals with an
   icon each, five of them down the sheet; with the pills and the coloured
   panels that was most of what made the form look busy. */
.checkout-label { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--storefront-ink); font-size: 14px; font-weight: 650; line-height: 1.3; letter-spacing: -.005em; }
.checkout-label-row { display: flex; flex-wrap: wrap; align-items: center; column-gap: 12px; }
/* The switch beside a label keeps 44px to tap and a label's height in the layout. */
.checkout-sheet .customer-sheet-body .checkout-label-row .checkout-link { margin: -12px 0 -12px auto; }
/* The delivery details are a shared component; inside this sheet they match. */
.checkout-sheet .delivery-details-fields label { color: var(--storefront-ink); font-size: 14px; font-weight: 650; letter-spacing: -.005em; text-transform: none; }

/* A field's hint: plain, and dark enough to read (it was italic, in a grey
   that gave 12px text a 2.6:1 contrast). */
.checkout-hint { color: var(--storefront-muted); font-size: 12px; line-height: 1.4; }

/* ── Where it is picked up ───────────────────────────────────────────────
   Under the title, in view for the whole step. It was a yellow panel at the
   top of the form, gone at the first scroll. */
.checkout-place { display: flex; align-items: flex-start; gap: 5px; margin-top: 3px; color: #4d5a53; font-size: 12.5px; font-weight: 500; line-height: 1.38; }
.checkout-place svg { flex: none; margin-top: 2px; color: var(--storefront-accent); }
.checkout-place strong { color: var(--storefront-ink); font-weight: 700; }

/* ── Choices ─────────────────────────────────────────────────────────────
   One chip for every either/or in the sheet: now or later, the day, « Dans… »
   or a set time, the time itself, how to pay. Chosen is the storefront's dark
   green; it used to be navy for some and indigo for the days. */
.checkout-chip { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 16px; border-radius: 12px; background: #f1f4f2; color: #3d4a43; text-align: center; transition: background-color .15s ease, color .15s ease; }
.checkout-chip:hover { background: #e5ece7; }
.checkout-chip.is-on, .checkout-chip.is-on:hover { background: var(--storefront-dark); color: #fff; }
.checkout-chip:disabled { opacity: .5; }
.checkout-slot { flex-direction: column; gap: 1px; padding: 6px 16px; }
.checkout-slot-time { color: #7b8780; font-size: 11px; font-weight: 500; font-variant-numeric: tabular-nums; }
.checkout-chip.is-on .checkout-slot-time { color: rgba(255, 255, 255, .72); }
/* The day the order is for, beside « Heure de cueillette ». Another day than
   today is said in the accent: the one detail not to get wrong. */
.checkout-day { color: #1d6b46; }
.checkout-day.is-future { color: var(--storefront-accent); }

/* ── Fields ──────────────────────────────────────────────────────────────
   One focus ring per field. A text field wore two: the sheet's sage border
   and shadow, and the page's gold keyboard outline on top of it. Buttons,
   links and ticks keep the gold outline for keyboard users. */
.checkout-sheet .customer-sheet-body :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea):focus-visible { outline: 0; }

/* The phone number. One frame holds « +1 », the number and, once the code is
   sent, « Modifier »; the frame wears the ring. The bare field inside used to
   keep its own border, shadow and outline, which the frame clipped down to a
   stray gold bar beside the prefix (owner shots 2026-11-12). */
.checkout-phone-card { border-radius: 16px; }
/* Owed: a plain card, an active step. It is rose only after a confirm tap or
   a code was refused (.is-alert); opened rose, the sheet looked broken before
   the customer had touched it. */
.checkout-phone-card.is-owed { display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 1px solid var(--storefront-line); background: #f6f7f6; transition: background-color .2s ease, border-color .2s ease; }
.checkout-phone-card.is-alert { border-color: #fecdd3; background: #fff1f2; }
.checkout-phone-card.is-alert .checkout-label.is-gate,
.checkout-phone-card.is-alert .checkout-gate-note { color: #be123c; }
.checkout-gate-note { color: #4d5a53; font-size: 12.5px; font-weight: 500; line-height: 1.4; }
.checkout-phone-field { display: flex; flex: 1; align-items: center; min-width: 0; height: 48px; overflow: hidden; border: 1px solid var(--storefront-line); border-radius: 12px; background: #fff; transition: border-color .15s ease, box-shadow .15s ease; }
.checkout-phone-field:focus-within { border-color: #51715f; box-shadow: 0 0 0 3px rgba(81, 113, 95, .13); }
.checkout-phone-field.is-locked { background: #f6f7f6; }
.checkout-phone-prefix { padding: 0 2px 0 14px; color: #7b8780; font-size: 16px; font-weight: 500; line-height: 1; }
.checkout-sheet .checkout-phone-field input,
.checkout-sheet .checkout-phone-field input:focus { border: 0 !important; background: transparent !important; box-shadow: none !important; outline: 0; }
/* The number the code went to stays readable: the shared sheet halves a
   disabled field's opacity, and Safari greys its text on top of that. */
.checkout-sheet .checkout-phone-field input:disabled { opacity: 1; color: #3d4a43; -webkit-text-fill-color: #3d4a43; }
.checkout-sheet .customer-sheet-body .checkout-phone-edit { border-left: 1px solid var(--storefront-line); color: #315f49; font-size: 12.5px; font-weight: 650; }

/* Send and ✓: the step's own action, dark so the brick-red confirm button
   stays the only one of its colour on the sheet. */
.checkout-sheet .customer-sheet-body .checkout-action { min-width: 48px; height: 48px; padding: 0 18px; border-radius: 12px; background: var(--storefront-dark); color: #fff; font-size: 15px; font-weight: 650; }
.checkout-sheet .customer-sheet-body .checkout-action:active { background: var(--storefront-dark-2); }
.checkout-sheet .customer-sheet-body .checkout-action-icon { width: 48px; padding: 0; }
/* Not yet usable (number incomplete, code incomplete): a quiet grey, where
   half-opacity dark green over the rose card read as a muddy olive. */
.checkout-sheet .customer-sheet-body .checkout-action:disabled { opacity: 1; background: #d9dfdb; color: #76827b; }
/* « Renvoyer le code », under the code: 44px to tap, a line's height in the card. */
.checkout-sheet .customer-sheet-body .checkout-resend { align-self: flex-start; margin: -10px 0 -14px; }
.checkout-sheet .customer-sheet-body .checkout-resend:disabled { opacity: 1; color: #76827b; }

/* The texted code: four wide digits. The placeholder is a sentence, so it
   does not take the digits' spacing. */
.checkout-sheet .customer-sheet-body .checkout-code-input { min-width: 0; height: 48px; font-size: 20px; font-weight: 700; letter-spacing: .32em; font-variant-numeric: tabular-nums; }
.checkout-sheet .customer-sheet-body .checkout-code-input::placeholder { font-size: 15px; font-weight: 500; letter-spacing: normal; }

/* Verified: one line where a blue panel with a title, a sentence and a row
   used to stay. The number is the proof the customer is reading, so it is
   never cut; the sentence under it says how long the proof holds. */
.checkout-verified-row { display: flex; align-items: center; gap: 10px; }
.checkout-verified-row > svg { flex: none; color: #1d6b46; }
.checkout-verified { display: flex; flex: 1; flex-direction: column; min-width: 0; line-height: 1.3; }
.checkout-verified-number { color: var(--storefront-ink); font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.checkout-verified-note { color: #59675f; font-size: 12px; }

/* The Promo Dollars panel sits inside this sheet's body, so its text link
   would take the button size above. It keeps its own small, regular one. */
.checkout-sheet .customer-sheet-body .promo-earn-terms { font-size: 12px; font-weight: 500; }

/* Promo Dollars, inside this sheet only: the same words in less height, so an
   optional step does not look like more form to fill. */
.checkout-sheet .promo-earn-panel { padding: 12px 14px; }
.checkout-sheet .promo-earn-mark { width: 32px; height: 32px; }
.checkout-sheet .promo-earn-field { margin-top: 10px; }
.checkout-sheet .customer-sheet-body .promo-earn-terms { margin: -8px 0 -12px; }

/* ── Confirm bar ─────────────────────────────────────────────────────────
   A little shorter, so one more line of the form shows above it, and a
   button that reads as the one thing left to do. */
.checkout-sheet .customer-sheet-footer { padding-top: 12px; }
.checkout-sheet .customer-sheet-footer .customer-primary-button { height: 52px; font-size: 16px; font-weight: 700; letter-spacing: -.005em; }

/* ── Narrow phones (320 to 359px) ────────────────────────────────────────
   Beside « +1 », the pencil and the resend countdown, a 320px screen left
   the locked number five visible digits. The pencil keeps its accessible
   name and drops its word; the confirm button gives a long total its room. */
@media (max-width: 359px) {
  .checkout-phone-edit > span { display: none; }
  .checkout-sheet .customer-sheet-footer .customer-primary-button { font-size: 14.5px; }
}

/* A field still owed wears its asterisk and nothing else (owner, 2026-11-13:
   the red « Requis » pills are gone). */
.checkout-required { color: #c2412d; font-weight: 700; line-height: 1; }

/* The web checkout's summary, folded to one line with the total in view
   (docs/WEB_ORDER_APP_CONVERSION.md). The app keeps its open panel. */
.checkout-summary-fold > summary { display: flex; align-items: baseline; gap: 8px; cursor: pointer; list-style: none; min-height: 24px; }
.checkout-summary-fold > summary::-webkit-details-marker { display: none; }
.checkout-summary-fold > summary:focus-visible { outline: 3px solid #709981; outline-offset: 6px; border-radius: 8px; }
.checkout-summary-count { flex: 1; min-width: 0; color: #6c7872; font-size: 13px; }
.checkout-summary-total { color: var(--storefront-ink); font-size: 14px; font-weight: 750; font-variant-numeric: tabular-nums; }
.checkout-summary-fold > summary > svg { flex: none; align-self: center; color: #6c7872; transition: transform .15s; }
.checkout-summary-fold[open] > summary > svg { transform: rotate(180deg); }
.checkout-summary-fold[open] > summary { padding-bottom: 12px; margin-bottom: 4px; border-bottom: 1px solid #e3e0d8; }
.checkout-summary-lines { color: #6c7872; font-size: 12px; font-weight: 650; }
@media (prefers-reduced-motion: reduce) { .checkout-summary-fold > summary > svg { transition: none; } }
/* Folded, nothing of the lines takes room (a hidden line's margin still did). */
.checkout-summary-fold:not([open]) > :not(summary) { display: none; }
