/*
 * Vertex animated storefront demo, shared by the homepage hero and every
 * /{mode} page. Markup: modules/Vertex/Resources/views/partials/hero-demo.blade.php
 * Behaviour: public/vertex/js/hero-demo.js
 *
 * A scale model of a real Cosmika storefront, plus the Reservations booking page
 * for the bookings mode. Tokens are copied from Cosmika's own
 * templates/partials/style.blade.php — re-check this file if Cosmika is restyled.
 *
 * Every rule is scoped under #hero-demo so nothing leaks into the Tailwind page.
 * build.sh removes vertex.css and vertex.js by name, so this keeps its own.
 */
#hero-demo{
  /* The merchant's own theme colour, from the Kopi Lane Bakehouse sample.
     The storefront wears this; WhatsMenu green is reserved for --hd-wm below,
     so the demo shows a merchant's brand rather than ours. */
  --wm-theme:#6F4E37;
  --hd-wm:#2d852d;
  --cx-ink:#2d2d2d; --cx-ink-2:#616161; --cx-ink-3:#6b6b6b;
  --cx-border:#e3e3e3; --cx-border-2:#d6d6d6;
  --cx-surface:#fff; --cx-surface-2:#f4f4f4;
  --cx-radius:14px; --cx-radius-sm:10px;
  --cx-shadow-md:0 4px 16px rgba(46,42,33,.08),0 1px 3px rgba(46,42,33,.05);
  --cx-shadow-lg:0 12px 40px rgba(46,42,33,.13);
  --cx-mono:"JetBrains Mono",ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  --hd-ease:cubic-bezier(.22,1,.36,1);
  --hd-tint:color-mix(in srgb, var(--wm-theme) 10%, #fff);
  position:relative;
  height:clamp(520px,44vw,580px);
  border-radius:18px;
  border:1px solid var(--cx-border);
  background:#fff;
  box-shadow:var(--cx-shadow-lg);
  overflow:hidden;
  text-align:left;
  color:var(--cx-ink);
}
#hero-demo *{box-sizing:border-box}
#hero-demo [hidden]{display:none !important}

/* browser chrome */
#hero-demo .hd-chrome{
  height:40px;display:flex;align-items:center;gap:10px;padding:0 14px;
  border-bottom:1px solid var(--cx-border);background:#fafafa;position:relative;z-index:30;
}
#hero-demo .hd-dots{display:flex;gap:6px}
#hero-demo .hd-dots i{width:9px;height:9px;border-radius:50%;background:#dcdcdc}
#hero-demo .hd-url{
  flex:1;font-size:11.5px;color:var(--cx-ink-3);background:#fff;border:1px solid var(--cx-border);
  border-radius:7px;padding:5px 10px;text-align:center;max-width:320px;margin:0 auto;
}
#hero-demo .hd-live{display:flex;align-items:center;gap:6px;font-size:11px;color:var(--cx-ink-2);font-weight:600}
#hero-demo .hd-live i{width:7px;height:7px;border-radius:50%;background:var(--hd-wm)}

#hero-demo .hd-stage{position:relative;height:calc(100% - 40px);background:#fff;overflow:hidden}

/* ---- the storefront, always mounted; overlays sit on top of it ---- */
#hero-demo .hd-store{position:absolute;inset:0;display:flex;flex-direction:column;background:#fff}
#hero-demo .hd-store.is-dim .hd-scroll{filter:blur(1.5px);opacity:.55;transition:filter .4s ease,opacity .4s ease}
#hero-demo .hd-scroll{flex:1;overflow:hidden;transition:filter .4s ease,opacity .4s ease}

#hero-demo .hd-head{
  display:flex;align-items:center;justify-content:space-between;
  padding:12px 20px;border-bottom:1px solid var(--cx-border);background:#fff;
}
#hero-demo .hd-brandrow{display:flex;align-items:center;gap:10px}
#hero-demo .hd-logo{
  width:32px;height:32px;border-radius:9px;display:grid;place-items:center;
  background:var(--wm-theme);color:#fff;font-weight:700;font-size:14px;
}
#hero-demo .hd-name{font-weight:600;font-size:15px;letter-spacing:-.01em}
#hero-demo .hd-open{font-size:11px;color:var(--wm-theme);font-weight:600;margin-top:1px}
#hero-demo .hd-cart{
  width:34px;height:34px;border-radius:var(--cx-radius-sm);border:1px solid var(--cx-border);
  display:grid;place-items:center;position:relative;color:var(--cx-ink-2);background:#fff;
}
#hero-demo .hd-badge{
  position:absolute;right:-6px;top:-6px;min-width:18px;height:18px;border-radius:9px;
  background:var(--wm-theme);color:#fff;font-size:10px;font-weight:700;
  display:grid;place-items:center;transform:scale(0);transition:transform .38s var(--hd-ease);
}
#hero-demo .hd-badge.is-on{transform:scale(1)}

