/* Package-owned styles (checkout). Uses the tokens defined in site.css. */

/* Checkout form spacing (replaces inline styles) */
.checkout-gap { margin-top: 16px; }
.checkout-check { margin-top: 14px; }
.checkout-place { margin-top: 18px; }
.cart-notice { display: flex; gap: 8px; align-items: flex-start; }

/* Consent and order-update boxes: unticked by default, each on its own line */
.checkout-consent { border: 0; padding: 0; margin: 18px 0 0; display: grid; gap: 12px; }
.checkout-consent legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.checkout-consent .check span { font-weight: 500; }

/* Business test sheet 2026-11-18: the one offer-text box, right above "Place order" in the summary (so after the
   summary's totals on phones too), and the change rule and card note under the order notes where it used to be.
   The legend floats so it sits inside the box's padding (a grid item, so it still spans the full width). */
.checkout-texts { margin-top: 18px; padding: 14px 16px; gap: 8px; min-width: 0;
    background: var(--cream-50); border: 1px solid var(--butter-100); border-radius: var(--radius-sm); }
.checkout-texts legend { float: left; width: 100%; margin: 0; font-family: var(--font-head); font-size: 1.05rem; color: var(--ink); }
.checkout-texts__pitch { margin: 0; color: var(--ink-2); }
.checkout-texts .check span { font-size: .88rem; line-height: 1.5; }
.checkout-texts .hint { margin: 0; }
.checkout-good-to-know { margin-top: 16px; }
.checkout-good-to-know .change-rule { margin: 0; }

/* Discount code entry in the order summary */
.coupon-entry { margin: 14px 0; }
.coupon-entry label { display: block; font-weight: 600; margin-bottom: 6px; }
.coupon-entry__row { display: flex; gap: 8px; }
.coupon-entry__row input { flex: 1 1 auto; min-width: 0; text-transform: uppercase; }
.coupon-entry__row .btn { flex: 0 0 auto; }

.delivery-problem { margin-top: 10px; }
.delivery-problem p { margin: 0; }
.delivery-problem p + p { margin-top: 6px; }
.keep-shopping { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 8px 0 12px; }
.keep-shopping .hint { margin: 0; }

