/* ===== Order page ===== */
.order-body { background: var(--cream); padding-bottom: 90px; }

.order-header {
  position: sticky; top: 0; z-index: 30;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 12px 16px;
  background: var(--green-900); color: #fff;
}
.order-back { color: #fff; text-decoration: none; font-size: 0.95rem; }
.order-title { font-weight: 700; }

.order-main { max-width: 640px; margin: 0 auto; padding: 16px; }

/* Two-column layout on desktop: menu + sticky order summary */
.order-layout { display: block; }
.order-summary { display: none; }   /* hidden on small screens (bottom bar used instead) */

@media (min-width: 900px) {
  .order-main { max-width: 1040px; }
  .order-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 26px;
    align-items: start;
  }
  .order-summary {
    display: block;
    position: sticky;
    top: 84px;
    background: #fff;
    border-radius: 16px;
    padding: 20px 18px;
    box-shadow: 0 8px 24px rgba(31,61,43,0.1);
  }
  .cart-bar { display: none !important; }  /* replaced by the sidebar */
}

.summary-title { margin: 0 0 12px; color: var(--green-900); font-size: 1.25rem; }
.summary-empty { color: var(--muted); font-size: 0.95rem; margin: 6px 0 14px; }
.summary-lines { display: flex; flex-direction: column; }
.sum-line {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 10px 0; border-bottom: 1px solid rgba(31,61,43,0.08);
}
.sum-info { flex: 1; min-width: 0; }
.sum-name { font-weight: 600; }
.sum-detail { font-size: 0.83rem; color: var(--muted); margin-top: 2px; }
.sum-price { font-weight: 600; white-space: nowrap; }
.sum-remove {
  border: none; background: none; color: var(--muted);
  cursor: pointer; font-size: 0.9rem; padding: 0 2px; line-height: 1;
}
.summary-total-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 14px 0 4px; font-size: 1.15rem;
}
.summary-total-row strong { color: var(--green-900); }
.summary-send {
  margin-top: 12px; width: 100%;
  border: none; background: var(--green-700); color: #fff;
  padding: 13px; border-radius: 12px; font-size: 1rem; font-weight: 700; cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease;
}
.summary-send:hover:not(:disabled) { background: var(--green-900); }
.summary-send:disabled { opacity: 0.4; cursor: default; }