/* category pills, Bootstrap nav-pills as Cosmika renders them */
#hero-demo .hd-pills{display:flex;gap:7px;padding:11px 20px 13px;border-bottom:1px solid var(--cx-border);overflow:hidden}
#hero-demo .hd-pill{
  padding:6px 13px;border-radius:999px;font-size:12px;font-weight:500;white-space:nowrap;
  color:var(--cx-ink-2);background:#f6f6f6;
}
#hero-demo .hd-pill.is-on{background:var(--wm-theme);color:#fff;font-weight:600}

/* .row-menu.list at the 768-1199 breakpoint: 3 across, 14px gap */
#hero-demo .hd-grid{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;
  padding:16px 20px 20px;transition:transform 1s var(--hd-ease);
}
#hero-demo .hd-strip{
  display:flex;flex-direction:column;background:#fff;
  border:1px solid var(--cx-border);border-radius:var(--cx-radius);overflow:hidden;
  transition:opacity .5s var(--hd-ease),transform .5s var(--hd-ease),box-shadow .16s ease,border-color .16s ease;
}
/* Only once the script is alive do cards start hidden and animate in. With no JS
   (blocked, errored, still parsing) the catalogue renders as a plain storefront
   instead of an empty white box. */
#hero-demo.is-live .hd-strip{opacity:0;transform:translateY(10px)}
#hero-demo.is-live .hd-strip.is-in{opacity:1;transform:none}
#hero-demo .hd-strip.is-target{transform:translateY(-3px);box-shadow:var(--cx-shadow-md);border-color:var(--cx-border-2)}
#hero-demo .hd-fig{aspect-ratio:1/1;background:var(--cx-surface-2);overflow:hidden}
#hero-demo .hd-fig img{width:100%;height:100%;object-fit:cover;display:block}
#hero-demo .hd-wrap{display:flex;flex-direction:column;flex:1;padding:12px 13px 13px}
#hero-demo .hd-title{margin:0;font-size:14px;font-weight:600;line-height:1.3}
#hero-demo .hd-desc{color:var(--cx-ink-3);font-size:12px;font-weight:400;line-height:1.45;margin:5px 0 0;flex:1}
#hero-demo .hd-price{
  margin-top:11px;font-weight:700;font-family:var(--cx-mono);font-variant-numeric:tabular-nums;
  font-size:13.5px;color:var(--cx-ink);
}

/* ---- overlays ---- */
#hero-demo .hd-veil{position:absolute;inset:0;background:rgba(26,26,26,.34);opacity:0;transition:opacity .4s ease;z-index:10;pointer-events:none}
#hero-demo .hd-veil.is-on{opacity:1}

#hero-demo .hd-modal{
  position:absolute;left:50%;top:50%;width:min(580px,88%);z-index:15;
  max-height:calc(100% - 30px);
  display:flex;flex-direction:column;
  transform:translate(-50%,-46%) scale(.97);opacity:0;pointer-events:none;
  background:#fff;border-radius:var(--cx-radius);box-shadow:var(--cx-shadow-lg);
  overflow:hidden;transition:opacity .4s var(--hd-ease),transform .45s var(--hd-ease);
}
#hero-demo .hd-modal.is-on{opacity:1;transform:translate(-50%,-50%) scale(1)}
#hero-demo .hd-mclose{flex:none;display:flex;justify-content:flex-end;padding:10px 13px 0;color:var(--cx-ink-3)}
/* Cosmika's item modal is a Bootstrap .row of two col-sm, so the photo sits
   beside the details from 576px up and only stacks below that. */