/* Live price note on product pages when a combination price applies */
[data-price-display].is-combo { color: var(--brand, #F85D02); }

/* Account: saved cards and subscriptions */
.saved-cards, .subs-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.saved-card, .sub-item { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
    padding: 14px 16px; border: 1px solid rgba(43, 29, 20, .14); border-radius: 12px; background: #fff; }
.saved-card__info, .sub-item__info { display: grid; gap: 2px; }
.saved-card__brand { font-weight: 700; text-transform: capitalize; }
.sub-item__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sub-item__actions form { margin: 0; }
.sub-status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .85rem; font-weight: 700; background: #FAF0E0; color: #2B1D14; }
.sub-status--active { background: #E5F4E8; color: #1F5A2B; }
.sub-status--pastdue { background: #FDE8E1; color: #8A2A0B; }
.sub-status--paused { background: #FFF4D6; color: #6B4E00; }

/* Subscribe and save on product pages */
.subscribe-box { margin-top: 18px; padding: 16px; border: 1px dashed rgba(248, 93, 2, .5); border-radius: 12px; background: #FFF8EE; }
.subscribe-box h3 { margin: 0 0 6px; font-size: 1.05rem; }
.subscribe-box .choices { margin: 10px 0; }

@media (min-width: 700px) {
    .checkout-consent { gap: 10px; }
}

/* ===== Round 2 (storefront UX): time slots ===== */
/* Each day is a fieldset (the day is read out with every time); two compact columns even on a 375px phone. */
.slot-group { border: 0; padding: 0; margin: 14px 0 0; min-width: 0; }
.slot-group legend { font-family: var(--font-body); font-weight: 800; font-size: .95rem; color: var(--ink-2); padding: 0; margin-bottom: 8px; }
.choices--slots { grid-template-columns: repeat(auto-fill, minmax(min(132px, 100%), 1fr)); gap: 8px; }
.choices--slots .choice > span { padding: 11px 32px 11px 12px; white-space: nowrap; }
.choices--slots .choice span small { white-space: normal; }
.slot-more { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 4px; }
.slot-more > summary { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-height: 44px; cursor: pointer; font-weight: 800; color: var(--brand-700); list-style: none; }
.slot-more > summary::-webkit-details-marker { display: none; }
.slot-more > summary::before { content: "+"; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 999px; background: var(--brand-50); font-size: 1.1rem; line-height: 1; }
.slot-more[open] > summary::before { content: "\2212"; }
.slot-more > summary .muted { font-weight: 600; }
/* Each batch's button sits under its five days (they nest), so an open batch reads as one list. */
.slot-more .slot-more { margin-top: 18px; }
.upper { text-transform: uppercase; }

/* ===== Round 2 (storefront UX): order status page ===== */
.order-page { max-width: 860px; }
.status-hero .lede { margin-inline: auto; }
.row--center { justify-content: center; }
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; }
.order-event { padding: 6px 0; }
.order-help { text-align: center; margin: 24px 0; }
.etransfer-note { margin-top: 12px; }
.etransfer dd { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; word-break: normal; overflow-wrap: anywhere; }
.copy-btn { min-height: 36px; padding: 4px 12px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--white); color: var(--ink); font: 700 .85rem/1 var(--font-body); cursor: pointer; }
.copy-btn:hover { border-color: var(--brand-700); color: var(--brand-700); }
.copy-btn[data-copied] { border-color: var(--success); color: var(--success); }
@media (max-width: 560px) {
    /* Labels above values, so the e-Transfer email fits on one line on a phone. */
    .etransfer { padding: 16px; }
    .etransfer dl { grid-template-columns: 1fr; gap: 2px; }
    .etransfer dd { font-size: .92rem; margin-bottom: 8px; }
    .copy-btn { min-height: 44px; }
}
/* Even spacing between the order page's panels (the two-column pair sat flush against its neighbours). */
.order-page > .two-col { gap: 20px; margin-top: 20px; }
.order-page > .two-col > .panel + .panel { margin-top: 0; }
.order-page > .two-col + .panel { margin-top: 20px; }
.narrow-640 { max-width: 640px; }
.lede--center { margin-inline: auto; }
/* Cart page (inline styles moved here) */
.cart-continue { margin-top: 16px; }
.cart-coupon { margin-top: 16px; }

/* ===== Round 3 (P1): checkout errors, place-order reason, applied code, order page actions ===== */
/* One error summary at the top; each line links to its field (UXS-01). Shared with the contact and catering forms
   (ErrorSummary.razor; this file loads on every storefront page). */
.error-summary { scroll-margin-top: 16px; }
.error-summary p { margin: 0; }
.error-summary p + p, .error-summary p + ul { margin-top: 6px; }
.error-summary ul { margin: 6px 0 0; padding-left: 20px; }
.error-summary li + li { margin-top: 4px; }
.error-summary a { color: inherit; text-decoration: underline; text-underline-offset: 2px; font-weight: 700; }
.error-summary:focus { outline: 3px solid var(--danger); outline-offset: 2px; }
h2[tabindex="-1"]:focus { outline: none; }
/* Why "Place order" can't go through yet, right under the button (UXS-05). Empty when nothing blocks it. */
.place-why { margin: 8px 0 0; }
.place-why:empty { display: none; }
/* Until when an order can be changed (owner decision 2026-11-17), under the button too. */
.change-rule { margin: 8px 0 0; }
/* Applied discount code with a Remove button (UXS-20). */
.coupon-applied { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 8px 0 0; font-size: .92rem; }
.coupon-applied .link-btn { min-height: 44px; padding: 0 4px; }
.coupon-entry .error { margin: 6px 0 0; }
/* Order page: the actions for an unpaid card order or a released order (UXS-02, UXS-09). */
.order-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 16px; }
.order-actions form { margin: 0; }
.order-actions .btn { white-space: normal; }
.cart-minimum { margin: 14px 0 0; }
.cart-coupon .error { margin: 6px 0 0; }
/* Fields with an error (UXS-01, UXS-20): the generic [aria-invalid] rule in site.css loses to the field styles. */
.field input[aria-invalid="true"], .field select[aria-invalid="true"], .field textarea[aria-invalid="true"],
.coupon-entry input[aria-invalid="true"], .cart-coupon input[aria-invalid="true"] { border-color: var(--danger); background: var(--danger-50); }
/* "Create an account": the password field shows while the box is ticked (browsers without :has always show it). */
.checkout-account .account-password { margin: 4px 0 0; }
.checkout-account:has(#create-account:not(:checked)) .account-password { display: none; }
