/**
 * Aroma News — public widget  @version 1.0.0
 *
 * One fixed `.an-root` bottom-LEFT at z-index 405: inside the 400–450 floating band,
 * and one step BELOW the ice cream truck (410) on purpose — when both are out the cup
 * sits above the truck, and the truck's card, which opens upward, must cover the cup
 * rather than slide underneath it. Nothing joins page layout; only transform/opacity
 * animate. Dark mode arrives two ways on this site, so every theme value is an `--an-*`
 * token flipped by the one dual selector below. The badge itself carries its own
 * colours and reads the same on both themes.
 */

/* ---- anchor + tokens ---- */
.an-root{
  /* --an-ink on --an-bg: #17506e on #fff is 8.6:1; dark #a9d8ee on #2d3748 is 7.9:1. */
  --an-blue:#3f8fb3;--an-ink:#17506e;
  --an-bg:#fff;--an-fg:#1a1a1a;--an-fg2:#4a4a4a;--an-line:#e2e8f0;
  --an-shade:rgba(15,23,42,.13);--an-glow:rgba(15,23,42,.28);
  /* --an-lift mirrors the truck's --ic-lift, and for the same measured reason:
     137px = the 94px .quick-actions-mobile bar + 16px gutter + the 27px label that
     hangs BELOW this 60px box (5px offset + a 22px pill). Change the label's size,
     padding or offset and this number must move with it. Pages with no bottom bar
     (businesses.html) override --an-lift instead of duplicating the rule. */
  position:fixed;left:16px;bottom:calc(var(--an-lift,137px) + env(safe-area-inset-bottom,0px));
  width:60px;height:60px;z-index:405;pointer-events:none;line-height:1.45;
  font-family:var(--font-body,-apple-system,system-ui,sans-serif)
}
/* Truck is out: clear its 60px box, this label's 27px, and a 12px gap - 12px, not 10, so the
   truck's card (which opens 12px above the truck) covers this label completely. */
.an-root.an-stack{bottom:calc(var(--an-lift,137px) + 99px + env(safe-area-inset-bottom,0px))}
[data-theme="dark"] .an-root, body.dark-mode .an-root{
  --an-ink:#a9d8ee;--an-bg:#2d3748;--an-fg:#f7fafc;--an-fg2:#e2e8f0;--an-line:#4a5568;
  --an-shade:rgba(0,0,0,.35);--an-glow:rgba(0,0,0,.55)
}
.an-root.an-hide{display:none}
.an-sr{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%)}
@media (min-width:769px){
  .an-root{left:24px;bottom:calc(var(--an-lift-lg,46px) + env(safe-area-inset-bottom,0px))}
  .an-root.an-stack{bottom:calc(var(--an-lift-lg,46px) + 99px + env(safe-area-inset-bottom,0px))}
}

/* ---- launcher ---- */
.an-btn{
  position:absolute;inset:0;padding:0;cursor:pointer;pointer-events:auto;border-radius:50%;
  display:block;border:0;background:none;-webkit-tap-highlight-color:transparent;
  box-shadow:0 6px 18px var(--an-glow),0 1px 3px rgba(15,23,42,.2);transition:transform .12s ease
}
.an-btn:active{transform:scale(.94)}
.an-svg{width:60px;height:60px;display:block;pointer-events:none;border-radius:50%}
/* The wording lives in CSS `content`, like the truck's: an empty span degrades to no
   label at all if this stylesheet fails to load. aria-hidden — the button's own
   aria-label carries the meaning. */
.an-cta::after{content:"Aroma Cafe"}
.an-cta{
  /* Left-aligned to the cup, not centred like the truck's shorter "Tap me": at
     90px wide a centred pill ends 1px from the screen edge on a phone. */
  position:absolute;top:calc(100% + 5px);left:-4px;
  pointer-events:auto;cursor:pointer;white-space:nowrap;
  font-size:11.5px;font-weight:800;letter-spacing:.01em;line-height:1;
  padding:4px 9px;border-radius:9999px;
  color:var(--an-ink);background:var(--an-bg);
  border:1.5px solid rgba(63,143,179,.6);
  box-shadow:0 2px 6px var(--an-shade)
}
.an-ring{position:absolute;inset:-5px;border:3px solid var(--an-blue);border-radius:50%;opacity:0}

/* ---- steam: three wisps, staggered, only while parked ---- */
/* stroke is an ATTRIBUTE on the paths: url(#id) in an external sheet resolves
   against the stylesheet on older WebKit, and the steam would vanish. */
.an-wisp{fill:none;stroke-width:3.2;stroke-linecap:round;opacity:0}
.an-idle .an-wisp{animation:an-rise 3s ease-in-out infinite}
.an-idle .an-w2{animation-delay:1s}
.an-idle .an-w3{animation-delay:2s}
@keyframes an-rise{0%{opacity:0;transform:translate3d(0,4px,0)}35%{opacity:1}100%{opacity:0;transform:translate3d(0,-6px,0)}}