#hero-demo .hd-mgrid{
  display:grid;grid-template-columns:1fr 1fr;gap:18px;
  padding:2px 18px 18px;flex:1;min-height:0;
}
#hero-demo .hd-mfig{aspect-ratio:1/1;border-radius:var(--cx-radius-sm);overflow:hidden;background:var(--cx-surface-2);align-self:start}
#hero-demo .hd-mfig img{width:100%;height:100%;object-fit:cover;display:block}
#hero-demo .hd-mdetail{display:flex;flex-direction:column;min-height:0;overflow:auto;scrollbar-width:none}
#hero-demo .hd-mdetail::-webkit-scrollbar{display:none}
#hero-demo .hd-mtitle{margin:0;font-size:17px;font-weight:600;line-height:1.25;letter-spacing:-.01em}
#hero-demo .hd-mrule{height:1px;background:var(--cx-border);margin:10px 0}
#hero-demo .hd-mcopy{font-size:12px;color:var(--cx-ink-3);line-height:1.45;margin:0 0 9px}
#hero-demo .hd-mprice{
  font-weight:700;font-family:var(--cx-mono);font-variant-numeric:tabular-nums;
  font-size:16px;color:var(--cx-ink);margin-bottom:4px;
}
#hero-demo .hd-olabel{font-size:10.5px;color:var(--cx-ink-3);font-weight:600;text-transform:uppercase;letter-spacing:.05em;margin:9px 0 5px}
#hero-demo .hd-optrow{display:grid;grid-template-columns:1fr 1fr;gap:5px}
#hero-demo .hd-optrow .hd-opt{margin-bottom:5px}
#hero-demo .hd-opt{
  display:flex;align-items:center;justify-content:space-between;padding:8px 11px;
  border:1px solid var(--cx-border);border-radius:var(--cx-radius-sm);margin-bottom:5px;font-size:12.5px;
  transition:border-color .25s ease,background .25s ease;
}
#hero-demo .hd-opt.is-sel{border-color:var(--wm-theme);background:color-mix(in srgb,var(--wm-theme) 7%,#fff)}
#hero-demo .hd-radio{width:15px;height:15px;border-radius:50%;border:2px solid var(--cx-border-2);display:grid;place-items:center;flex:none}
#hero-demo .is-sel .hd-radio{border-color:var(--wm-theme)}
#hero-demo .is-sel .hd-radio::after{content:"";width:7px;height:7px;border-radius:50%;background:var(--wm-theme)}
#hero-demo .hd-mbuy{display:flex;gap:9px;margin-top:12px}
#hero-demo .hd-qty{border:1px solid var(--cx-border);border-radius:var(--cx-radius-sm);padding:0 12px;display:flex;align-items:center;gap:11px;font-weight:600;font-size:13px;color:var(--cx-ink-2)}
#hero-demo .hd-btn{
  flex:1;border:0;border-radius:var(--cx-radius-sm);background:var(--wm-theme);color:#fff;
  font-weight:600;font-size:13px;padding:11px;font-family:inherit;
}

/* side cart, Cosmika parks it at translateX(100%) */
#hero-demo .hd-side{
  position:absolute;top:0;right:0;bottom:0;width:min(330px,62%);z-index:16;
  background:#fff;border-left:1px solid var(--cx-border);box-shadow:var(--cx-shadow-lg);
  transform:translateX(100%);transition:transform .55s var(--hd-ease);
  display:flex;flex-direction:column;
}
#hero-demo .hd-side.is-on{transform:translateX(0)}
#hero-demo .hd-sidehead{display:flex;align-items:center;justify-content:space-between;padding:15px 16px;border-bottom:1px solid var(--cx-border)}
#hero-demo .hd-sidehead h2{margin:0;font-size:16px;font-weight:600}
#hero-demo .hd-sidebody{flex:1;padding:15px 16px;overflow:hidden}
#hero-demo .hd-lineitem{display:flex;gap:11px}
#hero-demo .hd-lthumb{width:52px;height:52px;border-radius:var(--cx-radius-sm);flex:none;overflow:hidden;background:var(--cx-surface-2)}
#hero-demo .hd-lthumb img{width:100%;height:100%;object-fit:cover;display:block}
#hero-demo .hd-lname{font-weight:600;font-size:13px}
#hero-demo .hd-lmeta{font-size:11.5px;color:var(--cx-ink-3);line-height:1.55;margin-top:3px}
#hero-demo .hd-rule{height:1px;background:var(--cx-border);margin:14px 0}
#hero-demo .hd-sum{display:flex;justify-content:space-between;font-size:13px;color:var(--cx-ink-2)}
#hero-demo .hd-sum.is-total{font-weight:700;font-size:15px;color:var(--cx-ink);font-family:var(--cx-mono);font-variant-numeric:tabular-nums}
#hero-demo .hd-sidefoot{padding:14px 16px;border-top:1px solid var(--cx-border)}

/* full-screen panes */
#hero-demo .hd-pane{
  position:absolute;inset:0;z-index:20;background:#fff;opacity:0;pointer-events:none;
  transform:translateY(8px);transition:opacity .45s var(--hd-ease),transform .5s var(--hd-ease);
}
#hero-demo .hd-pane.is-on{opacity:1;transform:none}

