/* Styles for the item-customization modal (modal.js). Mobile-first bottom-sheet → centered card. Reuses styles.css tokens. */

/* ---- backdrop ---- */
.gy-modal-root {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(22, 32, 58, .55);
}

/* ---- sheet / dialog ---- */
.gy-sheet {
  width: 100%; max-height: 92dvh;
  display: flex; flex-direction: column;
  background: var(--c-surface); color: var(--c-ink);
  border-radius: var(--r-3) var(--r-3) 0 0;
  box-shadow: var(--e-3);
  overflow: hidden;
}

/* centered card on wider screens */
@media (min-width: 481px) {
  .gy-modal-root { align-items: center; padding: var(--s-4); }
  .gy-sheet { max-width: 480px; max-height: 88vh; border-radius: var(--r-3); }
}

/* entrance animation only when motion is welcome */
@media (prefers-reduced-motion: no-preference) {
  .gy-modal-root { animation: gy-fade var(--m-base) var(--m-ease); }
  .gy-sheet { animation: gy-rise var(--m-base) var(--m-ease); }
}
@keyframes gy-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes gy-rise { from { transform: translateY(16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ---- header (sticky within the scroll area) ---- */
.gy-modal-head {
  position: sticky; top: 0; z-index: 1;
  display: flex; align-items: flex-start; gap: var(--s-3);
  padding: var(--s-4); background: var(--c-surface);
  border-bottom: 1px solid var(--c-line);
}
.gy-modal-title { margin: 0; flex: 1; font-size: var(--t-xl); }
.gy-modal-x {
  appearance: none; flex: none; cursor: pointer;
  width: 44px; height: 44px; min-width: 44px; min-height: 44px;
  border: 1px solid var(--c-line); border-radius: var(--r-pill);
  background: var(--c-surface); color: var(--c-ink);
  font-size: var(--t-lg); line-height: 1; display: grid; place-items: center;
}
.gy-modal-x:hover { background: var(--c-bg); }
.gy-modal-x:focus-visible { outline: 3px solid var(--c-brand); outline-offset: 2px; }

/* ---- body (scrolls) ---- */
.gy-modal-body {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: var(--s-4);
}
.gy-modal-desc { margin: 0 0 var(--s-3); font-size: var(--t-sm); }
.gy-modal-base { margin: 0 0 var(--s-4); }

/* ---- modifier groups ---- */
.gy-group { border: 0; margin: 0 0 var(--s-5); padding: 0; min-width: 0; }
.gy-group-legend {
  width: 100%; padding: 0 0 var(--s-2);
  display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap;
}
.gy-group-name { font-weight: 700; font-size: var(--t-md); }
.gy-group-hint { font-weight: 700; }

/* option rows = real labels wrapping real inputs */
.gy-opt {
  display: flex; align-items: center; gap: var(--s-3);
  min-height: 44px; padding: var(--s-2) var(--s-3);
  border: 1px solid var(--c-line); border-radius: var(--r-2);
  background: var(--c-surface); cursor: pointer;
}
.gy-opt + .gy-opt { margin-top: var(--s-2); }
.gy-opt:hover { border-color: var(--c-brand); }
.gy-opt:focus-within { outline: 3px solid var(--c-brand); outline-offset: 1px; }
.gy-opt input {
  flex: none; width: 22px; height: 22px; margin: 0;
  accent-color: var(--c-brand); cursor: pointer;
}
.gy-opt-name { flex: 1; min-width: 0; }
.gy-opt-price { color: var(--c-ink-soft); white-space: nowrap; }
.gy-opt.is-disabled { opacity: .55; cursor: not-allowed; }
.gy-opt.is-disabled:hover { border-color: var(--c-line); }
.gy-opt.is-disabled input { cursor: not-allowed; }
.gy-opt-86 { white-space: nowrap; }

/* ---- quantity stepper ---- */
.gy-qty {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  padding-top: var(--s-2);
}
.gy-qty-label { font-weight: 700; }
.gy-qty-ctrl { display: flex; align-items: center; gap: var(--s-2); }
.gy-step {
  appearance: none; cursor: pointer;
  width: 44px; height: 44px; min-width: 44px; min-height: 44px;
  border: 1px solid var(--c-line); border-radius: var(--r-pill);
  background: var(--c-surface); color: var(--c-ink);
  font-size: var(--t-lg); line-height: 1; display: grid; place-items: center;
}
.gy-step:hover:not([disabled]) { background: var(--c-bg); border-color: var(--c-brand); }
.gy-step:focus-visible { outline: 3px solid var(--c-brand); outline-offset: 2px; }
.gy-step[disabled] { opacity: .4; cursor: not-allowed; }
.gy-qty-val {
  min-width: 2ch; text-align: center; font-weight: 700;
  font-variant-numeric: tabular-nums; font-size: var(--t-lg);
}

/* ---- footer (sticky CTA) ---- */
.gy-modal-foot {
  position: sticky; bottom: 0;
  padding: var(--s-3) var(--s-4);
  padding-bottom: calc(var(--s-3) + env(safe-area-inset-bottom));
  background: var(--c-surface); border-top: 1px solid var(--c-line);
  box-shadow: var(--e-2);
}
.gy-cta { min-height: 48px; font-size: var(--t-md); }
/* brand bg + white text already passes AA (4.97:1); disabled handled by .btn[disabled] */

/* visually-hidden live region for screen-reader announcements */
.gy-sr {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* REV: star-rating input (radios styled as stars). Native radios keep it keyboard + SR accessible. */
.starpick { border: 0; margin: 0; padding: 0; }
.starpick legend { font-weight: 600; margin-bottom: var(--s-2); padding: 0; }
.starpick-row { display: flex; gap: 2px; }
.starpick-opt {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; cursor: pointer; font-size: 30px; line-height: 1;
  color: var(--c-line); transition: color .12s ease; user-select: none;
}
.starpick-opt input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.starpick-opt.on { color: #f5a623; }              /* filled up to the chosen star */
.starpick-opt input:focus-visible + span { outline: 2px solid var(--c-focus, #1558d6); outline-offset: 2px; border-radius: 4px; }
.rateform { margin-top: var(--s-3); }
.rated-note { color: #f5a623; font-weight: 700; }

/* ---- address-based delivery (replaces the beach pin-drop) ---- */
/* address summary card (checkout + account) */
.addr-summary { display: flex; align-items: center; gap: var(--s-3); text-align: left; color: inherit; text-decoration: none; }
.addr-summary:hover { text-decoration: none; }
.addr-summary .grow { min-width: 0; }
.addr-summary-line { overflow: hidden; text-overflow: ellipsis; }
.addr-row { display: flex; align-items: center; gap: var(--s-3); }
.addr-row .grow { min-width: 0; }
.addr-row .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* address form: city / state / zip on one row */
.row2 { display: flex; gap: var(--s-3); flex-wrap: wrap; }
.row2 .field { margin: 0; }
.field-xs { width: 68px; flex: 0 0 68px; }
.field-sm { width: 96px; flex: 0 0 96px; }
.section-h { font-size: var(--t-lg); margin: 0 0 var(--s-2); }

/* checkout page: keep it a comfortable centered width on wide desktops */
@media (min-width: 720px) { .cartwrap { max-width: 940px; margin-inline: auto; width: 100%; } }

/* transparent fee breakdown at checkout */
.ordersum { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-3) 0; border-top: 1px solid var(--c-line); font-size: var(--t-sm); }
.ordersum .between span:last-child { font-weight: 600; }
.ordersum-total { margin-top: var(--s-2); padding-top: var(--s-3); border-top: 1px solid var(--c-line); font-size: var(--t-md); }
.ordersum-total .price { font-size: var(--t-lg); }

/* outline button variant (secondary CTA, e.g. "Add a delivery address") */
.btn-outline {
  background: var(--c-surface); color: var(--c-brand-ink);
  border: 1.5px solid var(--c-brand); box-shadow: none;
}
.btn-outline:hover { background: #f0faf9; }

/* =====================================================================
   Restaurant "store" page — DoorDash/Grubhub-informed desktop layout:
   wide hero · sticky scrollspy category nav · 2-col menu cards ·
   persistent sticky order rail (desktop) / view-order bar (mobile).
   ===================================================================== */
.store { --appbar-h: 64px; display: flex; flex-direction: column; gap: var(--s-4); padding-bottom: 76px; }
@media (min-width: 900px) { .store { padding-bottom: 0; } }

/* hero */
.store-hero {
  position: relative; height: 190px; border-radius: var(--r-3); overflow: hidden;
  background: linear-gradient(135deg, var(--c-brand), var(--c-brand-2));
}
.store-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.store-hero .banner-emoji { width: 48px; height: 48px; font-size: 26px; }
.store-head h1 { margin: 0 0 var(--s-2); }
.store-head .ratingrow { font-size: var(--t-md); margin-bottom: var(--s-2); }
.store-desc { margin: 0 0 var(--s-3); max-width: 68ch; color: var(--c-ink); font-size: var(--t-md); line-height: 1.55; }
/* gallery sits full store-width on the restaurant page */
.store > .gallery { margin: 0; }
.gallery:focus-visible { outline: 2px solid var(--c-brand); outline-offset: 3px; border-radius: var(--r-2); }
@media (min-width: 900px) { .store > .gallery .gallery-img { width: 176px; height: 120px; } }
.store-trust {
  display: inline-flex; flex-wrap: wrap; gap: 6px 10px; font-size: var(--t-sm); font-weight: 600;
  color: var(--c-brand-ink); background: #eef8f7; border: 1px solid #d5edeb; border-radius: var(--r-pill);
  padding: 6px 12px;
}

/* sticky category nav (scrollspy) */
.catnav {
  position: sticky; top: var(--appbar-h); z-index: 8; background: var(--c-bg);
  margin: 0 calc(var(--s-4) * -1); padding: var(--s-2) var(--s-4);
  border-bottom: 1px solid var(--c-line);
}
.catnav-inner { display: flex; gap: var(--s-2); overflow-x: auto; scrollbar-width: none; }
.catnav-inner::-webkit-scrollbar { display: none; }
.catpill {
  flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--s-4);
  border-radius: var(--r-pill); border: 1px solid var(--c-line); background: var(--c-surface);
  color: var(--c-ink-soft); font-weight: 600; font-size: var(--t-sm); text-decoration: none;
  white-space: nowrap; transition: background var(--m-fast), color var(--m-fast), border-color var(--m-fast);
}
.catpill:hover { border-color: var(--c-brand); color: var(--c-brand-ink); }
.catpill.on { background: var(--c-brand); border-color: var(--c-brand); color: #fff; }
.catpill:focus-visible { outline: 2px solid var(--c-brand); outline-offset: 2px; }

/* body: menu column + order rail */
.store-body { display: grid; grid-template-columns: 1fr; gap: var(--s-5); align-items: start; }
.menu-col { display: flex; flex-direction: column; gap: var(--s-6); min-width: 0; }
.menu-section { scroll-margin-top: calc(var(--appbar-h) + 56px); }
.menu-section-h { font-size: var(--t-xl); margin: 0 0 var(--s-4); }
.menu-grid { display: grid; grid-template-columns: 1fr; gap: var(--s-3); }

/* menu item card: text-left, photo + add button right */
.mcard {
  display: grid; grid-template-columns: 1fr auto; gap: var(--s-4); align-items: stretch;
  padding: var(--s-4); background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--r-3); box-shadow: var(--e-1);
  transition: box-shadow var(--m-fast) var(--m-ease), transform var(--m-fast) var(--m-ease);
}
.mcard:hover { box-shadow: var(--e-2); transform: translateY(-2px); }
.mcard.unavail { opacity: .6; }
.mcard-body { min-width: 0; display: flex; flex-direction: column; }
.mcard-name { font-size: var(--t-md); }
.mcard-desc {
  margin: var(--s-1) 0 0; font-size: var(--t-sm); overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.mcard-price { margin-top: auto; padding-top: var(--s-2); font-weight: 700; }
.mcard-media { position: relative; flex: none; width: 104px; height: 104px; }
.mcard-img { width: 104px; height: 104px; border-radius: var(--r-2); object-fit: cover; background: var(--c-line); display: block; }
.mcard-add {
  position: absolute; right: -8px; bottom: -8px; width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid var(--c-surface); background: var(--c-surface); color: var(--c-accent-ink);
  font-size: 24px; line-height: 1; cursor: pointer; box-shadow: var(--e-2);
  display: grid; place-items: center; transition: transform var(--m-fast), background var(--m-fast), color var(--m-fast);
}
.mcard-add:hover { background: var(--c-accent); color: #fff; }
.mcard-add:focus-visible { outline: 2px solid var(--c-brand); outline-offset: 2px; }
.mcard-add.added { background: var(--c-ok); color: #fff; transform: scale(1.1); }

/* order rail (desktop) */
.order-rail { display: none; }
.rail-card { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-3); box-shadow: var(--e-1); padding: var(--s-4); }
.rail-h { margin: 0 0 var(--s-3); font-size: var(--t-lg); }
.rail-empty { margin: 0; font-size: var(--t-sm); }
.rail-line { display: grid; grid-template-columns: 24px 1fr auto; gap: var(--s-2); align-items: baseline; padding: var(--s-2) 0; border-bottom: 1px solid var(--c-line); font-size: var(--t-sm); }
.rail-qty { color: var(--c-brand-ink); font-weight: 700; }
.rail-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-subtotal { margin: var(--s-3) 0; }

/* view-order bar (mobile, fixed bottom) */
.vieworder-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9; padding: var(--s-3) var(--s-4); pointer-events: none; }
.vieworder-bar:empty { display: none; }
.vieworder-btn {
  display: flex; align-items: center; gap: var(--s-3); max-width: 680px; margin: 0 auto;
  pointer-events: auto; box-shadow: var(--e-3);
}
.vieworder-n { background: rgba(255,255,255,.25); border-radius: var(--r-pill); min-width: 26px; height: 26px; display: grid; place-items: center; font-weight: 700; }
.vieworder-sub { margin-left: auto; font-weight: 700; }

@media (min-width: 900px) {
  .store-hero { height: 260px; }
  .store-body { grid-template-columns: minmax(0, 1fr) 340px; }
  .menu-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--s-4); }
  .order-rail { display: block; position: sticky; top: calc(var(--appbar-h) + 60px); align-self: start; }
  .vieworder-bar { display: none; }
  .catnav { top: var(--appbar-h); }
}

/* ---- full site header (address in the app bar) ---- */
.appbar .brand { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; flex: none; }
.hdr-addr {
  display: flex; align-items: center; gap: 6px; min-width: 0; max-width: 260px;
  margin-left: var(--s-2); padding: 6px 10px; border-radius: var(--r-pill);
  color: var(--c-ink); text-decoration: none;
}
.hdr-addr:hover { background: var(--c-bg); }
.hdr-addr:focus-visible { outline: 2px solid var(--c-brand); outline-offset: 2px; }
.hdr-addr-ic { font-size: 16px; flex: none; }
.hdr-addr-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.hdr-addr-label { font-size: 10px; text-transform: uppercase; letter-spacing: .04em; color: var(--c-ink-soft); }
.hdr-addr-line { font-size: var(--t-sm); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hdr-addr-chev { color: var(--c-ink-soft); flex: none; }
@media (max-width: 560px) {
  .hdr-addr { max-width: 128px; margin-left: 0; }
  .hdr-addr-chev { display: none; }
  .brand-text { display: none; }
}

/* ---- skip-to-content link (first focusable element on every surface) ---- */
.skip-link {
  position: absolute; left: var(--s-3); top: -64px; z-index: 200;
  background: var(--c-brand); color: #fff; padding: var(--s-2) var(--s-4);
  border-radius: var(--r-2); font-weight: 700; text-decoration: none;
  transition: top var(--m-fast) var(--m-ease);
}
.skip-link:focus { top: var(--s-3); outline: 3px solid #fff; outline-offset: 2px; }
/* heading receives focus on SPA navigation (F004) — moved programmatically, so no distracting ring */
.main h1:focus { outline: none; }

/* ---- static content / legal pages ---- */
.content { max-width: 760px; margin-inline: auto; padding: var(--s-5) 0 var(--s-6); }
.content h1 { margin-bottom: var(--s-4); }
.content h2 { margin: var(--s-6) 0 var(--s-2); font-size: var(--t-lg); }
.content p, .content li { color: var(--c-ink-soft); line-height: 1.7; }
.content-lead { font-size: var(--t-lg); color: var(--c-ink) !important; }
.content ul { padding-left: var(--s-5); display: flex; flex-direction: column; gap: var(--s-2); }
.content a:not(.btn) { color: var(--c-brand-ink); }
.content-note { background: #eef8f7; border-color: #d5edeb; }
.content-note strong { color: var(--c-brand-ink); }

/* ---- landing page ---- */
.lp-hero { display: grid; grid-template-columns: 1fr; gap: var(--s-5); align-items: center; padding: var(--s-5) 0 var(--s-6); }
.lp-eyebrow { display: inline-block; font-weight: 700; font-size: var(--t-sm); color: var(--c-brand-ink); background: #eef8f7; padding: 6px 12px; border-radius: var(--r-pill); margin-bottom: var(--s-3); }
.lp-hero h1 { font-size: clamp(2rem, 6vw, 3.2rem); line-height: 1.05; margin: 0 0 var(--s-3); }
.lp-sub { font-size: var(--t-lg); color: var(--c-ink-soft); max-width: 46ch; margin: 0 0 var(--s-4); }
.lp-cta { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-bottom: var(--s-4); }
.lp-trust { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); padding: 0; margin: 0; font-size: var(--t-sm); font-weight: 600; color: var(--c-ink); }
.lp-hero-art {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); font-size: clamp(48px, 14vw, 96px);
  place-items: center; padding: var(--s-5); border-radius: var(--r-3);
  background: linear-gradient(135deg, var(--c-brand), var(--c-brand-2));
}
.lp-section { padding: var(--s-6) 0; }
.lp-section > h2 { margin-bottom: var(--s-5); }
.lp-features { display: grid; grid-template-columns: 1fr; gap: var(--s-4); }
.lp-feature { text-align: left; }
.lp-feature .lp-ic { font-size: 34px; margin-bottom: var(--s-2); }
.lp-feature h3 { margin: 0 0 var(--s-1); }
.lp-feature p { margin: 0; }
.lp-steps { display: grid; grid-template-columns: 1fr; gap: var(--s-4); max-width: 720px; margin: 0 auto; }
.lp-step { display: flex; gap: var(--s-4); align-items: flex-start; }
.lp-num { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--c-brand); color: #fff; font-weight: 800; display: grid; place-items: center; }
.lp-step h3 { margin: 0 0 var(--s-1); }
.lp-step p { margin: 0; }
.lp-band { max-width: 560px; margin: 0 auto; }
.lp-surfaces-h { color: var(--c-ink-soft); font-weight: 700; margin-bottom: var(--s-3); }
.lp-surfaces { display: flex; flex-wrap: wrap; gap: var(--s-3); justify-content: center; }
@media (min-width: 820px) {
  .lp-hero { grid-template-columns: 1.2fr 1fr; gap: var(--s-7); padding: var(--s-7) 0; }
  .lp-features { grid-template-columns: repeat(3, 1fr); }
}

/* ---- home search ---- */
.searchbar { position: relative; }
.searchbar-ic { position: absolute; left: var(--s-4); top: 50%; transform: translateY(-50%); font-size: 18px; pointer-events: none; }
.searchbar input {
  width: 100%; font: inherit; padding: var(--s-3) var(--s-4) var(--s-3) 44px; min-height: 48px;
  border: 1px solid var(--c-line); border-radius: var(--r-pill); background: var(--c-surface);
  color: var(--c-ink); box-shadow: var(--e-1);
}
.searchbar input:focus { outline: 3px solid var(--c-brand); outline-offset: 1px; border-color: var(--c-brand); }
.results-count { margin: 0 0 var(--s-2); font-size: var(--t-sm); }

/* ---- operational-surface header (restaurant / courier / admin) ---- */
.ops-appbar .brand { color: var(--c-brand-ink); font-weight: 800; }
.ops-role {
  display: inline-flex; align-items: center; margin-left: var(--s-2); padding: 3px var(--s-3);
  border-radius: var(--r-pill); background: #eef8f7; color: var(--c-brand-ink);
  font-size: var(--t-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}
.ops-user { color: var(--c-ink-soft); font-size: var(--t-sm); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 560px) { .ops-user { display: none; } }
.auth-wrap { padding-top: var(--s-5); }

/* console grids: single column on phones → multi-column cards on desktop (F007) */
.qgrid { display: grid; gap: var(--s-3); grid-template-columns: 1fr; }
.qgrid .qcard + .qcard { margin-top: 0; }
@media (min-width: 760px) { .qgrid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); } }

/* ---- site footer ---- */
.site-footer { border-top: 1px solid var(--c-line); background: var(--c-surface); margin-top: var(--s-7); }
.footer-inner { padding: var(--s-6) var(--s-4) var(--s-5); display: grid; grid-template-columns: 1fr; gap: var(--s-5); }
.footer-brand .brand { color: var(--c-brand-ink); font-weight: 800; font-size: var(--t-lg); margin-bottom: var(--s-2); }
.footer-brand p { max-width: 52ch; margin: 0; font-size: var(--t-sm); }
.footer-col { display: flex; flex-direction: column; gap: var(--s-2); align-items: flex-start; }
.footer-col h4 { margin: 0 0 var(--s-1); font-size: var(--t-sm); color: var(--c-ink); }
.footer-col a { color: var(--c-ink-soft); text-decoration: none; font-size: var(--t-sm); min-height: 24px; }
.footer-col a:hover { color: var(--c-brand-ink); text-decoration: underline; }
.footer-bottom {
  border-top: 1px solid var(--c-line); padding: var(--s-4);
  display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); justify-content: space-between;
  font-size: var(--t-xs); color: var(--c-ink-soft);
}
.footer-trust { font-weight: 600; color: var(--c-brand-ink); }
@media (min-width: 760px) { .footer-inner { grid-template-columns: 2.2fr 1fr 1fr 1fr; gap: var(--s-6); } }
