/* ============================================================
   Delicious · /menu — online ordering (cart bar + drawer)
   Inherits brand vars from ../styles.css. All hidden until
   <body class="ordering-on"> is set by order.js.
   ============================================================ */

/* ---------- Inline add/qty stepper on each menu row: [−] [N] [+] ---------- */
/* Fixed-width slot with the + pinned right. The − and count are ALWAYS in the
   layout (space reserved) and toggled with visibility, not display — so adding to
   the cart never changes the row's width or height. No reflow, no dropped line. */
.mi-add { display: none; }
.ordering-on .mi-add {
  display: inline-flex; align-items: center; justify-content: flex-end; gap: 4px;
  flex: 0 0 auto; align-self: center; margin-left: 12px;
  width: 96px;            /* −(34) + gap + count(18) + gap + +(34) — constant */
}
.mi-add .add-btn, .mi-add .dec-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; flex: 0 0 auto; padding: 0; border-radius: 999px;
  font-family: var(--f-headline); font-size: 22px; line-height: 1;
  background: transparent; color: var(--peach);
  border: 1.5px solid var(--chalk-line); cursor: pointer; -webkit-appearance: none;
  transition: transform .12s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.mi-add .add-btn:hover, .mi-add .dec-btn:hover { border-color: var(--peach); }
.mi-add .add-btn:active, .mi-add .dec-btn:active { transform: scale(.86); }
.mi-add .qn {
  flex: 0 0 auto; min-width: 18px; text-align: center;
  font-family: var(--f-label); font-size: 16px; color: var(--chalk);
}
/* − and count reserve their space always; only become visible once in the cart */
.mi-add .dec-btn, .mi-add .qn { visibility: hidden; }
.mi-add.has-qty .dec-btn, .mi-add.has-qty .qn { visibility: visible; }
.mi-add.has-qty .add-btn { background: var(--mint); color: var(--slate); border-color: var(--mint); }
.mi-add .add-btn.bump { animation: addbump .28s ease; }
@keyframes addbump { 40% { transform: scale(1.28); } 100% { transform: scale(1); } }

/* keep the WhatsApp float clear of the cart bar */
body.cart-open .wa-float { bottom: 88px; transition: bottom .2s ease; }

/* ---------- "you can order here" hint at the top of the menu ---------- */
.order-hint {
  margin: -2px 20px 16px; padding: 9px 14px; border-radius: 10px; text-align: center;
  background: rgba(242,184,125,.10); border: 1px solid rgba(242,184,125,.32);
  color: var(--chalk-dim); font-family: var(--f-body); font-size: 13.5px; line-height: 1.4;
}