#hero-demo .hd-checkout{padding:22px 26px;height:100%}
#hero-demo .hd-h{margin:0 0 14px;font-size:19px;font-weight:600}
#hero-demo .hd-cols{display:grid;grid-template-columns:1fr 280px;gap:16px;align-items:start}
#hero-demo .hd-sec{border:1px solid var(--cx-border);border-radius:var(--cx-radius);padding:12px 14px;margin-bottom:9px;opacity:0;transform:translateY(8px);transition:opacity .45s var(--hd-ease),transform .45s var(--hd-ease)}
#hero-demo .hd-sec.is-in{opacity:1;transform:none}
#hero-demo .hd-seclabel{font-size:10px;color:var(--cx-ink-3);font-weight:600;text-transform:uppercase;letter-spacing:.06em;margin-bottom:6px}
#hero-demo .hd-row{display:flex;justify-content:space-between;gap:12px;font-size:12.5px}
#hero-demo .hd-row + .hd-row{margin-top:5px}
#hero-demo .hd-mute{color:var(--cx-ink-3)}
#hero-demo .hd-summary{border:1px solid var(--cx-border);border-radius:var(--cx-radius);padding:14px;background:#fafafa}

#hero-demo .hd-center{height:100%;display:grid;place-items:center;text-align:center;padding:24px}
#hero-demo .hd-spin{width:44px;height:44px;border-radius:50%;border:4px solid #ececec;border-top-color:var(--wm-theme);animation:hd-spin .85s linear infinite;margin:0 auto 14px}
@keyframes hd-spin{to{transform:rotate(360deg)}}
#hero-demo .hd-check{width:58px;height:58px;border-radius:50%;margin:0 auto 14px;display:grid;place-items:center;background:color-mix(in srgb,var(--wm-theme) 12%,#fff);color:var(--wm-theme);font-size:27px;font-weight:700}
#hero-demo .hd-center h3{font-size:19px;margin:0 0 5px;font-weight:600}
#hero-demo .hd-center p{margin:0;color:var(--cx-ink-3);font-size:13px}
#hero-demo .hd-no{display:inline-block;margin-top:9px;padding:6px 10px;border-radius:8px;background:#f4f4f4;font-weight:700;font-size:12.5px;font-family:var(--cx-mono)}
#hero-demo .hd-track{display:flex;gap:0;margin-top:14px;text-align:left}
#hero-demo .hd-step{flex:1;position:relative;padding-top:16px;font-size:10px;line-height:1.3;color:var(--cx-ink-3)}
#hero-demo .hd-step::before{content:"";position:absolute;top:3px;left:0;width:9px;height:9px;border-radius:50%;background:#e0e0e0}
#hero-demo .hd-step::after{content:"";position:absolute;top:7px;left:9px;right:0;height:1px;background:#e8e8e8}
#hero-demo .hd-step:last-child::after{display:none}
#hero-demo .hd-step.is-done{color:var(--cx-ink);font-weight:600}
#hero-demo .hd-step.is-done::before{background:var(--wm-theme)}
#hero-demo .hd-conf{width:min(330px,86%);border:1px solid var(--cx-border);border-radius:var(--cx-radius);padding:20px;box-shadow:var(--cx-shadow-md)}

/* merchant split */
#hero-demo .hd-dual{display:grid;grid-template-columns:1fr 1fr;height:100%;gap:0}
#hero-demo .hd-mini{display:grid;place-items:center;text-align:center;padding:20px;border-right:1px solid var(--cx-border)}
#hero-demo .hd-merchant{
  background:#1b211d;color:#fff;padding:22px 24px;display:flex;flex-direction:column;justify-content:center;
  transform:translateX(30px);opacity:0;transition:transform .6s var(--hd-ease),opacity .5s ease;
}
#hero-demo .hd-merchant.is-in{transform:none;opacity:1}
#hero-demo .hd-kicker{font-size:10px;color:#9fada3;text-transform:uppercase;letter-spacing:.09em;font-weight:700}
#hero-demo .hd-merchant h3{font-size:19px;margin:6px 0 2px;font-weight:600;font-family:var(--cx-mono)}
#hero-demo .hd-mitem{background:#252d27;border:1px solid #333d36;border-radius:var(--cx-radius-sm);padding:11px 12px;margin-top:13px}
#hero-demo .hd-mitem strong{display:block;font-size:13px;font-weight:600}
#hero-demo .hd-mitem small{color:#a9b4ac;line-height:1.5;font-size:11.5px}
#hero-demo .hd-mtotal{display:flex;justify-content:space-between;margin:13px 0;font-weight:700;font-size:14px;font-family:var(--cx-mono)}
#hero-demo .hd-mact{display:flex;gap:8px;transition:opacity .4s ease}
#hero-demo .hd-mact button{flex:1;border-radius:var(--cx-radius-sm);padding:9px;border:1px solid #3d4a42;background:#252d27;color:#fff;font-weight:600;font-size:12px;font-family:inherit}
#hero-demo .hd-mact .is-accept{background:var(--hd-wm);border-color:var(--hd-wm)}
#hero-demo .hd-accepted{margin-top:12px;padding:10px;border-radius:var(--cx-radius-sm);background:#17361a;color:#bfe3c1;font-weight:600;text-align:center;font-size:12px;opacity:0;transform:translateY(6px);transition:.45s var(--hd-ease)}
#hero-demo .hd-accepted.is-on{opacity:1;transform:none}
#hero-demo .hd-tiny{font-size:11.5px;color:var(--cx-ink-3);margin-top:9px}
#hero-demo .hd-prep{color:var(--hd-wm);font-weight:600}

