/* BrainBean Technolabs · Growth Bot (v3, expressive eyes)
   Scoped under .g2gw. Reads the site's Tailwind theme variables when present.
   Eye shapes are driven by registered custom properties so every expression morphs smoothly. */

/* ---------- animatable face parameters ---------- */
@property --gw-ewL { syntax: "<number>"; inherits: true; initial-value: 12; }
@property --gw-ehL { syntax: "<number>"; inherits: true; initial-value: 18; }
@property --gw-erL { syntax: "<number>"; inherits: true; initial-value: 6; }
@property --gw-ltL { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --gw-lbL { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --gw-brL { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --gw-ewR { syntax: "<number>"; inherits: true; initial-value: 12; }
@property --gw-ehR { syntax: "<number>"; inherits: true; initial-value: 18; }
@property --gw-erR { syntax: "<number>"; inherits: true; initial-value: 6; }
@property --gw-ltR { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --gw-lbR { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --gw-brR { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --gw-gap { syntax: "<number>"; inherits: true; initial-value: 10; }
@property --gw-tilt { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --gw-dy { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --gw-blush { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --gw-lx { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --gw-ly { syntax: "<number>"; inherits: true; initial-value: 0; }

.g2gw {
  --g2gw-navy: var(--color-navy-900, #0b1736);
  --g2gw-green: var(--color-green, #00b8d4);
  --g2gw-green-600: var(--color-green-600, #0891b2);
  --g2gw-green-soft: var(--color-green-soft, #cff4fb);
  --g2gw-green-ink: #166846;
  --g2gw-mist: var(--color-navy-50, #f4f6fb);
  --g2gw-line: var(--color-hairline, #e6e9f2);
  --g2gw-muted: var(--color-muted-foreground, #5b6480);
  --g2gw-wa: var(--color-whatsapp, #25d366);
  --g2gw-away: #aab2c8;
  --g2gw-screen: #060f26;
  --g2gw-sans: var(--font-sans, "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif);
  --g2gw-display: var(--font-display, "Sora", ui-sans-serif, system-ui, sans-serif);
  --g2gw-ease: cubic-bezier(.2, .8, .2, 1);
  --g2gw-spring: cubic-bezier(.34, 1.56, .64, 1);

  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  font-family: var(--g2gw-sans);
  font-size: 14px;
  line-height: 1.45;
  color: var(--g2gw-navy);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

:where(.g2gw) *, :where(.g2gw) *::before, :where(.g2gw) *::after { box-sizing: border-box; }
:where(.g2gw) :where(button) { font: inherit; color: inherit; background: none; border: 0; margin: 0; padding: 0; cursor: pointer; }
:where(.g2gw) :where(a) { color: inherit; text-decoration: none; }
:where(.g2gw) :where(p) { margin: 0; }
:where(.g2gw) :where(svg) { display: block; flex-shrink: 0; }
.g2gw [hidden] { display: none !important; }
.g2gw :focus-visible { outline: 2px solid var(--g2gw-green-600); outline-offset: 2px; }

/* =====================================================================
   THE FACE — a dark screen with two glowing eyes, nothing else
   ===================================================================== */
.g2gw-face {
  --k: 1px;                               /* 1 unit = 1/64 of the face */
  --eye: var(--g2gw-green);
  --eye-glow: rgba(0,184,212, .7);
  position: relative;
  display: block;
  width: calc(64 * var(--k));
  height: calc(64 * var(--k));
  transition:
    --gw-ewL .32s var(--g2gw-ease), --gw-ehL .32s var(--g2gw-ease), --gw-erL .32s var(--g2gw-ease),
    --gw-ltL .3s var(--g2gw-ease), --gw-lbL .3s var(--g2gw-ease), --gw-brL .3s var(--g2gw-ease),
    --gw-ewR .32s var(--g2gw-ease), --gw-ehR .32s var(--g2gw-ease), --gw-erR .32s var(--g2gw-ease),
    --gw-ltR .3s var(--g2gw-ease), --gw-lbR .3s var(--g2gw-ease), --gw-brR .3s var(--g2gw-ease),
    --gw-gap .32s var(--g2gw-ease), --gw-tilt .45s var(--g2gw-spring), --gw-dy .45s var(--g2gw-ease),
    --gw-blush .4s ease, --gw-lx .16s ease-out, --gw-ly .16s ease-out;
}
.g2gw-head {
  position: absolute;
  inset: 0;
  transform: translateY(calc(var(--gw-dy) * var(--k))) rotate(calc(var(--gw-tilt) * 1deg));
}
.g2gw-bob { position: absolute; inset: 0; }
.g2gw-screen {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: calc(22 * var(--k));
  background: var(--g2gw-screen);
  box-shadow:
    inset 0 0 0 calc(1.5 * var(--k)) rgba(255, 255, 255, .13),
    inset 0 calc(-6 * var(--k)) calc(14 * var(--k)) rgba(0,184,212, .07);
}
/* glass reflection sits above everything so lids and eyes share the same screen colour */
.g2gw-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(160deg, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, 0) 38%);
  pointer-events: none;
}

.g2gw-eyes {
  position: absolute;
  left: 50%;
  top: 50%;
  display: flex;
  align-items: center;
  gap: calc(var(--gw-gap) * var(--k));
  transform: translate(-50%, -50%) translate(calc(var(--gw-lx) * var(--k)), calc(var(--gw-ly) * var(--k)));
}
.g2gw-eye {
  --ew: var(--gw-ewL); --eh: var(--gw-ehL); --er: var(--gw-erL);
  --lt: var(--gw-ltL); --lb: var(--gw-lbL); --br: var(--gw-brL);
  position: relative;
  display: grid;
  place-items: center;
  width: calc(var(--ew) * var(--k));
  height: calc(var(--eh) * var(--k));
  filter: drop-shadow(0 0 calc(4 * var(--k)) var(--eye-glow));
}
/* right eye mirrors the brow angle */
.g2gw-eye--r {
  --ew: var(--gw-ewR); --eh: var(--gw-ehR); --er: var(--gw-erR);
  --lt: var(--gw-ltR); --lb: var(--gw-lbR); --br: calc(var(--gw-brR) * -1);
}
.g2gw-eye-shape {
  /* outer layer rounds and clips; it has no paint of its own, so no edge can leak */
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: calc(var(--er) * var(--k));
  transition: transform .09s ease-in, opacity .2s ease;
}
.g2gw-eye-fill {
  /* inner layer: square-cornered colour, masked by the lids.
     top lid = angled cut from above (brows); bottom lid = dome rising from below (smiles) */
  position: absolute;
  inset: 0;
  background: var(--eye);
  -webkit-mask-image:
    linear-gradient(calc(180deg + var(--br) * 1deg), transparent calc(var(--lt) * 1%), #000 calc(var(--lt) * 1% + .6px)),
    radial-gradient(95% calc((var(--lb) + 40) * 1%) at 50% 140%, transparent 97%, #000 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(calc(180deg + var(--br) * 1deg), transparent calc(var(--lt) * 1%), #000 calc(var(--lt) * 1% + .6px)),
    radial-gradient(95% calc((var(--lb) + 40) * 1%) at 50% 140%, transparent 97%, #000 100%);
  mask-composite: intersect;
}
.g2gw-face.is-blink .g2gw-eye-shape { transform: scaleY(.08); }

/* special eye shapes */
.g2gw-glyph {
  position: absolute;
  inset: -2px;
  display: grid;
  place-items: center;
  color: var(--eye);
  opacity: 0;
  transform: scale(.4);
  transition: opacity .2s ease, transform .35s var(--g2gw-spring);
}
.g2gw-glyph svg { display: none; width: 100%; height: 100%; }
.g2gw-face:not([data-glyph=""]) .g2gw-eye-shape { opacity: 0; }
.g2gw-face:not([data-glyph=""]) .g2gw-glyph { opacity: 1; transform: none; }
.g2gw-face[data-glyph="heart"] [data-g="heart"],
.g2gw-face[data-glyph="star"] [data-g="star"],
.g2gw-face[data-glyph="spiral"] [data-g="spiral"],
.g2gw-face[data-glyph="rupee"] [data-g="rupee"] { display: block; }
.g2gw-face[data-glyph="heart"] .g2gw-eye { --eye-glow: rgba(255, 92, 147, .75); }
.g2gw-face[data-glyph="star"] .g2gw-eye { --eye-glow: rgba(255, 209, 102, .75); }
.g2gw-face[data-glyph="spiral"] [data-g="spiral"] { animation: g2gw-spin 1.1s linear infinite; }
.g2gw-face[data-glyph="star"] [data-g="star"] { animation: g2gw-twinkle 1.4s ease-in-out infinite; }
.g2gw-face[data-glyph="heart"] [data-g="heart"] { animation: g2gw-beat .9s ease-in-out infinite; }
.g2gw-face[data-party="1"] .g2gw-eyes { animation: g2gw-hue 1.2s linear infinite; }

.g2gw-cheek {
  position: absolute;
  top: 62%;
  width: calc(12 * var(--k));
  height: calc(6 * var(--k));
  border-radius: 50%;
  background: #ff6f9f;
  filter: blur(calc(2 * var(--k)));
  opacity: calc(var(--gw-blush) * .8);
}
.g2gw-cheek--l { left: 14%; }
.g2gw-cheek--r { right: 14%; }

.g2gw-shades {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(50 * var(--k));
  margin-left: calc(-25 * var(--k));
  margin-top: calc(-10 * var(--k));
  opacity: 0;
  transform: translateY(calc(-40 * var(--k)));
  transition: transform .45s var(--g2gw-spring), opacity .2s ease;
}
.g2gw-face[data-shades="1"] .g2gw-shades { opacity: 1; transform: none; }

/* whole-head motion, one-shot unless noted */
.g2gw-face[data-anim="bounce"] .g2gw-bob { animation: g2gw-bounce .7s var(--g2gw-ease); }
.g2gw-face[data-anim="hop"] .g2gw-bob { animation: g2gw-hop .55s var(--g2gw-ease) 2; }
.g2gw-face[data-anim="jump"] .g2gw-bob { animation: g2gw-jump .45s var(--g2gw-ease); }
.g2gw-face[data-anim="shake"] .g2gw-bob { animation: g2gw-shake .5s ease-in-out; }
.g2gw-face[data-anim="wobble"] .g2gw-bob { animation: g2gw-wobble .6s ease-in-out 3; }
.g2gw-face[data-anim="pulse"] .g2gw-bob { animation: g2gw-pulse .8s ease-in-out 2; }
.g2gw-face[data-anim="nod"] .g2gw-bob { animation: g2gw-nod .5s ease-in-out 2; }
.g2gw-face[data-anim="shiver"] .g2gw-bob { animation: g2gw-shiver .12s linear 10; }
.g2gw-face[data-anim="breathe"] .g2gw-bob { animation: g2gw-breathe 3.2s ease-in-out infinite; }

@keyframes g2gw-bounce { 0%, 100% { transform: none; } 30% { transform: translateY(-4px); } 60% { transform: translateY(0); } 80% { transform: translateY(-1.5px); } }
@keyframes g2gw-hop { 0%, 100% { transform: none; } 35% { transform: translateY(-7px) scale(1.02, .98); } 70% { transform: translateY(0) scale(1.04, .94); } }
@keyframes g2gw-jump { 0%, 100% { transform: none; } 40% { transform: translateY(-9px); } }
@keyframes g2gw-shake { 0%, 100% { transform: none; } 20%, 60% { transform: translateX(-3px); } 40%, 80% { transform: translateX(3px); } }
@keyframes g2gw-wobble { 0%, 100% { transform: none; } 25% { transform: rotate(-9deg); } 75% { transform: rotate(9deg); } }
@keyframes g2gw-pulse { 0%, 100% { transform: none; } 50% { transform: scale(1.07); } }
@keyframes g2gw-nod { 0%, 100% { transform: none; } 50% { transform: translateY(2.5px); } }
@keyframes g2gw-shiver { 0%, 100% { transform: translateX(-1px); } 50% { transform: translateX(1px); } }
@keyframes g2gw-breathe { 0%, 100% { transform: none; } 50% { transform: scale(1.025); } }
@keyframes g2gw-spin { to { transform: rotate(360deg); } }
@keyframes g2gw-twinkle { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(.8) rotate(20deg); } }
@keyframes g2gw-beat { 0%, 100% { transform: scale(1); } 30% { transform: scale(1.14); } 60% { transform: scale(.96); } }
@keyframes g2gw-hue { to { filter: hue-rotate(360deg); } }

/* ---------- particles (hearts, zzz, tears …) ---------- */
.g2gw-fx { position: absolute; inset: 0; pointer-events: none; }
.g2gw-p {
  position: absolute;
  left: 50%;
  top: 30%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  display: grid;
  place-items: center;
  font-family: var(--g2gw-display);
  font-weight: 800;
  line-height: 1;
  animation: g2gw-float 1.8s ease-out forwards;
}
.g2gw-p svg { width: 100%; height: 100%; }
.g2gw-p--heart { color: #ff5c93; }
.g2gw-p--sparkle { color: #ffd166; left: calc(50% + var(--sx, 0px)); top: calc(40% + var(--sy, 0px)); animation-name: g2gw-sparkle; animation-duration: 1.1s; }
.g2gw-p--zzz { left: 78%; top: 12%; width: auto; height: auto; font-size: 13px; color: #c9d2ea; animation-name: g2gw-zzz; animation-duration: 2.4s; }
.g2gw-p--tear { left: 34%; top: 60%; width: 7px; height: 9px; color: #8fd3ff; animation-name: g2gw-tear; animation-duration: 1.4s; animation-timing-function: ease-in; }
.g2gw-p--sweat { left: 84%; top: 14%; width: 7px; height: 9px; color: #8fd3ff; animation-name: g2gw-tear; animation-duration: 1.6s; animation-timing-function: ease-in; }
.g2gw-p--q, .g2gw-p--bang { left: 86%; top: 4%; width: auto; height: auto; font-size: 16px; color: var(--g2gw-green); animation-name: g2gw-pop-up; animation-duration: 1.5s; }
.g2gw-p--note { color: #ffd166; font-size: 14px; width: auto; height: auto; }

@keyframes g2gw-float {
  0% { opacity: 0; transform: translate(0, 0) scale(.5); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx, 0px), -46px) scale(1.1); }
}
@keyframes g2gw-sparkle {
  0% { opacity: 0; transform: scale(0) rotate(0); }
  40% { opacity: 1; transform: scale(1) rotate(45deg); }
  100% { opacity: 0; transform: scale(.2) rotate(90deg); }
}
@keyframes g2gw-zzz {
  0% { opacity: 0; transform: translate(0, 0) scale(.6); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(14px, -30px) scale(1.3); }
}
@keyframes g2gw-tear {
  0% { opacity: 0; transform: translateY(0) scale(.6); }
  20% { opacity: 1; transform: translateY(2px) scale(1); }
  100% { opacity: 0; transform: translateY(20px) scale(.9); }
}
@keyframes g2gw-pop-up {
  0% { opacity: 0; transform: translateY(6px) scale(.4); }
  25% { opacity: 1; transform: translateY(0) scale(1.15); }
  75% { opacity: 1; transform: translateY(-4px) scale(1); }
  100% { opacity: 0; transform: translateY(-10px); }
}

/* =====================================================================
   LAUNCHER
   ===================================================================== */
.g2gw-fab {
  position: relative;
  z-index: 1;
  display: block;
  width: 64px;
  height: 64px;
  border-radius: 22px;
  filter: drop-shadow(0 16px 22px rgba(11, 23, 54, .38));
  transition: transform .22s var(--g2gw-ease), opacity .2s ease, visibility 0s linear 0s;
}
.g2gw-fab:active { transform: scale(.95); }
.g2gw-fab:focus-visible { outline-offset: 4px; }
.g2gw-fab-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--g2gw-green);
  border: 3px solid #fff;
  transition: transform .2s var(--g2gw-ease), background-color .2s ease;
}
.g2gw[data-status="away"] .g2gw-fab-dot { background: var(--g2gw-away); }
.g2gw-fab[aria-expanded="true"] .g2gw-fab-dot { transform: scale(0); }

/* =====================================================================
   SPEECH BUBBLE
   ===================================================================== */
.g2gw-say {
  position: absolute;
  z-index: 1;
  right: calc(100% + 14px);
  bottom: 4px;
  width: max-content;
  max-width: 272px;
  opacity: 0;
  transform: translateX(8px) scale(.94);
  transform-origin: 100% 100%;
  transition: opacity .22s ease, transform .35s var(--g2gw-spring);
}
.g2gw-say[data-show="true"] { opacity: 1; transform: none; }
.g2gw-say-card {
  padding: 13px 38px 13px 15px;
  background: #fff;
  border: 1px solid var(--g2gw-line);
  border-radius: 18px 18px 6px 18px;
  box-shadow: 0 20px 44px -20px rgba(11, 23, 54, .5);
  cursor: pointer;
}
.g2gw-say-text { font-size: 13.5px; line-height: 1.5; color: var(--g2gw-navy); }
.g2gw-say-dots { display: none; gap: 4px; padding: 5px 2px; }
.g2gw-say-dots i { width: 6px; height: 6px; border-radius: 50%; background: #9aa3bd; animation: g2gw-dot 1s ease-in-out infinite; }
.g2gw-say-dots i:nth-child(2) { animation-delay: .15s; }
.g2gw-say-dots i:nth-child(3) { animation-delay: .3s; }
.g2gw-say[data-typing="1"] .g2gw-say-dots { display: inline-flex; }
.g2gw-say[data-typing="1"] .g2gw-say-text,
.g2gw-say[data-typing="1"] .g2gw-say-cta { display: none; }
.g2gw-say-cta:empty { display: none; }
.g2gw-say-cta { margin-top: 10px; }
.g2gw-say-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--g2gw-navy);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  transition: background-color .15s ease, transform .2s var(--g2gw-ease);
}
.g2gw-say-btn svg { width: 14px; height: 14px; color: var(--g2gw-green); }
.g2gw-say-x {
  position: absolute;
  top: 7px;
  right: 7px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: var(--g2gw-muted);
}
.g2gw-say-x svg { width: 13px; height: 13px; }

/* =====================================================================
   PANEL
   ===================================================================== */
.g2gw-panel {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: calc(100% + 14px);
  display: flex;
  flex-direction: column;
  width: 360px;
  max-width: calc(100vw - 32px);
  max-height: min(620px, calc(100vh - 140px));
  max-height: min(620px, calc(100dvh - 140px));
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--g2gw-line);
  border-radius: 24px;
  box-shadow: 0 30px 70px -24px rgba(11, 23, 54, .45), 0 2px 6px rgba(11, 23, 54, .05);
  opacity: 0;
  transform: translateY(12px) scale(.94);
  transform-origin: calc(100% - 32px) calc(100% + 46px);
  transition: opacity .18s ease, transform .28s var(--g2gw-ease);
}
.g2gw-panel:focus { outline: none; }
.g2gw[data-open="true"] .g2gw-panel { opacity: 1; transform: none; }

.g2gw-head-bar {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 14px 16px 16px;
  overflow: hidden;
  isolation: isolate;
  background: var(--g2gw-navy);
  color: #fff;
}
.g2gw-head-bar::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -100px;
  right: -80px;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0,184,212, .26), rgba(0,184,212, 0));
}
.g2gw-handle { display: none; }
.g2gw-avatar { position: relative; flex: none; }
.g2gw-avatar .g2gw-face { --k: .75px; }
.g2gw-avatar-dot {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--g2gw-green);
  border: 3px solid var(--g2gw-navy);
}
.g2gw[data-status="away"] .g2gw-avatar-dot { background: var(--g2gw-away); }
.g2gw-id { min-width: 0; }
.g2gw-title { font-family: var(--g2gw-display); font-size: 16px; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }
.g2gw-status { margin-top: 3px; font-size: 12.5px; color: rgba(255, 255, 255, .7); }
.g2gw-close {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  margin-left: auto;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  color: #fff;
}
.g2gw-close svg { width: 17px; height: 17px; }

.g2gw-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 18px 16px 4px; }
.g2gw-thread { display: grid; justify-items: start; gap: 5px; min-height: 46px; margin-bottom: 16px; }
.g2gw-bubble {
  max-width: 92%;
  padding: 11px 14px;
  background: var(--g2gw-mist);
  border-radius: 18px 18px 18px 6px;
  font-size: 14px;
  line-height: 1.5;
  animation: g2gw-msg .3s var(--g2gw-ease) both;
}
.g2gw-bubble + .g2gw-bubble { border-top-left-radius: 6px; animation-delay: .12s; }
.g2gw-typing { display: inline-flex; gap: 4px; padding: 15px 16px; background: var(--g2gw-mist); border-radius: 18px 18px 18px 6px; }
.g2gw-typing i { width: 6px; height: 6px; border-radius: 50%; background: #9aa3bd; animation: g2gw-dot 1s ease-in-out infinite; }
.g2gw-typing i:nth-child(2) { animation-delay: .15s; }
.g2gw-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes g2gw-dot { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-3px); opacity: 1; } }
@keyframes g2gw-msg { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.g2gw-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.g2gw-row {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid var(--g2gw-line);
  border-radius: 16px;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.g2gw-row-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 11px 8px 11px 11px; border-radius: 15px; }
.g2gw-row--copy .g2gw-row-link { padding-right: 4px; }
.g2gw-tile { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; }
.g2gw-tile svg { width: 21px; height: 21px; }
.g2gw-tile--wa { background: #e3f9ec; color: var(--g2gw-wa); }
.g2gw-tile--call { background: var(--g2gw-green-soft); color: #12955f; }
.g2gw-tile--mail { background: #e9eefc; color: #4262d8; }
.g2gw-text { flex: 1; min-width: 0; }
.g2gw-row-title { display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 600; line-height: 1.3; }
.g2gw-row-detail { display: block; margin-top: 2px; overflow: hidden; font-size: 12.5px; color: var(--g2gw-muted); white-space: nowrap; text-overflow: ellipsis; }
.g2gw-badge { padding: 4px 7px; border-radius: 999px; background: var(--g2gw-green-soft); color: var(--g2gw-green-ink); font-size: 10.5px; font-weight: 700; line-height: 1; }
.g2gw-badge--muted { background: var(--g2gw-mist); color: var(--g2gw-muted); }
.g2gw-end { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: #8b93ab; transition: background-color .15s ease, color .15s ease, transform .2s var(--g2gw-ease); }
.g2gw-end svg { width: 17px; height: 17px; }
.g2gw-copy { margin-right: 8px; }
.g2gw-copy[data-copied="true"] { background: var(--g2gw-green-soft); color: var(--g2gw-green-ink); }

.g2gw-foot { flex: none; padding: 14px 16px; background: #fff; }
.g2gw-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 50px;
  border-radius: 15px;
  background: var(--g2gw-green);
  color: var(--g2gw-navy);
  font-size: 14.5px;
  font-weight: 700;
  box-shadow: 0 12px 24px -14px rgba(8,145,178, .9);
  transition: transform .2s var(--g2gw-ease), background-color .15s ease;
}
.g2gw-cta svg { width: 17px; height: 17px; }
.g2gw-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; font-size: 12px; color: var(--g2gw-muted); }
.g2gw-hours { display: flex; align-items: center; gap: 6px; }
.g2gw-hours svg { width: 14px; height: 14px; }
.g2gw-quiet { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; margin-right: -8px; border-radius: 999px; color: var(--g2gw-muted); font-size: 12px; }
.g2gw-quiet svg { width: 14px; height: 14px; }
.g2gw-quiet[aria-pressed="true"] { color: var(--g2gw-navy); background: var(--g2gw-mist); }

.g2gw-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.g2gw-scrim { display: none; }

@media (hover: hover) {
  .g2gw-fab:hover { transform: translateY(-2px); }
  .g2gw-say-x:hover { background: var(--g2gw-mist); color: var(--g2gw-navy); }
  .g2gw-say-btn:hover { background: #1a2a55; transform: translateY(-1px); }
  .g2gw-row:hover { border-color: #cfd6e8; background: #fbfcfe; box-shadow: 0 8px 18px -14px rgba(11, 23, 54, .4); }
  .g2gw-row-link:hover .g2gw-end { color: var(--g2gw-navy); transform: translate(1px, -1px); }
  .g2gw-copy:hover { background: var(--g2gw-mist); color: var(--g2gw-navy); }
  .g2gw-copy[data-copied="true"]:hover { background: var(--g2gw-green-soft); color: var(--g2gw-green-ink); }
  .g2gw-cta:hover { background: #22c3e6; transform: translateY(-1px); }
  .g2gw-close:hover { background: rgba(255, 255, 255, .16); }
  .g2gw-quiet:hover { color: var(--g2gw-navy); }
}

/* ---------- phones: bottom sheet ---------- */
@media (max-width: 520px) {
  .g2gw { right: 16px; bottom: 16px; }
  .g2gw-fab { width: 58px; height: 58px; border-radius: 20px; }
  .g2gw-fab .g2gw-face { --k: .90625px; }
  .g2gw-scrim { display: block; position: fixed; z-index: 0; inset: 0; background: rgba(11, 23, 54, .5); opacity: 0; transition: opacity .28s ease; }
  .g2gw[data-open="true"] .g2gw-scrim { opacity: 1; }
  .g2gw-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    max-width: none;
    max-height: 86vh;
    max-height: 86dvh;
    border-width: 1px 0 0;
    border-radius: 26px 26px 0 0;
    opacity: 1;
    transform: translateY(104%);
    transition: transform .34s var(--g2gw-ease);
  }
  .g2gw[data-open="true"] .g2gw-panel { transform: none; }
  .g2gw[data-open="true"] .g2gw-fab { opacity: 0; transform: scale(.6); visibility: hidden; transition: transform .22s var(--g2gw-ease), opacity .2s ease, visibility 0s linear .2s; }
  .g2gw-head-bar { padding-top: 26px; touch-action: none; }
  .g2gw-handle { display: block; position: absolute; top: 10px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: rgba(255, 255, 255, .3); }
  .g2gw-foot { padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
  .g2gw-say { max-width: calc(100vw - 106px); }
}

/* ---------- short screens (phones in landscape) ---------- */
@media (max-height: 560px) and (min-width: 521px) {
  .g2gw { right: 16px; bottom: 16px; }
  .g2gw-panel { bottom: calc(100% + 10px); max-height: calc(100vh - 102px); max-height: calc(100dvh - 102px); }
  .g2gw-head-bar { padding: 10px 12px; }
  .g2gw-avatar .g2gw-face { --k: .5625px; }
  .g2gw-title { font-size: 15px; }
  .g2gw-body { padding: 10px 12px 2px; }
  .g2gw-thread { min-height: 0; margin-bottom: 8px; }
  .g2gw-bubble { padding: 8px 12px; font-size: 13.5px; }
  .g2gw-list { gap: 6px; }
  .g2gw-row-link { gap: 10px; padding-top: 6px; padding-bottom: 6px; }
  .g2gw-tile { width: 34px; height: 34px; border-radius: 11px; }
  .g2gw-tile svg { width: 18px; height: 18px; }
  .g2gw-foot { padding: 8px 12px 10px; }
  .g2gw-cta { height: 42px; border-radius: 13px; }
  .g2gw-meta { display: none; }
}

/* Reduced motion: expressions still change, but instantly, and nothing bounces, spins or floats */
@media (prefers-reduced-motion: reduce) {
  .g2gw *, .g2gw *::before, .g2gw *::after { animation: none !important; transition-duration: 1ms !important; transition-delay: 0s !important; }
  .g2gw-face { transition-duration: 1ms !important; }
  .g2gw-fx { display: none; }
}