/* ---------- Floating cart bar ---------- */
.ord-bar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 60; width: min(560px, calc(100vw - 32px));
  display: flex; align-items: center; gap: 12px;
  padding: 13px 18px; border: 0; border-radius: 14px; cursor: pointer;
  background: var(--peach); color: var(--slate);
  box-shadow: 0 14px 34px rgba(0,0,0,.45);
  font-family: var(--f-label); text-transform: uppercase; letter-spacing: .08em; font-size: 14px;
  animation: barpop .28s ease;
}
@keyframes barpop { from { transform: translate(-50%, 16px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.ord-bar[hidden] { display: none; }
.ord-bar .ob-icon { font-size: 18px; }
.ord-bar .ob-count {
  background: var(--slate); color: var(--peach); border-radius: 999px;
  min-width: 24px; height: 24px; padding: 0 7px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px;
}
.ord-bar .ob-label { flex: 1 1 auto; text-align: left; }
.ord-bar .ob-total { font-family: var(--f-headline); letter-spacing: .02em; font-size: 18px; }

/* ---------- Backdrop + drawer ---------- */
.ord-backdrop {
  position: fixed; inset: 0; z-index: 70; background: rgba(8,10,11,.62);
  backdrop-filter: blur(2px); opacity: 0; transition: opacity .2s ease;
}
.ord-backdrop.show { opacity: 1; }
.ord-backdrop[hidden] { display: none; }

.ord-drawer {
  position: fixed; left: 50%; transform: translateX(-50%) translateY(100%);
  bottom: 0; z-index: 80; width: min(560px, 100vw);
  max-height: 92vh; display: flex; flex-direction: column;
  background: #14181b; border: 1px solid var(--chalk-line); border-bottom: 0;
  border-radius: 18px 18px 0 0; box-shadow: 0 -20px 50px rgba(0,0,0,.5);
  transition: transform .26s cubic-bezier(.2,.8,.2,1);
  padding-bottom: env(safe-area-inset-bottom);
}
.ord-drawer.show { transform: translateX(-50%) translateY(0); }
.ord-drawer[hidden] { display: none; }

.ord-head {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 20px 12px; border-bottom: 1px solid var(--chalk-line);
}
.ord-head h2 { font-family: var(--f-display); color: var(--chalk); font-size: 26px; margin: 0; transform: rotate(-1deg); flex: 1 1 auto; }
.ord-x {
  background: transparent; border: 0; color: var(--chalk-dim); font-size: 22px; cursor: pointer;
  width: 36px; height: 36px; border-radius: 999px; line-height: 1;
}
.ord-x:hover { color: var(--chalk); background: rgba(242,239,230,.08); }

.ord-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 8px 20px 14px; }

/* lines */
.ord-line { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px dotted var(--chalk-line); }
.ord-line .ol-name { flex: 1 1 auto; min-width: 0; font-size: 15px; color: var(--chalk); }
.ord-line .ol-name small { display: block; color: var(--chalk-faint); font-size: 12px; margin-top: 2px; }
.ord-line .ol-price { font-family: var(--f-headline); font-size: 16px; color: var(--peach); white-space: nowrap; min-width: 62px; text-align: right; }
.stepper { display: inline-flex; align-items: center; gap: 0; border: 1px solid var(--chalk-line); border-radius: 999px; }
.stepper button {
  width: 30px; height: 30px; border: 0; background: transparent; color: var(--chalk);
  font-size: 18px; line-height: 1; cursor: pointer; border-radius: 999px;
}
.stepper button:active { background: rgba(242,239,230,.1); }
.stepper .sq { min-width: 22px; text-align: center; font-family: var(--f-label); font-size: 15px; color: var(--chalk); }

.ord-empty { text-align: center; color: var(--chalk-dim); font-family: var(--f-script); font-size: 22px; padding: 36px 0; }

.ord-sub { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 0 4px; }
.ord-sub .os-l { font-family: var(--f-label); text-transform: uppercase; letter-spacing: .14em; font-size: 13px; color: var(--chalk-dim); }
.ord-sub .os-v { font-family: var(--f-headline); font-size: 24px; color: var(--chalk); }
.ord-paynote { font-size: 13px; color: var(--chalk-faint); margin: 2px 0 6px; }

/* form (reuses loyalty-style fields, defined locally so /menu stays standalone) */
.ord-form { margin-top: 8px; }
.ord-form .grp { margin-top: 14px; }
.ord-form label { display: block; font-family: var(--f-label); text-transform: uppercase; letter-spacing: .12em; font-size: 12px; color: var(--chalk-dim); margin-bottom: 6px; }
.ord-form input, .ord-form select, .ord-form textarea {
  width: 100%; background: #0f1315; border: 1.5px solid var(--chalk-line); border-radius: 9px; color: var(--chalk);
  font-family: var(--f-body); font-size: 16px; padding: 12px 13px;
}
.ord-form textarea { resize: vertical; min-height: 54px; }
.ord-form input:focus, .ord-form select:focus, .ord-form textarea:focus { outline: none; border-color: var(--chalk-blue); }
.ord-form .member { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--chalk-line); }
.ord-form .member .mhint { font-size: 13px; color: var(--mint); margin-top: 8px; display: none; }
.ord-form .member.linked .mhint { display: block; }

.ord-msg { margin-top: 12px; padding: 11px 14px; border-radius: 8px; font-size: 14px; display: none; }
.ord-msg.err { display: block; background: rgba(242,184,125,.14); border: 1px solid var(--peach); color: var(--peach); }

/* footer place button */
.ord-foot { padding: 12px 20px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--chalk-line); }
.ord-place {
  width: 100%; border: 0; border-radius: 10px; cursor: pointer; padding: 16px 18px;
  background: var(--mint); color: var(--slate);
  font-family: var(--f-label); text-transform: uppercase; letter-spacing: .1em; font-size: 16px; font-weight: 600;
}
.ord-place[disabled] { opacity: .5; cursor: not-allowed; }
.ord-place.wa { background: #25D366; color: #08310f; display: flex; align-items: center; justify-content: center; gap: 9px; }
.ord-place.wa::before { content: ""; width: 20px; height: 20px; background: #08310f;
  -webkit-mask: var(--wa) center/contain no-repeat; mask: var(--wa) center/contain no-repeat;
  --wa: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M16 3a13 13 0 0 0-11.2 19.6L3 29l6.6-1.7A13 13 0 1 0 16 3zm5.8 15.7c-.3-.2-1.9-.9-2.1-1s-.5-.2-.7.2-.8 1-1 1.2-.4.2-.7.1a8.6 8.6 0 0 1-4.3-3.7c-.3-.6.3-.5.8-1.6a.5.5 0 0 0 0-.5l-1-2.5c-.3-.6-.5-.5-.7-.5h-.6a1.2 1.2 0 0 0-.9.4 3.7 3.7 0 0 0-1.1 2.7 6.4 6.4 0 0 0 1.4 3.4 14.6 14.6 0 0 0 5.6 5c2.1.8 2.5.6 3 .6a3.1 3.1 0 0 0 2-1.4 2.5 2.5 0 0 0 .2-1.4c-.1-.2-.3-.2-.6-.4z'/%3E%3C/svg%3E"); }
a.ord-place.wa { text-decoration: none; margin-top: 6px; }
.ord-done .od-wa { font-size: 46px; line-height: 1; }
.ord-done h2 { color: #25D366; }

/* order-type toggle + confirmation note */
.ord-type { display: flex; gap: 8px; }
.otype { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 12px 8px; border-radius: 12px; border: 1.5px solid var(--chalk-line);
  background: #0f1315; color: var(--chalk-dim); cursor: pointer;
  font-family: var(--f-label); text-transform: uppercase; letter-spacing: .08em; font-size: 12.5px; }
.otype .oti { font-size: 22px; line-height: 1; }
.otype.active { border-color: var(--chalk-blue); background: rgba(125,208,232,.14); color: var(--chalk); }
.ord-confirm { font-size: 12.5px; color: var(--chalk-faint); text-align: center; line-height: 1.45; margin-bottom: 10px; }
.ord-err { margin-top: 12px; padding: 11px 14px; border-radius: 8px; font-size: 14px;
  background: rgba(242,184,125,.14); border: 1px solid var(--peach); color: var(--peach); }

/* success view */
.ord-done { padding: 30px 24px calc(28px + env(safe-area-inset-bottom)); text-align: center; }
.ord-done h2 { font-family: var(--f-display); color: var(--mint); font-size: 30px; margin: 6px 0 4px; transform: rotate(-1deg); }
.ord-done .od-sub { color: var(--chalk-dim); font-size: 15px; margin-bottom: 20px; }
.ord-done .od-code {
  font-family: var(--f-headline); letter-spacing: .14em; font-size: 46px; color: var(--chalk);
  background: #0f1315; border: 1px dashed var(--chalk-line); border-radius: 12px; padding: 14px 18px; display: inline-block;
}
.ord-done .od-show { font-family: var(--f-label); text-transform: uppercase; letter-spacing: .14em; font-size: 12px; color: var(--chalk-faint); margin: 12px 0 4px; }
.ord-done .od-pay { font-family: var(--f-script); font-size: 22px; color: var(--peach); margin: 14px 0 6px; }
.ord-done .od-stamp { color: var(--mint); font-size: 14px; margin-top: 8px; }
.ord-done .od-again { margin-top: 22px; background: transparent; border: 1.5px solid var(--chalk-line); color: var(--chalk); border-radius: 10px; padding: 13px 18px; width: 100%; cursor: pointer; font-family: var(--f-label); text-transform: uppercase; letter-spacing: .1em; font-size: 14px; }