/* cursor + controls */
#hero-demo .hd-cursor{
  position:absolute;width:24px;height:24px;border-radius:50%;z-index:40;opacity:0;
  border:2px solid color-mix(in srgb,var(--wm-theme) 70%,#fff);
  background:color-mix(in srgb,var(--wm-theme) 16%,transparent);
  transform:translate(-50%,-50%);pointer-events:none;
  transition:left .65s var(--hd-ease),top .65s var(--hd-ease),opacity .25s ease,transform .16s ease;
}
#hero-demo .hd-cursor.is-on{opacity:1}
#hero-demo .hd-cursor.is-click{transform:translate(-50%,-50%) scale(.6)}

#hero-demo .hd-controls{display:none;position:absolute;right:12px;bottom:9px;align-items:center;gap:8px;z-index:60}
#hero-demo.is-live .hd-controls{display:flex}
#hero-demo .hd-pips{display:flex;gap:5px}
#hero-demo .hd-pips i{width:6px;height:6px;border-radius:50%;background:#dcdcdc;transition:width .3s ease,background .3s ease}
#hero-demo .hd-pips i.is-on{width:17px;border-radius:999px;background:var(--hd-wm)}
#hero-demo .hd-toggle{
  width:25px;height:25px;border-radius:50%;border:1px solid var(--cx-border);background:#fff;
  display:grid;place-items:center;cursor:pointer;color:var(--cx-ink-2);padding:0;
}
#hero-demo .hd-toggle:focus-visible{outline:2px solid var(--hd-wm);outline-offset:2px}
#hero-demo .hd-toggle svg{width:10px;height:10px;fill:currentColor}

@media (max-width:900px){
  #hero-demo .hd-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  #hero-demo .hd-cols{grid-template-columns:1fr}
  #hero-demo .hd-checkout{overflow:auto;scrollbar-width:none}
}
@media (max-width:640px){
  /* The stacked layout needs real height: photo, then title, price, three option
     groups and the buy row all sit in one column. The old 430px floor clipped the
     modal's options and the checkout's Pay button. */
  #hero-demo{height:clamp(575px,152vw,650px);border-radius:14px}
  #hero-demo .hd-url{display:none}
  #hero-demo .hd-head,#hero-demo .hd-pills,#hero-demo .hd-grid{padding-left:13px;padding-right:13px}
  #hero-demo .hd-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}

  /* clear the control strip so it never sits on a button */
  #hero-demo .hd-modal{max-height:calc(100% - 46px);width:min(580px,90%)}
  /* photo row is fixed, details row takes the rest and scrolls rather than clipping */
  #hero-demo .hd-mgrid{grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr);gap:11px;padding:0 14px 14px}
  #hero-demo .hd-mfig{aspect-ratio:2.4/1}
  #hero-demo .hd-mcopy{display:none}          /* secondary in a 3-second beat */
  #hero-demo .hd-mtitle{font-size:16px}

  #hero-demo .hd-checkout{padding:14px 14px 32px;overflow:auto;scrollbar-width:none}
  #hero-demo .hd-checkout::-webkit-scrollbar{display:none}
  #hero-demo .hd-cols{grid-template-columns:1fr}
  #hero-demo .hd-dual{grid-template-columns:1fr 1.15fr}
  #hero-demo .hd-merchant{padding:14px}
  #hero-demo .hd-mact{flex-direction:column}
  #hero-demo .hd-side{width:min(330px,72%)}
}
@media (prefers-reduced-motion: reduce){
  #hero-demo *,#hero-demo *::before,#hero-demo *::after{
    animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;
  }
}
/* ============================================================
   Mode-specific scenes
   ============================================================ */

/* QR ordering: the table badge the ?tid= link puts a diner in */
#hero-demo .hd-table{
  display:inline-flex;align-items:center;gap:5px;padding:4px 9px;border-radius:999px;
  background:color-mix(in srgb,var(--wm-theme) 10%,#fff);color:var(--wm-theme);
  font-size:10.5px;font-weight:700;margin-top:3px;
}

