/* ==========================================================================
   ORDERING HELPERS + MENU BOOK
   Switched on per business with "features" in config.js. Uses site.css tokens.
   ========================================================================== */

/* ---------- delivery / collection asked up front ---------- */
.howbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 16px 20px; margin-top: -14px; margin-bottom: 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.howbar__q { font-family: var(--display); font-size: 22px; line-height: 1.1; }
.howbar__info { font-size: 14.5px; color: var(--muted); }
.seg--inline { margin: 0; width: 250px; flex: none; }
.seg--inline button { height: 40px; }

/* ---------- "in your order" marks on menu cards ---------- */
.dish { cursor: pointer; }
.dish .plus { border: 0; }
.dish.is-in { border-color: var(--accent); }
.dish__n { display: inline-block; margin-left: 10px; font-style: normal; font-size: 12px; font-weight: 700; letter-spacing: .04em; padding: 3px 9px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); vertical-align: 2px; }

/* ---------- the photo that flies into the basket ---------- */
.fly { position: fixed; z-index: 300; pointer-events: none; object-fit: cover; border-radius: 12px; background: var(--accent); box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }

/* ---------- basket bar on every screen size ---------- */
.cartbar--all.is-on { display: block; }
.cartbar--all { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px; box-shadow: 0 24px 60px -18px rgba(0, 0, 0, .45); }
.cartbar--all .btn { box-shadow: none; }
@media (min-width: 921px) { .cartbar--all { left: 50%; right: auto; bottom: 22px; width: min(540px, calc(100vw - 40px)); transform: translateX(-50%); } }
.prog { display: grid; gap: 7px; margin: 2px 4px 12px; font-size: 13.5px; font-weight: 500; }
.prog i { display: block; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.prog b { display: block; height: 100%; border-radius: 3px; background: var(--accent); transition: width .5s var(--ease); }
.prog.is-done span { color: var(--ok); font-weight: 700; }
.prog.is-done b { background: var(--ok); }
.cartbar__prog:empty { display: none; }

/* ---------- checkout steps ---------- */
.osteps { list-style: none; display: flex; gap: 8px; align-items: center; margin: 14px 0 4px; padding: 0; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.osteps li { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.osteps li + li::before { content: ""; width: 22px; height: 1px; background: var(--line); }
.osteps b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); font-size: 11px; }
.osteps li.is-on { color: var(--text); }
.osteps li.is-on b { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ---------- suggestions in the basket ---------- */
.pair { margin: 20px 0 4px; }
.pair__title { font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.pair__item { display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 8px 10px 8px 8px; margin-bottom: 8px; border: 1px dashed var(--line); border-radius: var(--r); transition: border-color .2s, background .2s; }
.pair__item:hover { border-color: var(--accent); background: var(--accent-soft); }
.pair__item img { width: 48px; height: 48px; object-fit: cover; border-radius: calc(var(--r) * .6); }
.pair__item b { display: block; font-weight: 600; font-size: 14.5px; line-height: 1.25; }
.pair__item small { color: var(--muted); font-size: 13px; }
.pair__add { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); }
.pair__add svg { width: 14px; height: 14px; }

/* ---------- cards / book switch ---------- */
.viewsw { display: inline-flex; flex: none; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.viewsw button { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); transition: all .2s; }
.viewsw button svg { width: 15px; height: 15px; }
.viewsw button.is-on { background: var(--accent); color: var(--accent-ink); }

/* ---------- pay online (demo mode) ---------- */
.paydlg { width: min(400px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: var(--r-lg); background: var(--surface); color: var(--text); box-shadow: 0 40px 90px -20px rgba(0, 0, 0, .5); }
.paydlg::backdrop { background: rgba(20, 14, 8, .55); backdrop-filter: blur(3px); }
.paydlg__in { position: relative; padding: 30px 26px 24px; text-align: center; overflow: hidden; }
.paydlg__to { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0; }
.paydlg__amt { font-family: var(--display); font-size: 54px; line-height: 1.1; margin: 6px 0 20px; }
.paydlg__card { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; text-align: left; padding: 16px 18px; margin-bottom: 18px; border-radius: 14px; color: #fff; background: linear-gradient(135deg, #2b2622, #55473a); }
.paydlg__card span { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; opacity: .7; }
.paydlg__card i { font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, .18); align-self: start; }
.paydlg__card b { grid-column: 1 / -1; font-size: 19px; font-weight: 500; letter-spacing: .1em; font-variant-numeric: tabular-nums; }
.paydlg__cancel { display: block; margin: 12px auto 0; font-size: 14px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.paydlg__note { font-size: 12.5px; line-height: 1.5; color: var(--muted); margin: 16px 0 0; }

/* ---------- "your order is on the go" bar ---------- */
.trackbar { position: fixed; left: 20px; bottom: 20px; z-index: 70; display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; border-radius: 999px; background: var(--text); color: var(--bg); box-shadow: 0 18px 40px -14px rgba(0, 0, 0, .5); font-size: 13.5px; text-decoration: none; }
.trackbar i { width: 9px; height: 9px; border-radius: 50%; background: #4ad08a; flex: none; animation: tbPulse 1.8s ease-out infinite; }
.trackbar b { display: block; font-weight: 700; }
.trackbar span { line-height: 1.3; opacity: .92; }
.trackbar em { font-style: normal; font-weight: 700; padding: 8px 14px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); }
body:has(.cartbar.is-on) .trackbar { bottom: 112px; }
@keyframes tbPulse { 0% { box-shadow: 0 0 0 0 rgba(74, 208, 138, .6); } 100% { box-shadow: 0 0 0 12px rgba(74, 208, 138, 0); } }

@media (max-width: 920px) {
  .howbar { margin-top: 0; }
  .seg--inline { width: 100%; }
  .trackbar { left: 12px; right: 12px; bottom: 12px; justify-content: space-between; }
  .viewsw button span { display: none; }
  .viewsw button { padding: 0 12px; }
  .osteps { gap: 6px; font-size: 11px; letter-spacing: .06em; }
  .osteps li + li::before { width: 12px; }
}

/* stepper on the dish: the + becomes - 1 + right where you tapped */
.dish.is-in .plus { display: none; }
.dish__step { position: absolute; right: -8px; bottom: -8px; display: inline-flex; align-items: center; height: 40px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px rgba(0, 0, 0, .3); }
.dish__step button { width: 38px; height: 40px; border: 0; background: none; color: inherit; font: 800 20px/1 var(--sans); cursor: pointer; }
.dish__step b { min-width: 16px; text-align: center; font-size: 15px; }
.tips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tip { min-height: 46px; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--text); font: 700 15px/1 var(--sans); cursor: pointer; }
.tip.is-on { border-color: var(--accent); background: var(--accent-soft); }
.step-title small { font-weight: 400; font-size: 13px; color: var(--muted); }
/* phones: dishes first */
@media (max-width: 640px) {
  #menu .head p:not(.eyebrow), #menu .head .eyebrow { display: none; }
  #menu .head { margin-bottom: 12px; }
  .howbar { padding: 12px 14px; margin-bottom: 12px; gap: 8px 12px; }
  .howbar__q { font-size: 17px; }
  .howbar__info { display: none; }
}

.howbar__closed { flex-basis: 100%; margin: 0; color: var(--accent); font-size: 14px; font-weight: 700; line-height: 1.35; }