/* ---- arrival / exit ---- */
.an-arriving .an-btn{animation:an-pop .7s cubic-bezier(.34,1.5,.64,1) both;will-change:transform}
.an-arriving .an-ring{animation:an-ring .8s ease-out .65s forwards}
/* Label waits for the cup to land before appearing. Base opacity is 1, so when
   .an-arriving is dropped it simply stays put with no flash. */
.an-arriving .an-cta{animation:an-in .35s ease .7s both}
.an-leaving .an-btn{animation:an-out .35s ease-in both}
.an-leaving .an-cta{animation:an-in .2s linear reverse both}
@keyframes an-pop{0%{opacity:0;transform:translate3d(0,26px,0) scale(.5) rotate(-14deg)}60%{opacity:1}100%{opacity:1;transform:none}}
@keyframes an-out{0%{opacity:1}100%{opacity:0;transform:translate3d(0,18px,0) scale(.7)}}
@keyframes an-ring{0%{opacity:.8;transform:scale(.8)}100%{opacity:0;transform:scale(1.6)}}
@keyframes an-in{from{opacity:0}to{opacity:1}}

/* ---- speech bubble: absolute in .an-root, flows UPWARD off the one anchor ----
   Name, note, one quiet line of time. No band, no button, no link: the cafe is
   saying one thing and the bubble's only job is to let it be read. */
.an-card{
  position:absolute;left:0;bottom:calc(100% + 15px);z-index:20;
  width:min(300px,calc(100vw - 32px));display:flex;flex-direction:column;
  max-height:min(360px,calc(100vh - 220px));max-height:min(360px,calc(100dvh - 220px));
  pointer-events:auto;transform-origin:30px 100%;background:var(--an-bg);color:var(--an-fg);
  border:1px solid var(--an-line);border-radius:18px;box-sizing:border-box;
  box-shadow:0 14px 34px -10px var(--an-glow),0 3px 10px rgba(15,23,42,.12)
}
.an-card[hidden],.an-card [hidden]{display:none}
.an-card.an-open{animation:an-card-in .28s cubic-bezier(.34,1.28,.64,1) both}
.an-card.an-closing{animation:an-card-out .18s ease-in both}
@keyframes an-card-in{0%{opacity:0;transform:translate3d(0,10px,0) scale(.92)}100%{opacity:1;transform:none}}
@keyframes an-card-out{0%{opacity:1}100%{opacity:0;transform:translate3d(0,6px,0) scale(.96)}}
/* The tail: a rotated square showing only its two lower edges, centred on the cup
   (30px = half the 60px launcher). */
.an-tail{
  position:absolute;left:23px;bottom:-8px;width:14px;height:14px;transform:rotate(45deg);
  background:var(--an-bg);border-right:1px solid var(--an-line);border-bottom:1px solid var(--an-line);
  border-bottom-right-radius:3px
}

.an-hd{flex:none;display:flex;align-items:flex-start;gap:.5rem;padding:.35rem .35rem 0 1.1rem}
.an-ttl{flex:1;min-width:0;margin:0;padding-top:.7rem;font:800 1.02rem/1.25 var(--font-heading,system-ui,sans-serif);color:var(--an-ink)}
.an-x{
  flex:none;width:44px;height:44px;padding:0;cursor:pointer;
  display:flex;align-items:center;justify-content:center;background:none;border:0;
  border-radius:50%;color:var(--an-fg2);font-size:22px;line-height:1
}
.an-bd{flex:1 1 auto;overflow-y:auto;padding:.1rem 1.1rem 1rem}
.an-bd > p{margin:0}
.an-ttl,.an-note{overflow-wrap:anywhere}
.an-note{font-size:1.08rem;font-weight:500;line-height:1.45;color:var(--an-fg)}
.an-bye{color:var(--an-fg);font-weight:600}
.an-when{margin-top:.55rem !important;color:var(--an-fg2);font-size:.8rem}

.an-btn:focus-visible,.an-x:focus-visible{outline:3px solid var(--primary-blue,#1a73e8);outline-offset:3px}
.an-x:focus-visible{outline-offset:-4px}
@media (hover:hover){
  .an-btn:hover{transform:translateY(-2px) scale(1.05);box-shadow:0 10px 24px var(--an-glow),0 2px 5px rgba(15,23,42,.24)}
  .an-x:hover{background:var(--an-line);color:var(--an-fg)}
}
.an-x{transition:background .15s ease,color .15s ease}

/* ---- reduced motion, not reduced function: the steam stands still, travel becomes a fade ---- */
@media (prefers-reduced-motion:reduce){
  .an-idle .an-wisp{animation:none !important;opacity:.85}
  .an-arriving .an-ring{animation:none !important}
  .an-arriving .an-btn,.an-arriving .an-cta,.an-card.an-open{animation:an-in .18s linear both !important;will-change:auto}
  .an-leaving .an-btn,.an-card.an-closing{animation:an-in .15s linear reverse both !important}
  .an-btn,.an-x{transition:none}
  .an-btn:hover{transform:none}
}
