/* A single form, one scrolling content area, and a persistent payment footer. */
.checkout-unified .checkout-steps,
.checkout-unified .delivery-choice,
.checkout-unified .compact-option-row,
.checkout-unified .fulfillment-card-head,
.checkout-unified .checkout-nav:empty,
.checkout-unified .checkout-box > small { display: none !important; }
.checkout-unified #checkoutForm [hidden], #drawer [hidden] { display: none !important; }
.checkout-unified .checkout-box {
  display: flex; flex-direction: column; width: min(1080px, 100%);
  max-height: calc(100dvh - 40px); padding: 22px 24px 18px; overflow: hidden;
}
.checkout-unified #checkoutTitle { flex: 0 0 auto; margin: 0 48px 18px 0; font-size: 28px; line-height: 1.2; }
.checkout-unified #checkoutClose { top: 12px; right: 16px; width: 44px; height: 44px; }
.checkout-unified #checkoutForm { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; gap: 0; padding: 0; overflow: hidden; }
.checkout-unified .checkout-content {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; gap: 24px;
  min-height: 0; padding: 0 6px 8px 0; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-gutter: stable; scroll-padding: 14px; -webkit-overflow-scrolling: touch;
}
.checkout-unified .checkout-main { display: grid; gap: 18px; min-width: 0; align-content: start; }
.checkout-unified .checkout-panel { gap: 11px; min-width: 0; animation: none; }
.checkout-unified .checkout-main .checkout-panel + .checkout-panel { padding-top: 16px; border-top: 1px solid var(--line); }
.checkout-unified .checkout-panel h3 { margin: 0; font-size: 18px; line-height: 1.3; color: var(--green); }
.checkout-unified .checkout-panel > .checkout-note { margin: 0; font-size: 12px; line-height: 1.45; }
.checkout-unified [data-step-panel="1"] { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 10px 12px; }
.checkout-unified [data-step-panel="1"] > h3,
.checkout-unified [data-step-panel="1"] > .checkout-email,
.checkout-unified [data-step-panel="1"] > .checkout-nav { grid-column: 1 / -1; }
.checkout-unified [data-step-panel="1"] > .checkout-note { display: none; }
.checkout-unified label { min-width: 0; gap: 5px; font-size: 13px; line-height: 1.4; }
.checkout-unified input, .checkout-unified select, .checkout-unified textarea { min-width: 0; min-height: 42px; padding: 9px 11px; font-size: 14px; line-height: 1.4; }
.checkout-unified textarea { min-height: 82px; resize: vertical; }
.checkout-unified .field-help { margin: 0; font-size: 11px; line-height: 1.4; }
.checkout-unified .field-error { margin: 0; font-size: 12px; }
.checkout-unified .optional { display: inline; font-size: 12px; font-weight: 400; }
.checkout-unified .unified-select-field { display: grid; gap: 5px; }
.checkout-unified .fulfillment-card { border: 0; padding: 0; }
.checkout-unified .fulfillment-body,
.checkout-unified .pickup-info.fulfillment-body { margin: 0; padding: 0; border: 0; gap: 10px; }
.checkout-unified .pickup-summary { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--milk); gap: 9px; }
.checkout-unified .pickup-summary > div { gap: 1px; }
.checkout-unified .pickup-summary b, .checkout-unified .pickup-summary span { font-size: 13px; }
.checkout-unified .pickup-summary .pickup-icon { font-size: 18px; }
.checkout-unified #pickupInfo > small { font-size: 11px; line-height: 1.45; }
.checkout-unified .compact-date-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.checkout-unified .unified-unknown-address { line-height: 1.4; margin: 0; padding: 5px 0; }
.checkout-unified .consent input,
.checkout-unified .unified-unknown-address input { flex: none; min-height: 20px; width: 20px !important; height: 20px; padding: 0; margin-top: 1px; }
.checkout-unified #deliveryQuoteCalculate { justify-self: start; min-height: 42px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--milk); color: var(--green); }
.checkout-unified .checkout-details, .checkout-unified details.unified-promo { padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--milk); }
.checkout-unified .checkout-details > summary,
.checkout-unified details.unified-promo > summary { min-height: 44px; padding: 11px 0; font-size: 13px; line-height: 1.45; cursor: pointer; font-weight: 600; }
.checkout-unified .checkout-details[open], .checkout-unified details.unified-promo[open] { padding-bottom: 12px; }
.checkout-unified .checkout-details[open] > summary { margin-bottom: 2px; }
.checkout-unified .unified-promo-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.checkout-unified .unified-promo-controls button { min-height: 42px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--green); }
.checkout-unified #checkoutPromoStatus { margin: 6px 0 0; }
.checkout-unified #checkoutPromoStatus:empty { display: none; }
.checkout-unified .checkout-aside { position: sticky; top: 0; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--milk); gap: 12px; align-self: start; }
.checkout-unified .checkout-aside > h3 { font-size: 19px; }
.checkout-unified .checkout-summary { margin: 0; padding: 0; border: 0; background: transparent; font-size: 13px; line-height: 1.7; }
.checkout-unified .checkout-item-list { display: grid; gap: 6px; margin: 0 0 12px; padding: 0; list-style: none; font-size: 12px; line-height: 1.45; }
.checkout-unified .checkout-item-list > li { display: flex; justify-content: space-between; gap: 10px; min-width: 0; }
.checkout-unified .checkout-item-name { min-width: 0; overflow-wrap: anywhere; }
.checkout-unified .checkout-item-quantity { flex: none; white-space: nowrap; }
.checkout-unified .checkout-items-more { color: var(--muted); font-size: 11px; }
.checkout-unified .summary-details { display: none; }
.checkout-unified .summary-money { padding: 0; border: 0; }
.checkout-unified .summary-money > strong { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 21px; line-height: 1.4; }
.checkout-unified .payment { padding: 10px 0 0; border-radius: 0; border-top: 1px solid var(--line); background: transparent; }
.checkout-unified .payment b { font-size: 12px; }
.checkout-unified .payment span { font-size: 11px; line-height: 1.5; }
.checkout-unified .checkout-what-next { background: #fff; }
.checkout-unified .checkout-what-next summary { font-size: 12px; }
.checkout-unified .order-assurance { margin: 0; padding: 0; background: transparent; font-size: 12px; }
.checkout-unified .consent { font-size: 11px !important; line-height: 1.5; margin: 0; }
.checkout-unified .consent a { text-underline-offset: 2px; }
.checkout-unified .checkout-paybar { position: static; display: flex; flex: 0 0 auto; justify-content: flex-end; gap: 12px; margin: 12px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); background: #fff; }
.checkout-unified #checkoutForm #submitOrder { position: static; flex: 0 1 320px; width: 320px; min-height: 48px; font-size: 15px; padding: 11px 16px; box-shadow: none; }
.checkout-unified #checkoutStatus { flex-shrink: 0; margin: 10px 0 0; padding: 10px 12px; border-radius: 8px; background: #fff4ed; color: #8b3d25; font-size: 13px; line-height: 1.45; }
.checkout-recovery { padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--milk); color: var(--green); }
.checkout-recovery a { color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.checkout-unified #checkoutRecovery { flex-shrink: 0; margin: 10px 0 0; font-size: 12px; }
#checkoutRecoveryNotice { margin: 18px auto; width: min(1120px, calc(100% - 32px)); }

/* Cart header and footer never take part in the item-list scrolling area. */
.drawer { height: 100dvh; width: min(470px, 100%); padding: 0; overflow: hidden; }
.drawer-head { padding: 16px 20px 12px; }
.drawer-head h2 { font-size: 26px; }
.drawer-head #close { width: 44px; height: 44px; }
.drawer-scroll { padding: 0 20px 16px; min-height: 0; scroll-padding-bottom: 16px; }
.drawer-footer { padding: 12px 20px calc(14px + env(safe-area-inset-bottom)); }
.drawer-total { margin-bottom: 8px; }
.drawer-total strong { font-size: 23px; }
.cart-order-section { margin: 10px 0; }
.cart-order-section > .cart-section-title { display: none; }
.cart-main-row { gap: 10px; padding: 10px 0; }
.cart-item-copy b { overflow-wrap: anywhere; line-height: 1.35; font-size: 14px; }
.cart-item-copy small { font-size: 12px; }
.cart-qty { gap: 5px; }
.cart-continue { min-height: 40px; padding: 7px 0 !important; margin: 0 !important; border: 0; border-radius: 0 !important; font-size: 12px; font-weight: 500; }
.cart-addons { padding: 0; margin: 10px 0 0; border: 1px solid var(--line); border-radius: 9px; background: var(--milk); }
.cart-addons > summary { display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 11px 12px; cursor: pointer; list-style: none; font-size: 13px; font-weight: 600; color: var(--green); }
.cart-addons > summary::-webkit-details-marker { display: none; }
.cart-addons > summary::after { content: '+'; margin-left: auto; font-size: 20px; line-height: 1; font-weight: 400; }
.cart-addons[open] > summary::after { content: '−'; }
.cart-addons > summary small { font-size: 11px; font-weight: 400; color: var(--muted); }
.cart-addons > .addon-note { margin: 0 12px 6px; font-size: 11px; line-height: 1.45; }
.cart-addons > #addonList { padding: 0 12px; }
.cart-addons > .addon-more { width: calc(100% - 24px); margin: 8px 12px 12px; background: #fff; }
.cart-addons .addon-choice-copy small { display: none; }
.cart-addons .addon-choice button { min-height: 44px; }
.cart-extra { margin-top: 12px; padding-top: 0; }
.cart-extra > summary { min-height: 44px; padding: 10px 0; }
.drawer-footer #checkout { min-height: 48px; font-size: 14px; }
.cart-extra input { min-width: 0; }
.cart-extra .promo button { min-height: 44px; padding-inline: 12px; }

@media (max-width: 900px) {
  .checkout-unified .checkout-box { width: min(760px, 100%); }
  .checkout-unified .checkout-content { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .checkout-unified .checkout-aside { position: static; }
  .checkout-unified #checkoutForm #submitOrder { width: 100%; flex-basis: 100%; }
}
/* Keep feedback above the payment footer when a tablet or rotated phone
   places that action across the toast's horizontal position. */
@media (min-width: 621px) and (max-width: 1100px) {
  body:has(> #checkoutModal.open) > #toast { bottom: calc(104px + env(safe-area-inset-bottom)); }
}
@media (max-width: 620px) {
  body:has(> .modal.open, > .drawer.open) > #toast {
    width: max-content; max-width: calc(100% - 32px); text-align: center;
  }
  body:has(> #drawer.open) > #toast { bottom: calc(136px + env(safe-area-inset-bottom)); }
  body:has(> #checkoutModal.open) > #toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
  #checkoutModal.checkout-unified { padding: 0; align-items: stretch; overflow: hidden; }
  .checkout-unified .checkout-box { width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; padding: 16px 16px calc(12px + env(safe-area-inset-bottom)); }
  .checkout-unified #checkoutTitle { font-size: 24px; margin-bottom: 18px; }
  .checkout-unified #checkoutClose { top: 8px; right: 10px; }
  .checkout-unified .checkout-content { padding-right: 2px; gap: 18px; scrollbar-gutter: auto; }
  .checkout-unified .checkout-main { gap: 16px; }
  .checkout-unified .checkout-panel { gap: 12px; }
  .checkout-unified [data-step-panel="1"] { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .checkout-unified .checkout-panel h3 { font-size: 18px; }
  .checkout-unified label { font-size: 13px; }
  .checkout-unified input, .checkout-unified select, .checkout-unified textarea { min-height: 46px; font-size: 16px; padding: 10px; }
  .checkout-unified .field-help { font-size: 12px; }
  .checkout-unified .compact-date-row { gap: 10px; }
  .checkout-unified .checkout-aside { padding: 14px; }
  .checkout-unified .checkout-paybar { margin-top: 10px; padding-top: 10px; }
  .checkout-unified #checkoutForm #submitOrder { min-height: 48px; font-size: 15px; }
  .checkout-unified .consent { font-size: 12px !important; }
  .checkout-unified .checkout-what-next summary { font-size: 13px; }
  .drawer { width: 100%; }
  .drawer-head { padding: 12px 16px 10px; }
  .drawer-head h2 { font-size: 24px; }
  .drawer-scroll { padding: 0 16px 14px; }
  .drawer-footer { padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); }
  .cart-main-row { grid-template-columns: 48px minmax(0, 1fr); gap: 7px 10px; }
  .cart-main-row .cart-qty { grid-column: 2; justify-self: start; }
  .cart-qty button { min-width: 44px; min-height: 44px; }
  .cart-qty .cart-remove { width: 44px; height: 44px; }
  .cart-continue { min-height: 44px; }
  .cart-addons > summary { flex-wrap: wrap; gap: 4px 8px; }
  .cart-addons .addon-choice { grid-template-columns: 26px minmax(0, 1fr) auto; }
  .cart-addons .addon-choice-price { grid-column: 2; }
  .cart-addons .addon-choice button { grid-column: 3; grid-row: 1 / 3; }
}
/* A phone keeps its touch targets and readable entry text after rotation,
   even when its landscape width is above the portrait breakpoint. */
@media (max-width: 1024px) and (max-height: 430px) {
  .cart-qty button { min-width: 44px; min-height: 44px; }
  .cart-qty .cart-remove { width: 44px; height: 44px; }
  .cart-continue { min-height: 44px; }
  .checkout-unified input,
  .checkout-unified select,
  .checkout-unified textarea { min-height: 44px; font-size: 16px; }
  .checkout-unified #deliveryQuoteCalculate,
  .checkout-unified .unified-promo-controls button { min-height: 44px; }
}
@media (max-width: 359px) {
  .checkout-unified .compact-date-row { grid-template-columns: minmax(0, 1fr); }
  .cart-addons > summary small { display: none; }
}