/* WhatsApp ordering: the cart arriving as a chat message */
/* The pane is a column: bar (absolute) / thread (flexes) / composer (natural
   height). The composer used to be absolute, so a 3-line field sat on top of
   the bubbles. */
#hero-demo .hd-wapane{display:flex;flex-direction:column}
#hero-demo .hd-wa{height:100%;background:#efe7de;padding:56px 26px 12px;display:flex;flex-direction:column;justify-content:flex-end;gap:10px;overflow:hidden}
/* Only the WhatsApp-ordering pane is a column with a composer under it; the
   catalog enquire pane reuses .hd-wa on a plain block pane and needs the
   height:100% above to fill it. */
#hero-demo .hd-wapane .hd-wa{height:auto;flex:1;min-height:0}
#hero-demo .hd-wabar{
  position:absolute;top:0;left:0;right:0;height:46px;background:#075e54;color:#fff;
  display:flex;align-items:center;gap:10px;padding:0 16px;font-size:13px;font-weight:600;
}
#hero-demo .hd-waav{width:26px;height:26px;border-radius:50%;background:#128c7e;display:grid;place-items:center;font-size:11px;font-weight:700}
#hero-demo .hd-bubble{
  align-self:flex-end;max-width:72%;background:#d9fdd3;border-radius:12px 12px 2px 12px;
  padding:10px 12px;font-size:12.5px;line-height:1.55;color:#111b21;
  box-shadow:0 1px 1px rgba(11,20,26,.13);white-space:pre-line;
  animation:hd-pop .35s var(--hd-ease) both;   /* replays when [hidden] is removed */
}
/* Incoming: the merchant's reply. Named is-them, not is-in, because is-in is the
   shared "animate into view" flag used by strips, sections and the merchant pane. */
#hero-demo .hd-bubble.is-them{align-self:flex-start;background:#fff;border-radius:12px 12px 12px 2px}
#hero-demo .hd-bubble.is-them .hd-batime{text-align:left}
@keyframes hd-pop{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}

#hero-demo .hd-watyping{
  align-self:flex-start;background:#fff;border-radius:12px 12px 12px 2px;padding:11px 13px;
  display:flex;gap:4px;box-shadow:0 1px 1px rgba(11,20,26,.13);
  animation:hd-pop .3s var(--hd-ease) both;
}
#hero-demo .hd-watyping i{width:6px;height:6px;border-radius:50%;background:#9aa5ab;animation:hd-typing 1s infinite}
#hero-demo .hd-watyping i:nth-child(2){animation-delay:.15s}
#hero-demo .hd-watyping i:nth-child(3){animation-delay:.3s}
@keyframes hd-typing{0%,60%,100%{opacity:.35;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}

#hero-demo .hd-wacompose{
  flex:0 0 auto;background:#f0f2f5;display:flex;align-items:flex-end;gap:9px;padding:10px 14px;
}
#hero-demo .hd-wafield{
  flex:1;min-width:0;background:#fff;border-radius:16px;padding:9px 13px;font-size:12px;
  line-height:1.5;color:#111b21;box-shadow:0 1px 1px rgba(11,20,26,.08);
}
#hero-demo .hd-watext{
  white-space:pre-line;
  display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;
}
/* Empty input after send: the text goes, the placeholder takes its place, and the
   field collapses to one line so the thread grows back. */
#hero-demo .hd-waph{display:none;color:#8696a0}
#hero-demo .hd-wacompose.is-sent .hd-watext{display:none}
#hero-demo .hd-wacompose.is-sent .hd-waph{display:block}
#hero-demo .hd-wasend{
  flex:0 0 auto;width:34px;height:34px;border:0;border-radius:50%;background:#25d366;color:#fff;
  display:grid;place-items:center;cursor:default;padding:0;
}
#hero-demo .hd-bubble b{font-weight:700}
#hero-demo .hd-batime{display:block;text-align:right;font-size:10px;color:#667781;margin-top:3px}

