/* Ordering: the order page (/order/) and checkout (/order/checkout/).
   Loaded after styles.css on those two pages only. Layout:
   - phones (up to 720px): one column, sticky category chips, the basket and dish options slide up as sheets;
   - tablets (721–1099px): dishes beside a sticky basket, chips above the dishes;
   - desktop (1100px+): category list | dishes | basket. */

body[data-page="order"], body[data-page="order-checkout"] { --gutter: 40px; --top: 90px; }
@media (max-width: 1160px) { body[data-page="order"], body[data-page="order-checkout"] { --gutter: 28px; } }
@media (max-width: 900px) { body[data-page="order"], body[data-page="order-checkout"] { --gutter: 24px; --top: 76px; } }
@media (max-width: 620px) { body[data-page="order"], body[data-page="order-checkout"] { --gutter: 18px; --top: 72px; } }

/* The page is the order button, so the header doesn't need one. */
body[data-page="order"] .nav-order, body[data-page="order-checkout"] .nav-order { display: none; }
@media (max-width: 900px) {
  body[data-page="order"] .nav-toggle, body[data-page="order-checkout"] .nav-toggle { margin-left: auto; }
}

/* ---- Page layout ------------------------------------------------------------------------------ */

.order-shop { display: grid; gap: 18px; padding-top: 26px; grid-template-columns: minmax(0, 1fr); }
.order-shop > * { min-width: 0; }

@media (min-width: 721px) {
  .order-shop { grid-template-columns: minmax(0, 1fr) 320px; column-gap: 28px;
    grid-template-areas: "intro basket" "bar basket" "again basket" "toolbar basket" "notes basket" "menu basket"; }
  .order-intro { grid-area: intro; }
  .order-bar { grid-area: bar; }
  .order-again { grid-area: again; }
  .menu-toolbar { grid-area: toolbar; }
  .menu-notes { grid-area: notes; }
  .order-menu { grid-area: menu; }
  .basket-panel { grid-area: basket; }
}
@media (min-width: 1100px) {
  .order-shop { grid-template-columns: 172px minmax(0, 1fr) 336px; column-gap: 32px;
    grid-template-areas: "intro intro basket" "bar bar basket" "again again basket" "nav search basket" "nav notes basket" "nav menu basket"; }
  .order-shop > .menu-toolbar { display: contents; }
  .menu-search { grid-area: search; }
  .category-nav { grid-area: nav; }
}

/* ---- Intro and the collection/delivery bar --------------------------------------------------- */