/* Type toggle */
.type-toggle {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  background: #e2ece5; padding: 6px; border-radius: 999px; margin: 8px 0 20px;
}
.type-btn {
  border: none; background: transparent; padding: 12px; border-radius: 999px;
  font-size: 1rem; font-weight: 600; color: var(--green-900); cursor: pointer;
  transition: background 0.2s ease;
}
.type-btn.active { background: #fff; box-shadow: var(--shadow); }

/* Add-friend prompt (shown inside LINE if not yet a friend) */
.addfriend-banner {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: #eaf6ee; border: 1px solid #bfe3cb;
  border-radius: 14px; padding: 14px 16px; margin: 4px 0 16px;
}
.addfriend-banner .af-text { flex: 1; min-width: 180px; color: var(--green-900); font-size: 0.95rem; }
.addfriend-banner .af-btn {
  background: #06c755; color: #fff; text-decoration: none; font-weight: 700;
  padding: 10px 18px; border-radius: 999px; white-space: nowrap;
}

/* Shop-closed notice (early close) */
.closed-banner {
  display: flex; flex-direction: column; gap: 4px; text-align: center;
  background: #ffdede; border: 1px solid #f0b4b4; border-radius: 14px;
  padding: 16px 18px; margin: 4px 0 16px;
}
.closed-banner strong { color: #9a1c1c; font-size: 1.15rem; }
.closed-banner span { color: #7a3535; font-size: 0.95rem; }

/* Pickup-time picker: ASAP / Set time + slot dropdown */
.time-picker { margin-top: 6px; }
.tp-seg { display: inline-flex; border: 1.5px solid rgba(31,61,43,0.2); border-radius: 12px; overflow: hidden; }
.time-picker.field-err .tp-seg { outline: 2px solid #c0392b; }
.tp-opt { border: none; background: #fff; color: var(--green-900); padding: 10px 20px; font-size: 1rem; font-weight: 600; cursor: pointer; }
.tp-opt + .tp-opt { border-left: 1.5px solid rgba(31,61,43,0.15); }
.tp-opt.active { background: var(--green-700); color: #fff; }
.tp-opt.disabled { opacity: 0.4; cursor: default; }
.tp-select { display: block; margin-top: 10px; width: 100%; padding: 10px 12px; border: 1.5px solid rgba(31,61,43,0.2); border-radius: 10px; font-size: 1rem; background: #fff; }
.tp-tomorrow { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-weight: 600; color: var(--green-900); cursor: pointer; }
.tp-tomorrow input { width: 18px; height: 18px; }
.closed-banner .closed-line { align-self: center; margin-top: 6px; }

/* Category headers */
.menu-cat-head {
  color: var(--green-900); font-size: 1.35rem; margin: 24px 0 12px;
  padding-bottom: 6px; border-bottom: 2px solid var(--green-100);
}
.menu-cat-head:first-child { margin-top: 0; }

/* Item extras: description, popular badge, sold-out */
.item-name-wrap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.item-badge {
  font-size: 0.72rem; font-weight: 700; color: #b8341f;
  background: #fdecea; padding: 2px 8px; border-radius: 999px;
}
.item-desc { color: var(--muted); font-size: 0.9rem; margin: 6px 0 0; }
.item-card.sold-out { opacity: 0.6; }
.item-card.sold-out .add-btn { background: #bfc4bd; }
.item-card.sold-out .item-thumb { filter: grayscale(1); }

/* SOLD OUT ribbon across the card corner */
.soldout-ribbon {
  position: absolute; top: 14px; right: -34px;
  transform: rotate(45deg);
  background: #c0392b; color: #fff;
  font-weight: 800; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 5px 40px; z-index: 3;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

/* Item cards with option groups */
.item-card {
  position: relative;
  overflow: hidden;
  background: #fff;
  border-radius: 16px;
  padding: 18px 18px 16px;
  margin-bottom: 18px;
  box-shadow: 0 6px 18px rgba(31,61,43,0.08);
}
.item-head { display: flex; align-items: center; gap: 14px; }
.item-head h3 { margin: 0; color: var(--green-900); font-size: 1.2rem; }
.item-price { font-weight: 700; color: var(--green-700); white-space: nowrap; }

.item-thumb {
  width: 84px; height: 84px; flex-shrink: 0;
  border-radius: 12px; overflow: hidden; background: #e2ece5;
}
.item-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.item-thumb.placeholder {
  background: linear-gradient(135deg, #cfe3d5, #a7cdb4);
  display: flex; align-items: center; justify-content: center;
}
.item-thumb.placeholder::after { content: "🍽️"; font-size: 1.6rem; opacity: 0.6; }
.item-head .item-name-wrap { flex: 1; }

.opt-group { margin-top: 14px; }
.opt-label { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.opt-label span:first-child { font-weight: 600; color: var(--ink); }
.opt-counter { font-size: 0.85rem; color: var(--muted); }

/* Count-mode option rows (per-topping stepper) */
.opt-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid rgba(31,61,43,0.06);
}
.opt-row:last-child { border-bottom: none; }
.opt-row .opt-name { font-size: 1rem; }
.opt-row .stepper button:disabled { opacity: 0.35; cursor: default; }

.opt-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1.5px solid rgba(31,61,43,0.2);
  background: #fff; color: var(--green-900);
  padding: 9px 15px; border-radius: 999px;
  font-size: 0.95rem; cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.chip:active { transform: scale(0.95); }
.chip.active { background: var(--green-700); color: #fff; border-color: var(--green-700); }
.chip.disabled { opacity: 0.4; cursor: default; }
.chip-other.active { background: var(--green-500); border-color: var(--green-500); color: #fff; }

/* Size chips: name over price, single-select */
.size-chip { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.15; padding: 8px 16px; }
.size-chip .size-name { font-weight: 600; }
.size-chip .size-price { font-size: 0.82rem; opacity: 0.85; }
.other-input {
  margin-top: 8px; width: 100%;
  padding: 10px 12px; border: 1px solid rgba(31,61,43,0.2);
  border-radius: 10px; font-size: 1rem; font-family: inherit;
}
.other-input:focus { outline: 2px solid var(--green-500); border-color: transparent; }

.add-btn {
  margin-top: 16px; width: 100%;
  border: none; background: var(--green-700); color: #fff;
  padding: 13px; border-radius: 12px; font-size: 1.02rem; font-weight: 700; cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease;
}
.add-btn:hover:not(:disabled) { background: var(--green-900); }
.add-btn:disabled { opacity: 0.4; cursor: default; }
.add-btn.added { background: var(--green-500); }

/* Cart line detail */
.cl-info { flex: 1; }
.cl-detail { font-size: 0.85rem; color: var(--muted); margin-top: 2px; }
.cl-remove {
  border: none; background: none; color: var(--muted);
  font-size: 1rem; cursor: pointer; padding: 4px 6px; margin-left: 6px;
}

/* Menu (legacy) */
.menu-cat { margin-bottom: 24px; }
.menu-cat h3 { color: var(--green-900); margin: 0 0 10px; font-size: 1.15rem; }
.menu-item {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border-radius: 14px; padding: 14px 16px; margin-bottom: 10px;
  box-shadow: 0 4px 14px rgba(31,61,43,0.06);
}
.menu-item .mi-info { flex: 1; }
.menu-item .mi-name { font-weight: 600; }
.menu-item .mi-price { color: var(--muted); font-size: 0.92rem; }

/* Quantity stepper */
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper button {
  width: 34px; height: 34px; border-radius: 50%; border: none; cursor: pointer;
  font-size: 1.2rem; line-height: 1; background: var(--green-100); color: var(--green-900);
  transition: transform 0.1s ease, background 0.2s ease;
}
.stepper button:hover { background: var(--green-500); color: #fff; }
.stepper button:active { transform: scale(0.9); }
.stepper .qty { min-width: 20px; text-align: center; font-weight: 700; }
.stepper .qty.zero { color: var(--muted); font-weight: 400; }

/* Cart bar */
.cart-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; gap: 10px; align-items: center;
  max-width: 640px; margin: 0 auto; padding: 12px 16px;
  background: rgba(247,244,236,0.96); backdrop-filter: blur(8px);
  border-top: 1px solid rgba(31,61,43,0.1);
}
.cart-summary {
  flex: 1; text-align: left; border: none; background: transparent;
  font-weight: 600; color: var(--green-900); font-size: 1rem; cursor: pointer;
  display: flex; justify-content: space-between;
}
.cart-review {
  border: none; background: var(--green-700); color: #fff; cursor: pointer;
  padding: 14px 22px; border-radius: 999px; font-weight: 700; font-size: 1rem;
}

/* Sheet */
.sheet {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(0,0,0,0.4);
}
.sheet-panel {
  width: 100%; max-width: 640px; max-height: 90vh; overflow-y: auto;
  background: var(--cream); border-radius: 20px 20px 0 0; padding: 20px 18px 28px;
  animation: slideUp 0.25s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; }
.sheet-head h2 { margin: 0; color: var(--green-900); }
.sheet-close { border: none; background: none; font-size: 1.3rem; cursor: pointer; color: var(--muted); }

.cart-lines { margin: 14px 0; }
.cart-line { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid rgba(31,61,43,0.08); }
.cart-line .cl-name { flex: 1; }
.cart-line .cl-qty { color: var(--muted); }
.cart-line .cl-price { font-weight: 600; min-width: 60px; text-align: right; }

.cart-total-row { display: flex; justify-content: space-between; padding: 14px 0; font-size: 1.15rem; }
.cart-total-row strong { color: var(--green-900); }

.fields { display: grid; gap: 12px; margin: 8px 0 18px; }
.fields label { display: grid; gap: 6px; font-size: 0.9rem; color: var(--muted); }
.fields input, .fields textarea {
  padding: 12px 14px; border: 1px solid rgba(31,61,43,0.18); border-radius: 12px;
  font-size: 1rem; font-family: inherit; background: #fff;
}
.fields input:focus, .fields textarea:focus { outline: 2px solid var(--green-500); border-color: transparent; }
.fields input.input-bad { border-color: #c0392b; background: #fff5f4; }
.field-err { color: #c0392b; font-size: 0.82rem; margin: 0; font-weight: 600; }

.send-btn {
  width: 100%; border: none; background: var(--green-700); color: #fff;
  padding: 16px; border-radius: 14px; font-size: 1.1rem; font-weight: 700; cursor: pointer;
  transition: background 0.2s ease;
}
.send-btn:hover { background: var(--green-900); }
.send-btn:disabled { opacity: 0.6; cursor: default; }
.send-hint { text-align: center; color: var(--muted); font-size: 0.85rem; margin: 10px 0 0; }

/* Payment sheet (PromptPay QR) */
.sheet-back { border: none; background: none; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--muted); padding: 0 6px 0 0; }
.pay-panel { text-align: center;
  /* The (already-green) bar-table photo as the Scan-to-pay backdrop. A cream
     veil, stronger at the top, keeps the title/amount readable while the green
     table shows through near the bottom where the cup rests.
     --pt-drop pushes the table's near edge DOWN in pixels (0 = bottom-aligned).
     --pt-zoom scales the photo (>100% zooms in so the foreground table comes forward). */
  --pt-drop: 80px;
  --pt-zoom: 138%;
  background:
    linear-gradient(180deg, rgba(247,244,236,0.75) 0%, rgba(247,244,236,0.50) 50%, rgba(247,244,236,0.15) 100%),
    url('/img/paytable.webp') center calc(100% + var(--pt-drop)) / auto var(--pt-zoom) no-repeat,
    var(--cream);
}
.pay-amount-row { display: flex; justify-content: space-between; align-items: baseline; margin: 16px 4px 14px; }
.pay-amount-row span { color: var(--muted); font-size: 0.95rem; }
.pay-amount-row strong { color: var(--green-900); font-size: 1.9rem; }
.pay-typehint { margin: 0 6px 12px; padding: 10px 12px; background: #fff3d6; border-radius: 10px; color: #7a5c00; font-weight: 700; text-align: center; }
.pay-qr {
  width: 232px; max-width: 74vw; margin: 0 auto; padding: 12px; background: #fff;
  border: 1px solid rgba(31,61,43,0.14); border-radius: 14px;
  display: grid; place-items: center; min-height: 200px; color: var(--muted);
}
.pay-qr img { display: block; }
.pay-payee { margin: 12px 6px 4px; color: var(--ink); font-size: 0.9rem; font-weight: 600; }
.pay-instr { margin: 4px 6px 16px; color: var(--muted); font-size: 0.85rem; line-height: 1.4; }
/* Over the more-visible table photo, these read white with a dark shadow so they
   stay legible on the green (bottom) area. */
.pay-payee, .pay-instr {
  color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,0.6), 0 0 2px rgba(0,0,0,0.5);
}
/* Amount due + price stay black on the lighter top of the panel. */
.pay-amount-row span, .pay-amount-row strong { color: #000; }
.pay-cash { width: 100%; border: none; background: none; color: var(--green-700); font-size: 0.95rem; text-decoration: underline; cursor: pointer; padding: 12px; margin-top: 4px; }
.pay-save { display: block; margin: 12px auto 0; padding: 11px 18px; border: none; border-radius: 999px; background: #e2ece5; color: var(--green-900); font-weight: 600; font-size: 0.95rem; cursor: pointer; }

/* Full-screen QR (press-and-hold to save / screenshot) */
.qr-full { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,0.78); display: grid; place-items: center; padding: 20px; }
.qr-full-card { position: relative; background: #fff; border-radius: 18px; padding: 22px 20px; width: 100%; max-width: 360px; text-align: center; }
.qr-full-card img { width: 100%; max-width: 300px; height: auto; image-rendering: pixelated; }
.qr-full-close { position: absolute; top: 8px; right: 12px; border: none; background: none; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--muted); }
.qr-full-amt { font-weight: 800; color: var(--green-900); font-size: 1.5rem; margin: 8px 0 6px; }
.qr-full-hint { color: var(--muted); font-size: 0.9rem; line-height: 1.45; margin: 0 0 14px; }
.qr-full-share { border: none; background: var(--green-700); color: #fff; font-weight: 700; padding: 12px 22px; border-radius: 999px; cursor: pointer; }

/* Done overlay */
.done { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; background: rgba(0,0,0,0.45); padding: 20px; }
.done-card { background: #fff; border-radius: 20px; padding: 34px 26px; text-align: center; max-width: 360px; width: 100%; max-height: 88vh; overflow-y: auto; animation: slideUp 0.25s ease; }
.done-check { font-size: 3rem; }
.done-card h2 { color: var(--green-900); margin: 8px 0; }
.done-card p { color: var(--muted); }

/* Order receipt on the success screen */
.done-receipt { text-align: left; background: #f7f4ec; border-radius: 12px; padding: 12px 14px; margin: 14px 0 18px; }
.dr-ref { font-weight: 800; color: var(--green-900); font-size: 0.95rem; }
.dr-meta { color: #6b6b5e; font-size: 0.85rem; margin: 2px 0 8px; }
.dr-line { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid rgba(0,0,0,0.06); }
.dr-line:first-of-type { border-top: none; }
.dr-info { min-width: 0; }
.dr-name { font-weight: 600; font-size: 0.92rem; }
.dr-detail { color: #6b6b5e; font-size: 0.8rem; margin-top: 1px; }
.dr-price { font-weight: 600; white-space: nowrap; }
.dr-total { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 8px; border-top: 2px solid rgba(0,0,0,0.12); }
.dr-total strong { color: var(--green-900); }

/* Staff sub-nav on the New Order page (link to Orders board + open count) */
.staff-subnav { display: flex; gap: 8px; padding: 8px 14px; background: var(--green-900); }
.ssub-link { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: #eaf3ea; background: rgba(255,255,255,0.10); border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 0.95rem; }
.ssub-link:hover { background: rgba(255,255,255,0.20); }
.ssub-count { background: #8fe0a8; color: #06301a; border-radius: 999px; padding: 1px 9px; font-weight: 800; font-size: 0.85rem; }
.ssub-count.zero { background: #9fb39a; color: #f0f4ef; }

/* Left-side section jump nav (wide screens / SUNMI landscape POS) */
.section-nav { display: none; }
.menu-cat-head { scroll-margin-top: 90px; }
@media (min-width: 900px) {
  .order-layout { grid-template-columns: 168px 1fr 320px; }
  .section-nav {
    display: flex; flex-direction: column; gap: 4px;
    position: sticky; top: 84px; align-self: start;
    max-height: calc(100vh - 100px); overflow-y: auto;
  }
  .sec-link {
    text-decoration: none; color: var(--green-900); font-weight: 600; font-size: 0.95rem;
    padding: 9px 12px; border-radius: 10px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .sec-link:hover { background: var(--green-100); }
}

/* ===== In-store register (staff mode right panel) ===== */
.register-mode .order-summary { display: block; }
.reg-fields { display: flex; flex-direction: column; gap: 8px; margin: 0 0 14px; }
.reg-input { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1.5px solid rgba(31,61,43,0.2); border-radius: 10px; font-size: 1rem; }
.reg-input:focus { outline: none; border-color: var(--green-700); }
.reg-confirm { background: var(--green-700); color: #fff; }
.reg-next { background: #2a5ca8; color: #fff; }

/* Staff "OTHER" custom-item card (off-menu items) */
.oc-fields { display: flex; flex-direction: column; gap: 10px; width: 100%; min-width: 0; }
.oc-input { padding: 10px 12px; border: 1.5px solid rgba(31,61,43,0.2); border-radius: 10px; font-size: 1rem; width: 100%; box-sizing: border-box; }
.oc-input:focus { outline: none; border-color: var(--green-700); }
.oc-input.field-err { border-color: #c0392b; }
.oc-row { display: flex; gap: 10px; align-items: center; }
.oc-price { max-width: 130px; }
.oc-qty { display: flex; align-items: center; gap: 6px; }
.oq-btn { width: 34px; height: 34px; border-radius: 50%; border: none; background: var(--green-100); color: var(--green-900); font-size: 1.2rem; line-height: 1; cursor: pointer; }
.oq-btn:active { transform: scale(0.92); }
.oq-val { min-width: 26px; text-align: center; font-weight: 700; }

/* ===== Smoothie transition (mobile): the cup AND a preview of the payment QR slide
   DOWN together to cover the form. The QR shows through the 20%-translucent drink and
   the see-through empty cup; then the cup lifts away, leaving the QR. Cream sides. */
.smoothie-tx { position: fixed; inset: 0; z-index: 300; overflow: hidden; pointer-events: none; background: transparent; }

/* The real Scan-to-pay screen (#pay) is the background behind this transparent
   overlay. A properly-shaped cup floats over it: elliptical rim, tapered body,
   rounded base. Straw sits BEHIND the opaque liquid, so it only shows above the
   drink line. Empty glass refracts the pay screen; reflections add depth. */

/* Cup wrapper: fixed cup proportions (viewBox 220×300). The base is anchored to
   --stx-rest (the top edge of the "I've paid" button, measured in JS) so the cup
   comes to rest exactly on the countertop. Slides down, holds, lifts. */
.stx-cupwrap { position: absolute; left: 50%; --stx-w: min(92vw, 460px); width: var(--stx-w);
  /* base sits --stx-lift ABOVE the button so the cup rests up on the table surface */
  --stx-lift: 11vh;
  top: calc(var(--stx-rest, 80vh) - var(--stx-w) * 1.2727 - var(--stx-lift));
  aspect-ratio: 220 / 300; z-index: 2;
  transform: translate(-50%, -140%); transition: transform 0.78s cubic-bezier(.2,.82,.25,1); }
/* NOTE: no `filter` on the wrapper — it would become a backdrop-root and kill the
   glass refraction below. Grounding shadow is a separate sibling instead. */
.smoothie-tx.rise .stx-cupwrap { transform: translate(-50%, 0); }
.smoothie-tx.leave .stx-cupwrap { transform: translate(-50%, -150%); transition: transform 0.62s cubic-bezier(.5,0,.85,.4); }

/* Countertop = perspective lines receding from the green "I've paid" button, whose
   top edge is the counter's front edge. The <svg> is filled in JS from the button
   rect. It fades in with the cup and out as it lifts. */
.stx-persp { position: absolute; inset: 0; z-index: 1; opacity: 0; transition: opacity 0.5s ease; }
.smoothie-tx.rise .stx-persp { opacity: 1; }
.smoothie-tx.leave .stx-persp { opacity: 0; }

.stx-cupwrap > * { position: absolute; inset: 0; }
.stx-clipdefs { width: 0; height: 0; }

/* z0 — soft grounding shadow under the base (sibling, so it never isolates the glass) */
.stx-shadow { z-index: 0; top: auto; bottom: -1%; left: 10%; right: 10%; height: 7%;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.34), rgba(0,0,0,0) 68%);
  filter: blur(4px); }

/* z0 — see-through glass body: refracts the pay screen behind it */
.stx-glass { z-index: 0; clip-path: url(#stxCup);
  background: linear-gradient(100deg,
    rgba(255,255,255,0.10) 0 5%, rgba(255,255,255,0.02) 12%,
    transparent 34% 66%, rgba(255,255,255,0.03) 88%, rgba(255,255,255,0.12) 96% 100%);
  -webkit-backdrop-filter: blur(1.7px) brightness(1.05) saturate(1.06);
  backdrop-filter: blur(1.7px) brightness(1.05) saturate(1.06); }

/* z1 — straw + inner-bottom, BEHIND the liquid. Straw runs off the top of the
   screen (mouth unseen), so overflow must be visible. */
.stx-straw { z-index: 1; overflow: visible; }

/* z2 — opaque strawberry smoothie; its top surface is an ellipse (meniscus) */
.stx-liquid { z-index: 2; clip-path: url(#stxCup); overflow: hidden; }
.stx-liquid-body { position: absolute; left: 0; right: 0; bottom: -3%; top: 8%;
  transition: top 3s linear;
  background-color: rgb(233, 40, 118);
  background-image:
    radial-gradient(circle at 25% 28%, rgba(150,15,55,0.75) 0 1.6%, transparent 2.1%),
    radial-gradient(circle at 68% 58%, rgba(255,226,150,0.65) 0 1.3%, transparent 1.8%),
    radial-gradient(circle at 48% 82%, rgba(190,30,70,0.7) 0 1.5%, transparent 2%),
    radial-gradient(circle at 85% 22%, rgba(255,210,130,0.6) 0 1.2%, transparent 1.7%),
    radial-gradient(circle at 12% 65%, rgba(170,20,60,0.62) 0 1.25%, transparent 1.7%),
    linear-gradient(180deg, #ff77aa, #ef3f86 55%, #d62d74);
  background-size: 24% 15%, 32% 13%, 28% 17%, 36% 16%, 30% 18%, 100% 100%;
  background-repeat: repeat, repeat, repeat, repeat, repeat, no-repeat; }
/* frothy meniscus at the drink's surface */
.stx-liquid-body::before { content: ''; position: absolute; left: -4%; right: -4%; top: -4%;
  height: 9%; background: #ffcfe1; border-radius: 50%; box-shadow: 0 0.4vh 0.6vh rgba(180,20,70,0.25); }
.smoothie-tx.drink .stx-liquid-body { top: 116%; }              /* drunk down over 3s */

/* z3 — vector art: cylindrical shading, reflections, the oblong rim, outline */
.stx-art { z-index: 3; overflow: visible; }

/* z3 — the cup's printed logo (HEALTHY HOUSE + phone), matching the real cup */
.stx-logo { left: 50%; top: 50%; transform: translateX(-50%); width: 72%; height: auto;
  right: auto; bottom: auto; z-index: 3; opacity: 0.92; }

/* ============================================================
   Order-entry layout — denser, WIDER POS style so a whole item
   (flavor + size + toppings) fits with little/no scrolling, and the
   Add button sits to the RIGHT of each item instead of underneath.
   Applies to BOTH the customer page and the staff register (.order-body).
   ============================================================ */
.order-body .order-main { max-width: 1400px; padding: 10px 14px; }
@media (min-width: 900px) {
  .order-body .order-layout { grid-template-columns: 148px 1fr 300px; gap: 16px; }
  .order-body .section-nav { top: 68px; gap: 2px; }
  .order-body .sec-link { padding: 7px 10px; font-size: 0.9rem; }
  .order-body .order-summary { top: 68px; padding: 16px 14px; }
}

/* Compact item card: content on the left, Add button on the right */
.order-body .item-card {
  display: grid; grid-template-columns: 1fr auto; column-gap: 14px; align-items: center;
  padding: 12px 14px; margin-bottom: 12px; border-radius: 12px;
  box-shadow: 0 3px 10px rgba(31,61,43,0.07);
}
.order-body .item-card > *:not(.add-btn) { grid-column: 1; min-width: 0; }
.order-body .item-head { gap: 10px; }
.order-body .item-head h3 { font-size: 1.05rem; }
.order-body .item-thumb { width: 52px; height: 52px; border-radius: 9px; }
.order-body .item-desc { display: none; }   /* keep cards compact */

.order-body .opt-group { margin-top: 8px; }
.order-body .opt-label { margin-bottom: 4px; font-size: 0.88rem; }
.order-body .opt-chips { gap: 5px; }
.order-body .chip { padding: 6px 11px; font-size: 0.9rem; }
.order-body .size-chip { padding: 5px 12px; }

/* Toppings (count group) flow in TWO columns → half the height */
.order-body .opt-group.count-group {
  display: grid; grid-template-columns: 1fr 1fr; column-gap: 18px; align-items: center;
}
.order-body .opt-group.count-group .opt-label { grid-column: 1 / -1; }
.order-body .opt-group.count-group .opt-row { border-bottom: none; padding: 3px 0; }
.order-body .opt-row .opt-name { font-size: 0.95rem; }
.order-body .stepper { gap: 8px; }
.order-body .stepper button { width: 30px; height: 30px; font-size: 1.1rem; }

/* Add button: right of the item, vertically centered, compact */
.order-body .add-btn {
  grid-column: 2; grid-row: 1 / 999; align-self: center;
  margin-top: 0; width: auto; min-width: 96px; padding: 14px 18px;
  border-radius: 12px; font-size: 0.98rem; white-space: nowrap;
}
.reg-change { display: flex; justify-content: space-between; align-items: baseline; margin: 8px 0; padding-top: 10px; border-top: 2px dashed rgba(31,61,43,0.2); }
.reg-change .rc-lbl { font-weight: 700; color: var(--green-900); }
.reg-change .rc-amt { font-size: 1.9rem; font-weight: 900; color: #b8860b; }
.reg-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.reg-btn { border: none; border-radius: 12px; padding: 14px; font-size: 1rem; font-weight: 700; cursor: pointer; }
.reg-btn:disabled { opacity: 0.4; cursor: default; }
.reg-complete { background: var(--green-700); color: #fff; }
.reg-scan { background: #2a5ca8; color: #fff; }
.reg-cash { background: #1f5c4a; color: #fff; }
.reg-change-order { background: #e2ece5; color: var(--green-900); }
.reg-receipt { background: #b8901f; color: #fff; }
.reg-finish { background: var(--green-900); color: #fff; }

/* Cash number pad */
.numpad-overlay { position: fixed; inset: 0; background: rgba(15,43,28,0.6); display: grid; place-items: center; z-index: 100; }
.numpad { background: #fff; border-radius: 18px; padding: 20px; width: min(360px, 92vw); box-shadow: 0 20px 60px rgba(0,0,0,0.4); }
.pad-amt { font-size: 2.6rem; font-weight: 900; text-align: center; color: var(--green-900); }
.pad-change { text-align: center; color: var(--muted); font-weight: 700; min-height: 1.4em; margin-bottom: 8px; }
.pad-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pad-key { border: 1px solid rgba(31,61,43,0.15); background: #f4f7f2; border-radius: 12px; padding: 18px; font-size: 1.4rem; font-weight: 700; cursor: pointer; color: var(--green-900); }
.pad-key:active { background: #e2ece5; }
.pad-foot { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; margin-top: 12px; }
.pad-cancel { border: none; background: #f3d9d9; color: #8a2222; border-radius: 12px; padding: 16px; font-size: 1.2rem; font-weight: 800; cursor: pointer; }
.pad-enter { border: none; background: var(--green-700); color: #fff; border-radius: 12px; padding: 16px; font-size: 1.2rem; font-weight: 800; cursor: pointer; }