/* QR ordering: the ticket the kitchen sees */
/* Scan scene — QR mode opens at the table tent card before the menu loads. */
#hero-demo .hd-scanwrap{height:100%;display:grid;place-content:center;justify-items:center;gap:14px;background:var(--cx-surface-2);padding:22px}
#hero-demo .hd-tent{background:#fff;border-radius:var(--cx-radius-sm);box-shadow:var(--cx-shadow-md);padding:18px 22px;text-align:center}
#hero-demo .hd-qr{position:relative;display:inline-block;line-height:0;overflow:hidden;border-radius:6px}
#hero-demo .hd-qr svg{display:block}
#hero-demo .hd-scanline{
  position:absolute;left:0;right:0;top:0;height:20px;opacity:0;
  background:linear-gradient(to bottom,rgba(45,133,45,0),rgba(45,133,45,.3));
  border-bottom:2px solid var(--hd-wm);
}
#hero-demo .hd-pane.is-on .hd-scanline{opacity:1;animation:hd-scan 1.25s var(--hd-ease) 2}
@keyframes hd-scan{from{transform:translateY(-20px)}to{transform:translateY(116px)}}
#hero-demo .hd-tentlabel{margin-top:11px;font-size:15px;font-weight:600;color:var(--cx-ink)}
#hero-demo .hd-tenthint{margin-top:2px;font-size:12px;color:var(--cx-ink-3)}
#hero-demo .hd-scandone{
  display:flex;align-items:center;gap:6px;font-size:13px;font-weight:600;color:var(--hd-wm);
  opacity:0;transform:translateY(6px);transition:opacity .35s var(--hd-ease),transform .35s var(--hd-ease);
}
#hero-demo .hd-scandone.is-on{opacity:1;transform:none}

#hero-demo .hd-kds{height:100%;display:grid;place-items:center;background:#f4f4f4;padding:22px}
#hero-demo .hd-ticket{
  width:min(290px,80%);background:#fff;border-radius:var(--cx-radius-sm);
  box-shadow:var(--cx-shadow-md);padding:16px 18px;font-family:var(--cx-mono);
}
#hero-demo .hd-tkhead{display:flex;justify-content:space-between;align-items:baseline;border-bottom:1px dashed var(--cx-border-2);padding-bottom:9px;margin-bottom:9px}
#hero-demo .hd-tkhead strong{font-size:15px}
#hero-demo .hd-tkline{font-size:12.5px;line-height:1.7}
#hero-demo .hd-tkopt{color:var(--cx-ink-3);font-size:11px;padding-left:14px}
#hero-demo .hd-tkfoot{border-top:1px dashed var(--cx-border-2);margin-top:9px;padding-top:9px;font-size:11px;color:var(--cx-ink-3);display:flex;justify-content:space-between}

/* Online catalog: no cart, the item ends in an enquiry */
#hero-demo.is-catalog .hd-cart{display:none}
#hero-demo .hd-btn.is-wa{background:#25d366}

/* ============================================================
   Bookings: the Reservations /book page, a different shell
   ============================================================ */
#hero-demo .hd-book{position:absolute;inset:0;display:flex;flex-direction:column;background:#fff}
/* Header mirrors book/show.blade.php: brand on the left, the step row pushed to
   the right with margin-inline-start:auto, each step a numbered circle. */
#hero-demo .hd-bkhead{display:flex;align-items:center;gap:12px;padding:13px 20px;border-bottom:1px solid var(--cx-border)}
#hero-demo .hd-bkbrand{display:flex;align-items:center;gap:10px}
#hero-demo .hd-bklogo{width:34px;height:34px;border-radius:10px;object-fit:cover;flex:0 0 auto;display:grid;place-items:center;background:var(--wm-theme);color:#fff;font-weight:700;font-size:15px}
#hero-demo .hd-bkname{font-weight:700;font-size:14px;line-height:1.2}
#hero-demo .hd-steps{display:flex;align-items:center;gap:9px;font-size:11px;color:var(--cx-ink-3);margin-inline-start:auto}
#hero-demo .hd-bstep{display:flex;align-items:center;gap:7px}
#hero-demo .hd-bstep .n{
  width:21px;height:21px;border-radius:50%;border:1px solid var(--cx-border);
  display:flex;align-items:center;justify-content:center;font-size:10px;flex:none;
}
#hero-demo .hd-bstep.is-on{color:var(--cx-ink);font-weight:600}
#hero-demo .hd-bstep.is-on .n{background:var(--wm-theme);color:#fff;border-color:var(--wm-theme)}
#hero-demo .hd-bstep.is-done .n{background:var(--hd-tint);color:var(--wm-theme);border-color:transparent}
#hero-demo .hd-sep{width:20px;height:1px;background:var(--cx-border);flex:none}
#hero-demo .hd-bbody{flex:1;min-height:0;padding:14px 20px 20px;position:relative}
#hero-demo .hd-bpane{position:absolute;inset:14px 20px 20px;opacity:0;transform:translateY(8px);pointer-events:none;transition:opacity .4s var(--hd-ease),transform .45s var(--hd-ease);overflow:auto;scrollbar-width:none}
#hero-demo .hd-bpane::-webkit-scrollbar{display:none}
#hero-demo .hd-bpane.is-on{opacity:1;transform:none}