.order-intro h1 { margin: 0 0 6px; font-size: 34px; }
.order-intro-lede { margin: 0; color: var(--ink-soft); font-size: 14px; }
.order-offer-line { display: inline-block; margin: 12px 0 0; padding: 6px 12px; border-radius: 999px; background: var(--accent-soft); color: #5e4a22; font-size: 13px; line-height: 1.45; }
.order-offer-line strong { font-weight: 700; }

.order-bar { display: grid; gap: 10px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.order-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 0; padding: 4px; min-width: 0; border: 0; border-radius: 11px; background: var(--paper-deep); }
.order-mode-option { position: relative; display: flex; align-items: center; min-height: 50px; padding: 6px 12px; border-radius: 8px; cursor: pointer; }
.order-mode-option input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.order-mode-option strong { display: block; font-size: 14px; font-weight: 600; line-height: 1.3; }
.order-mode-option small { display: block; color: var(--ink-soft); font-size: 11px; line-height: 1.35; }
.order-mode-option:has(input:checked) { background: var(--surface); box-shadow: 0 1px 3px rgba(36, 35, 33, .14); }
.order-mode-option:has(input:focus-visible) { outline: 3px solid #96722e; outline-offset: 1px; }
.order-mode-option:has(input:disabled) { opacity: .55; cursor: not-allowed; }
.order-mode-option:has(input:disabled) input { cursor: not-allowed; }

.order-when.field-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.order-when .field { flex: 1 1 150px; gap: 0; }
.order-when select, .order-when input:not([type="radio"]):not([type="checkbox"]) { min-height: 44px; padding-block: 8px; font-size: 14px; }

.order-status.availability-message { display: flex; align-items: baseline; gap: 8px; padding: 0 2px; border: 0; background: none; color: var(--success); font-size: 12.5px; line-height: 1.5; }
.order-status.availability-message::before { content: ""; flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: currentColor; transform: translateY(-1px); }
.order-status.availability-message.is-unavailable { color: var(--error); background: none; }

.order-address-button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fcfbf8; color: var(--ink); text-align: left; }
.order-address-button:hover { border-color: #cbb88a; }
.order-address-label { flex: 0 0 auto; color: var(--ink-soft); font-size: 12px; }
.order-address-button strong { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 600; }
.order-address-change { flex: 0 0 auto; color: var(--accent-ink); font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

@media (min-width: 1100px) {
  .order-bar { grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); align-items: center; column-gap: 14px;
    grid-template-areas: "mode when" "status status" "address address"; }
  .order-bar > .order-mode { grid-area: mode; }
  .order-bar > .order-when { grid-area: when; }
  .order-bar > .order-status { grid-area: status; }
  .order-bar > .order-address { grid-area: address; }
}

.order-again { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; background: var(--surface); border: 1px solid #e3d4ae; border-radius: 14px; }
.order-again h2 { margin: 0 0 2px; font-family: var(--font-body); font-size: 15px; font-weight: 600; letter-spacing: 0; }
.order-again p { margin: 0; color: var(--ink-soft); font-size: 13px; }
.order-again .button { flex: 0 0 auto; min-height: 42px; padding: 8px 16px; font-size: 13px; }

/* ---- Search and the category bar ------------------------------------------------------------- */

.menu-toolbar { position: sticky; top: var(--top); z-index: 30; display: flex; align-items: center; gap: 8px; margin-inline: calc(-1 * var(--gutter)); padding: 8px var(--gutter); background: var(--paper); box-shadow: 0 10px 12px -12px rgba(0, 0, 0, .3); }
.menu-search-open { display: grid; place-items: center; flex: 0 0 auto; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink); }
.search-icon { position: relative; display: block; width: 15px; height: 15px; }
.search-icon::before { content: ""; position: absolute; left: 0; top: 0; width: 10px; height: 10px; border: 2px solid currentColor; border-radius: 50%; }
.search-icon::after { content: ""; position: absolute; left: 10px; top: 10px; width: 6px; height: 2px; border-radius: 2px; background: currentColor; transform: rotate(45deg); transform-origin: left center; }
.menu-search { display: none; flex: 1 1 auto; align-items: center; gap: 10px; margin: 0; }
.menu-search-field { position: relative; display: block; flex: 1 1 auto; }
.menu-search-field .search-icon { position: absolute; left: 14px; top: 50%; margin-top: -8px; color: var(--ink-soft); pointer-events: none; }
.menu-search input[type="search"] { min-height: 42px; padding: 8px 14px 8px 38px; border-radius: 999px; font-size: 15px; }
.menu-search-cancel { flex: 0 0 auto; padding: 8px 4px; border: 0; background: none; color: var(--accent-ink); font-size: 14px; font-weight: 600; }
.menu-toolbar.is-searching .menu-search { display: flex; }
.menu-toolbar.is-searching .menu-search-open, .menu-toolbar.is-searching .category-nav { display: none; }

.category-nav { position: relative; display: flex; gap: 6px; flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; scroll-padding-inline: 8px; }
.category-nav::-webkit-scrollbar { display: none; }
.category-chip { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 600; white-space: nowrap; }
.category-chip:hover { border-color: #c9b88e; }
.category-chip.is-active { background: var(--charcoal); border-color: var(--charcoal); color: #fff; }

@media (min-width: 1100px) {
  .menu-search { display: flex; }
  .menu-search-open, .menu-search-cancel { display: none; }
  .category-nav { position: sticky; top: calc(var(--top) + 18px); align-self: start; flex-direction: column; gap: 2px; max-height: calc(100vh - var(--top) - 36px); overflow: auto; scrollbar-width: thin; }
  .category-chip { min-height: 38px; padding: 7px 12px; border: 0; border-radius: 8px; background: none; color: var(--ink-soft); font-weight: 500; white-space: normal; line-height: 1.35; }
  .category-chip:hover { background: var(--paper-deep); color: var(--ink); }
  .category-chip.is-active { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
}

.menu-notes:not(:has(:not([hidden]))) { display: none; }
.menu-notes > p { margin: 0; padding: 10px 14px; border-radius: 10px; background: var(--accent-soft); color: #5e4a22; font-size: 13px; }

/* ---- Dishes --------------------------------------------------------------------------------- */

.order-menu { display: grid; gap: 30px; }
.menu-section { scroll-margin-top: calc(var(--top) + 64px); }
.menu-section-title { margin: 0 0 4px; font-size: 26px; }
.menu-section-desc { margin: 0 0 8px; color: var(--ink-soft); font-size: 13px; }
.dish-grid { display: grid; grid-template-columns: minmax(0, 1fr); }
.dish { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.dish-link { display: block; min-width: 0; color: inherit; }
.dish-link:focus-visible { outline-offset: 2px; border-radius: 6px; }
.dish-name { margin: 0 0 3px; font-family: var(--font-body); font-size: 15px; font-weight: 600; letter-spacing: 0; line-height: 1.35; }
.dish-desc { display: -webkit-box; margin: 0 0 6px; overflow: hidden; color: var(--ink-soft); font-size: 13px; line-height: 1.5; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.dish-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0; }
.dish-price { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.dish-hint, .dish-tags { color: var(--ink-soft); font-size: 12px; }
/* The matrix's allergens for the dish as standard (public/assets/allergens.js). */
.dish-allergens { margin: 0 0 6px; color: var(--ink-soft); font-size: 12px; line-height: 1.45; }
.dish-allergens.is-unlisted { color: var(--accent-ink); }
.dish.is-unavailable .dish-name, .dish.is-unavailable .dish-price { color: #8f8a80; }
.dish.is-highlighted { background: var(--accent-soft); box-shadow: 0 0 0 8px var(--accent-soft); border-radius: 4px; }

.dish-add { position: relative; display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 1px solid #d6cdb8; border-radius: 50%; background: var(--surface); color: var(--ink); transition: transform .16s ease, background-color .16s ease; }
.dish-add:hover { background: var(--accent-soft); border-color: #c9b07a; }
.dish-add-icon { position: relative; width: 14px; height: 14px; }
.dish-add-icon::before, .dish-add-icon::after { content: ""; position: absolute; left: 0; top: 6px; width: 14px; height: 2px; border-radius: 2px; background: currentColor; }
.dish-add-icon::after { transform: rotate(90deg); }
.dish-add.has-count { background: var(--accent); border-color: var(--accent); }
.dish-add.is-bumped { transform: scale(1.12); }
.dish-count { position: absolute; top: -6px; right: -6px; display: grid; place-items: center; min-width: 21px; height: 21px; padding: 0 5px; border-radius: 999px; background: var(--charcoal); color: #fff; font-size: 11px; font-weight: 700; }

@media (min-width: 721px) {
  .menu-section-title { font-size: 28px; }
  .dish-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-top: 10px; }
  .dish { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
  .dish:hover { border-color: #d5c69f; }
  .dish.is-highlighted { box-shadow: 0 0 0 3px var(--accent); }
}

.menu-unavailable { padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.menu-unavailable h2 { font-size: 24px; }

/* ---- Basket ---------------------------------------------------------------------------------- */

.basket-panel { display: grid; gap: 14px; align-content: start; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.basket-head { display: flex; align-items: flex-start; gap: 10px; }
.basket-head > div { flex: 1 1 auto; }
.basket-head h2 { margin: 0; font-size: 26px; }
.basket-head h2:focus { outline: none; }
.basket-panel .basket-count-copy { margin: 2px 0 0; color: var(--ink-soft); font-size: 12px !important; }
.basket-panel .basket-columns { display: none; }
.basket-close { display: none; }
.basket-panel .basket-empty { padding: 22px 12px; }
.basket-panel .totals > div { font-size: 13px; }
.basket-panel .totals > div:last-child { font-size: 18px; }
.basket-checkout { width: 100%; }
.basket-panel .helper { font-size: 12px; color: var(--ink-soft); }
.basket-panel .offer-terms { margin-top: -6px; }

@media (min-width: 721px) {
  .basket-panel { position: sticky; top: calc(var(--top) + 18px); align-self: start; max-height: calc(100vh - var(--top) - 36px); overflow-y: auto; scrollbar-width: thin; box-shadow: 0 9px 30px rgba(42, 39, 27, .05); }
}

/* Basket lines (order page and checkout). */
.basket-item { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.basket-item:first-child { padding-top: 0; }
.basket-item:last-child { padding-bottom: 0; border-bottom: 0; }
.basket-item-copy { min-width: 0; padding-top: 2px; }
.basket-item h3 { margin: 0 0 2px; font-family: var(--font-body); font-size: 14px; font-weight: 600; }
.basket-item p { margin: 0; font-size: 12px; color: var(--ink-soft); line-height: 1.45; }
.basket-item-side { display: grid; justify-items: end; gap: 6px; flex: 0 0 auto; }
.basket-item-total { padding-top: 2px; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.basket-item-controls { display: flex; flex-direction: row; align-items: center; gap: 0; border: 1px solid var(--line); border-radius: 999px; background: #fcfbf8; }
.basket-item-controls .basket-stepper { width: 34px; height: 32px; border: 0; border-radius: 999px; background: none; font-size: 17px; }
.basket-item-controls .basket-stepper:hover { background: var(--accent-soft); }
/* At the line limit + stays focusable (aria-disabled) but looks unavailable. */
.basket-item-controls .basket-stepper[aria-disabled="true"] { opacity: .35; cursor: not-allowed; }
.basket-item-controls .basket-stepper[aria-disabled="true"]:hover { background: none; }
.basket-item .basket-item-limit { margin-top: 4px; color: var(--ink); }
/* The line the server refused (a dish no longer available): marked beside the dish, with the reason in words. */
.basket-item[data-line-issue] { padding-left: 10px; border-left: 3px solid var(--error); }
.basket-item .basket-item-issue { margin-top: 4px; color: var(--error); font-weight: 600; }
/* Shown when the browser won't store the basket (it lives only in the open page). */
.basket-storage-note { margin: 10px 0 0; padding: 8px 10px; border-radius: 8px; background: var(--accent-soft); color: var(--ink); }
.basket-item-controls .quantity-pill { min-width: 22px; font-size: 13px; font-variant-numeric: tabular-nums; }

/* ---- Sheets: dish options, delivery address, and (phones) the basket -------------------------- */

/* motion.css gives .page-stack a view-transition name, which makes it its own stacking layer under the sticky
   header (z-index 50), so sheets inside it couldn't cover the header. While a sheet is open the name is dropped,
   and the sheets and their dimmed backdrop sit above everything. */
body.modal-open .page-stack { view-transition-name: none; }

.sheet { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop, .basket-backdrop { position: fixed; inset: 0; background: rgba(25, 25, 25, .5); opacity: 0; transition: opacity .22s ease; }
.sheet.is-open .sheet-backdrop, .basket-backdrop.is-open { opacity: 1; }
.sheet-panel { position: relative; display: flex; flex-direction: column; width: 100%; max-height: 92dvh; background: var(--paper); border-radius: 18px 18px 0 0; box-shadow: 0 -10px 40px rgba(0, 0, 0, .18); transform: translateY(100%); transition: transform .26s cubic-bezier(.22, .68, 0, 1); }
.sheet.is-open .sheet-panel { transform: none; }
.sheet-head { display: flex; align-items: flex-start; gap: 12px; padding: 22px 20px 14px; }
.sheet-head-copy { flex: 1 1 auto; min-width: 0; }
.sheet-head h2 { margin: 0 0 4px; font-size: 27px; }
.sheet-head h2:focus { outline: none; }
.sheet-desc { margin: 0 0 6px; color: var(--ink-soft); font-size: 14px; line-height: 1.55; }
.sheet-price { margin: 0; font-size: 15px; font-weight: 600; }
.sheet-close { position: relative; flex: 0 0 auto; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: var(--paper-deep); color: var(--ink); }
.sheet-close:hover { background: #e2dccd; }
.sheet-close span::before, .sheet-close span::after { content: ""; position: absolute; left: 12px; top: 19px; width: 16px; height: 2px; border-radius: 2px; background: currentColor; transform: rotate(45deg); }
.sheet-close span::after { transform: rotate(-45deg); }
.sheet-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 20px 18px; }
.sheet-foot { display: grid; gap: 8px; padding: 12px 20px max(14px, env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
.sheet-foot-row { display: flex; align-items: center; gap: 12px; }
.sheet-add { flex: 1 1 auto; min-height: 50px; font-size: 15px; }
.sheet-wide-button { width: 100%; }
.sheet-error { margin: 0; color: var(--error); font-size: 13px; }
/* The dish as chosen: its allergens sit beside the Add button and update with every choice. */
.sheet-allergens { margin: 0; color: var(--ink); font-size: 13px; line-height: 1.45; }
.sheet-allergens strong { font-weight: 600; }
.sheet-allergens.is-unlisted { color: var(--accent-ink); }
.sheet-allergens:empty { display: none; }
.sheet-allergen-note { margin: 16px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.5; }
.opt-groups[hidden] + .sheet-allergen-note { margin-top: 0; }
.sheet-error:empty { display: none; }
.address-sheet .field-grid { gap: 14px; }

@media (min-width: 721px) {
  .sheet { align-items: center; padding: 24px; }
  .sheet-panel { width: min(560px, 100%); max-height: min(780px, 88dvh); border-radius: 18px; overflow: hidden; transform: translateY(18px); opacity: 0; transition: transform .22s ease, opacity .22s ease; }
  .sheet.is-open .sheet-panel { transform: none; opacity: 1; }
  .sheet-foot { border-radius: 0 0 18px 18px; }
}

/* Options inside the dish sheet. */
.opt-groups { display: grid; gap: 12px; }
.opt-group { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.opt-group.is-invalid { border-color: var(--error); box-shadow: 0 0 0 1px var(--error); }
.opt-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 0; float: left; }
.opt-head + * { clear: both; }
.opt-title { font-size: 15px; font-weight: 600; }
.opt-badge { flex: 0 0 auto; padding: 2px 9px; border-radius: 999px; background: var(--paper-deep); color: var(--ink-soft); font-size: 11px; font-weight: 600; }
.opt-badge.is-required { background: #f6e6c4; color: #6a4f17; }
.opt-group.is-chosen .opt-badge.is-required { background: #e4efe0; color: var(--success); }
.opt-sub { display: flex; gap: 8px; margin: -4px 0 0; color: var(--ink-soft); font-size: 12px; }
.opt-chosen { color: var(--success); font-weight: 600; }
.opt-list { display: grid; gap: 0; }
.opt { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 6px 2px; border-bottom: 1px solid #efebe2; cursor: pointer; }
.opt:last-child { border-bottom: 0; }
.opt input { margin: 0; }
.opt-name { flex: 1 1 auto; font-size: 14px; }
.opt-name:has(.opt-label) { display: grid; gap: 2px; }
.opt-label { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.opt-tag { padding: 1px 8px; border-radius: 999px; background: #e4efe0; color: var(--success); font-size: 11px; font-weight: 600; line-height: 18px; white-space: nowrap; }
.opt-desc { color: var(--ink-soft); font-size: 12px; line-height: 1.4; }
.opt-price { flex: 0 0 auto; color: var(--ink-soft); font-size: 13px; font-variant-numeric: tabular-nums; }
.opt:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.opt-list.is-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.opt-list.is-pills .opt { position: relative; min-height: 40px; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fcfbf8; }
.opt-list.is-pills .opt input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.opt-list.is-pills .opt:has(input:checked) { background: var(--charcoal); border-color: var(--charcoal); color: #fff; }
.opt-list.is-pills .opt:has(input:focus-visible) { outline: 3px solid #96722e; outline-offset: 2px; }
.opt-clear { justify-self: start; padding: 4px 0; border: 0; background: none; color: var(--accent-ink); font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
details.opt-group > summary { display: grid; gap: 4px; list-style: none; cursor: pointer; }
details.opt-group > summary::-webkit-details-marker { display: none; }
details.opt-group > summary .opt-head { float: none; }
details.opt-group > summary .opt-sub { margin: 0; }
details.opt-group > summary .opt-title::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 10px; border-right: 2px solid var(--ink-soft); border-bottom: 2px solid var(--ink-soft); transform: translateY(-3px) rotate(45deg); transition: transform .18s ease; }
details.opt-group[open] > summary .opt-title::after { transform: translateY(0) rotate(-135deg); }
.opt-fieldset { min-width: 0; margin: 4px 0 0; padding: 0; border: 0; }

.qty-stepper { display: flex; align-items: center; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.qty-stepper button { width: 42px; height: 46px; padding: 0; border: 0; border-radius: 999px; background: none; color: var(--ink); font-size: 20px; }
.qty-stepper button:hover:not(:disabled) { background: var(--accent-soft); }
.qty-stepper output { min-width: 22px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }

/* The basket becomes a sheet on phones. */
.basket-backdrop { z-index: 94; }
@media (max-width: 720px) {
  .basket-panel { position: fixed; left: 0; right: 0; bottom: 0; z-index: 95; max-height: 88dvh; overflow-y: auto; overscroll-behavior: contain; padding: 18px 18px max(16px, env(safe-area-inset-bottom)); border: 0; border-radius: 18px 18px 0 0; box-shadow: 0 -10px 40px rgba(0, 0, 0, .18); transform: translateY(105%); visibility: hidden; transition: transform .26s cubic-bezier(.22, .68, 0, 1), visibility 0s linear .26s; }
  .basket-panel.is-open { transform: none; visibility: visible; transition: transform .26s cubic-bezier(.22, .68, 0, 1), visibility 0s; }
  .basket-close { display: block; }
  .basket-panel .basket-count-badge { display: none; }
  .basket-checkout { position: sticky; bottom: 0; box-shadow: 0 -12px 14px -6px var(--surface); }
  .order-shop { padding-bottom: 76px; }
}

/* ---- Toast ----------------------------------------------------------------------------------- */

.order-toast { position: fixed; left: 0; right: 0; bottom: 24px; z-index: 110; display: flex; align-items: center; justify-content: space-between; gap: 16px; width: max-content; max-width: min(calc(100vw - 32px), 440px); margin: 0 auto; padding: 12px 16px; border-radius: 10px; background: var(--charcoal); color: #fff; font-size: 14px; line-height: 1.4; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); transform: translateY(12px); opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease; }
.order-toast.is-visible { transform: none; opacity: 1; pointer-events: auto; }
.order-toast-action { flex: 0 0 auto; padding: 4px 2px; border: 0; background: none; color: var(--accent); font-weight: 700; }
@media (max-width: 720px) {
  .mobile-basket-bar:not([hidden]) ~ .order-toast { bottom: calc(max(14px, env(safe-area-inset-bottom)) + 76px); }
}

@media (prefers-reduced-motion: reduce) {
  .sheet-panel, .sheet-backdrop, .basket-backdrop, .basket-panel, .order-toast, .dish-add, details.opt-group > summary .opt-title::after { transition: none !important; }
}

/* ---- Checkout -------------------------------------------------------------------------------- */

.checkout-shop { display: grid; gap: 18px; padding-top: 22px; grid-template-columns: minmax(0, 1fr); }
.checkout-shop > * { min-width: 0; }
.checkout-head h1 { margin: 2px 0 0; font-size: 34px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; color: var(--accent-ink); font-size: 14px; font-weight: 600; }
.back-link::before { content: ""; width: 8px; height: 8px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
.checkout-shop #order-checkout-form { display: grid; gap: 14px; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; }
.checkout-card { padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.checkout-card .checkout-step { gap: 14px; }
.checkout-card .checkout-step + .checkout-step { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.checkout-card .checkout-step > legend { margin-bottom: 2px; font-size: 22px; }
.checkout-card .checkout-step.fulfilment-panel { padding: 0; border: 0; }
.checkout-card .field-grid { gap: 14px; }
.checkout-actions .button { width: 100%; min-height: 52px; font-size: 15px; }
.checkout-form .terms-note { margin: 0; }

.notes-toggle > summary { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; color: var(--accent-ink); font-size: 14px; font-weight: 600; cursor: pointer; list-style: none; }
.notes-toggle > summary::-webkit-details-marker { display: none; }
.notes-toggle > summary::before { content: "+"; display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid #d6cdb8; border-radius: 50%; font-size: 15px; line-height: 1; }
.notes-toggle[open] > summary::before { content: "−"; }
.notes-toggle .field { margin-top: 6px; }

.checkout-summary .summary-toggle { display: none; }
.checkout-empty h2 { font-size: 26px; }

@media (min-width: 721px) {
  .checkout-shop { grid-template-columns: minmax(0, 1fr) 340px; column-gap: 28px; grid-template-areas: "head summary" "empty summary" "form summary"; padding-top: 26px; }
  .checkout-head { grid-area: head; }
  .checkout-summary { grid-area: summary; }
  .checkout-empty { grid-area: empty; }
  .checkout-form { grid-area: form; }
  .checkout-card { padding: 22px 24px; }
  .checkout-actions .button { width: auto; min-width: 260px; }
}
@media (max-width: 720px) {
  .checkout-head h1 { font-size: 30px; }
  /* Phones: the order summary comes first, with the dishes folded away until asked for. */
  .checkout-summary.basket-panel { position: static; transform: none; visibility: visible; max-height: none; padding: 16px; border: 1px solid var(--line); border-radius: 14px; box-shadow: none; transition: none; }
  .checkout-summary .summary-toggle { display: inline-flex; align-self: center; min-height: 36px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fcfbf8; color: var(--ink); font-size: 13px; font-weight: 600; }
  .checkout-summary:not(.is-expanded) #checkout-basket-root { display: none; }
  .checkout-summary .basket-head h2 { font-size: 22px; }
  .checkout-shop { padding-bottom: 76px; }
}

/* Checkout before 5pm: the restaurant starts cooking at 5pm; earlier food is from Millers Café (millers.cafe). */
.kitchen-note { display: grid; gap: 8px; margin: 2px 0 0; padding: 14px 16px; border: 1px solid #e3d1a6; border-left: 4px solid var(--accent-ink); border-radius: 12px; background: #fbf5e8; color: var(--ink); font-size: 14px; line-height: 1.55; }
.kitchen-note p { margin: 0; }
.kitchen-note strong { color: var(--charcoal); }
.kitchen-note .nowrap { white-space: nowrap; }