/* step 1: service cards */
#hero-demo .hd-svcs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}
#hero-demo .hd-svc{
  border:1px solid var(--cx-border);border-radius:var(--cx-radius);overflow:hidden;background:#fff;
  transition:border-color .2s ease,box-shadow .2s ease,transform .2s ease;
}
#hero-demo .hd-svc.is-target{border-color:var(--wm-theme);box-shadow:var(--cx-shadow-md);transform:translateY(-2px)}
#hero-demo .hd-svcfig{aspect-ratio:16/10;background:var(--cx-surface-2);overflow:hidden}
#hero-demo .hd-svcfig img{width:100%;height:100%;object-fit:cover;display:block}
#hero-demo .hd-svcb{padding:10px 11px 11px}
#hero-demo .hd-svcn{font-size:13px;font-weight:600;line-height:1.3}
#hero-demo .hd-svcm{font-size:11px;color:var(--cx-ink-3);margin-top:4px}
#hero-demo .hd-svcp{margin-top:8px;font-family:var(--cx-mono);font-variant-numeric:tabular-nums;font-weight:700;font-size:13px}

/* step 2: month calendar + times */
#hero-demo .hd-cal2{display:grid;grid-template-columns:1.25fr 1fr;gap:18px;height:100%}
#hero-demo .hd-calhead{display:flex;align-items:center;justify-content:space-between;font-size:12px;font-weight:600;margin-bottom:9px}
#hero-demo .hd-grid7{display:grid;grid-template-columns:repeat(7,1fr);gap:3px}
#hero-demo .hd-dow{font-size:9.5px;color:var(--cx-ink-3);text-align:center;font-weight:600;padding-bottom:3px}
/* book/show.blade.php: .day is a circle, muted by default, tinted when open and
   solid accent when selected. No border, no square cells. */
#hero-demo .hd-day{
  aspect-ratio:1/1;display:flex;align-items:center;justify-content:center;
  border-radius:50%;border:0;background:none;font-size:11.5px;color:#b5b9c1;
}
#hero-demo .hd-day.is-open{background:var(--hd-tint);color:var(--wm-theme);font-weight:700}
#hero-demo .hd-day.is-pick{background:var(--wm-theme);color:#fff;font-weight:700}
#hero-demo .hd-tmlabel{font-size:10.5px;color:var(--cx-ink-3);font-weight:600;text-transform:uppercase;letter-spacing:.05em;margin-bottom:7px}
#hero-demo .hd-times{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
#hero-demo .hd-time{
  border:1px solid var(--cx-border);border-radius:var(--cx-radius-sm);padding:8px 0;text-align:center;
  font-size:12px;font-family:var(--cx-mono);font-variant-numeric:tabular-nums;
  transition:border-color .2s ease,background .2s ease,color .2s ease;
}
#hero-demo .hd-time.is-pick{border-color:var(--wm-theme);background:var(--wm-theme);color:#fff;font-weight:700}
#hero-demo .hd-time.is-full{opacity:.4}
#hero-demo .hd-staff{display:flex;align-items:center;gap:7px;margin-bottom:10px;font-size:11.5px;color:var(--cx-ink-2)}
#hero-demo .hd-stav{width:24px;height:24px;border-radius:50%;background:var(--cx-surface-2);overflow:hidden;flex:none}
#hero-demo .hd-stav img{width:100%;height:100%;object-fit:cover;display:block}

/* step 3: details */
#hero-demo .hd-form{display:grid;grid-template-columns:1fr 1fr;gap:9px 14px;align-content:start}
#hero-demo .hd-field{border:1px solid var(--cx-border);border-radius:var(--cx-radius-sm);padding:7px 11px}
#hero-demo .hd-flabel{font-size:9.5px;color:var(--cx-ink-3);font-weight:600;text-transform:uppercase;letter-spacing:.05em}
#hero-demo .hd-fval{font-size:12.5px;margin-top:2px}
#hero-demo .hd-fval.is-ph{color:#b9b9b9}
#hero-demo .hd-wide{grid-column:1 / -1}
#hero-demo .hd-bsubmit{grid-column:1 / -1;margin-top:4px}

@media (max-width:900px){
  #hero-demo .hd-svcs{grid-template-columns:repeat(2,minmax(0,1fr))}
  #hero-demo .hd-cal2{grid-template-columns:1fr;gap:12px}
}
@media (max-width:640px){
  #hero-demo .hd-bkhead{padding:11px 14px 0}
  #hero-demo .hd-bbody{padding:11px 14px 18px}
  #hero-demo .hd-bpane{inset:11px 14px 18px}
  #hero-demo .hd-svcs{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
  #hero-demo .hd-form{grid-template-columns:1fr}
  #hero-demo .hd-wa{padding:16px}
  #hero-demo .hd-bubble{max-width:86%}
}
