.gchat { --gchat-teal: #0F4C5C; --gchat-teal-dark: #0B3A47; --gchat-coral: #FF6F59; --gchat-coral-hover: #F4634D; --gchat-ink: #1E2D33; font-family: inherit; }
.gchat-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.gchat-bubble {
  position: fixed; right: max(1rem, env(safe-area-inset-right, 0px)); bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); z-index: 40;
  display: inline-flex; align-items: center; gap: .5rem; min-height: 3.25rem; padding: .7rem 1.1rem .7rem .9rem;
  border: 2px solid var(--gchat-teal); border-radius: 999px; background: var(--gchat-coral); color: var(--gchat-ink);
  font: 600 1rem/1.1 inherit; cursor: pointer; box-shadow: 0 10px 28px -10px rgba(11, 58, 71, .55);
}
.gchat-bubble:hover { background: var(--gchat-coral-hover); }
.gchat-bubble:focus-visible, .gchat button:focus-visible, .gchat a:focus-visible, .gchat textarea:focus-visible, .gchat-log:focus-visible { outline: 3px solid var(--gchat-teal); outline-offset: 2px; }
.gchat-bubble:focus-visible { outline-color: var(--gchat-ink); }
.gchat.is-open .gchat-bubble { display: none; }
body.consent-banner-visible .gchat-bubble { bottom: calc(var(--consent-banner-space, 8.5rem) + 1rem); }
.gchat-panel {
  position: fixed; right: max(1rem, env(safe-area-inset-right, 0px)); bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); z-index: 50;
  width: min(24rem, calc(100vw - 2rem)); height: min(36rem, calc(100vh - 2rem)); height: min(36rem, calc(100dvh - 2rem));
  display: flex; flex-direction: column; background: #FFFFFF; color: var(--gchat-ink);
  border: 1px solid #CFE3E6; border-radius: 16px; overflow: hidden; box-shadow: 0 24px 60px -20px rgba(11, 58, 71, .55);
}
.gchat-panel[hidden] { display: none; }
.gchat-head { display: flex; align-items: center; gap: .5rem; padding: .75rem .75rem .75rem 1rem; background: var(--gchat-teal); color: #FFFFFF; }
.gchat-head h2 { flex: 1; margin: 0; font-size: 1.1rem; line-height: 1.2; color: #FFFFFF; }
.gchat-clear, .gchat-close { border: 1px solid rgba(255,255,255,.55); background: transparent; color: #FFFFFF; border-radius: 8px; cursor: pointer; font: 500 .85rem/1 inherit; min-height: 2.25rem; padding: .35rem .6rem; }
.gchat-close { font-size: 1.4rem; min-width: 2.5rem; padding: 0 .5rem; }
.gchat-clear:hover, .gchat-close:hover { background: var(--gchat-teal-dark); }
.gchat-head button:focus-visible { outline-color: #FFFFFF; }
.gchat-log { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .6rem; background: #F8FBFB; overscroll-behavior: contain; }
.gchat-msg { max-width: 88%; padding: .6rem .8rem; border-radius: 14px; line-height: 1.45; font-size: .97rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.gchat-msg.bot { align-self: flex-start; background: #FFFFFF; border: 1px solid #CFE3E6; border-bottom-left-radius: 4px; }
.gchat-msg.user { align-self: flex-end; background: var(--gchat-coral); color: var(--gchat-ink); border-bottom-right-radius: 4px; }
.gchat-msg.notice { align-self: stretch; max-width: none; background: #E6F2F3; border: 1px solid #CFE3E6; }
.gchat-msg a { color: var(--gchat-teal); font-weight: 600; }
.gchat-msg.user a { color: var(--gchat-ink); }
.gchat-msg.pending { color: #4A6068; font-style: italic; }
.gchat-form { display: flex; gap: .5rem; align-items: flex-end; padding: .75rem; border-top: 1px solid #CFE3E6; background: #FFFFFF; }
.gchat-form textarea { flex: 1; resize: none; min-height: 2.75rem; max-height: 7rem; padding: .55rem .7rem; border: 1px solid #9FBFC5; border-radius: 10px; font: 1rem/1.35 inherit; color: var(--gchat-ink); background: #FFFFFF; }
.gchat-send { min-height: 2.75rem; padding: .5rem 1rem; border: 0; border-radius: 10px; background: var(--gchat-coral); color: var(--gchat-ink); font: 600 1rem/1 inherit; cursor: pointer; }
.gchat-send:hover { background: var(--gchat-coral-hover); }
.gchat-send[disabled] { opacity: .6; cursor: wait; }
.gchat-foot { margin: 0; padding: 0 .75rem .65rem; background: #FFFFFF; font-size: .75rem; line-height: 1.4; color: #4A6068; }
.gchat-foot a { color: var(--gchat-teal); }
.gchat-powered { font-size: .7rem; }
@media (max-width: 520px) {
  .gchat-bubble .gchat-bubble-label { display: none; }
  .gchat-bubble { padding: .75rem; min-width: 3.25rem; justify-content: center; }
  .gchat-panel { right: 0; left: 0; bottom: 0; top: 0; width: 100%; height: 100%; border-radius: 0; border: 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .gchat-msg { max-width: 92%; }
}
@media (prefers-reduced-motion: no-preference) {
  .gchat-panel:not([hidden]) { animation: gchat-in .16s ease-out; }
  @keyframes gchat-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
@media print { .gchat { display: none !important; } }
@media (max-width: 520px) { html.gchat-open, html.gchat-open body { overflow: hidden; } }
.gchat-hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Build 21.3: saved-chats notice */
.gchat-saved { display: inline-block; margin-bottom: .15rem; color: #2F4A52; font-weight: 500; }

/* Build 21.4: human check */
.gchat-human { padding: .4rem .75rem 0; background: #FFFFFF; }
.gchat-human:empty { display: none; }
.gchat-retry { margin-left: .25rem; padding: .15rem .6rem; border-radius: 999px; border: 1px solid var(--gchat-teal, #0B6E79); background: #FFFFFF; color: var(--gchat-teal, #0B6E79); font: inherit; font-size: .85rem; cursor: pointer; }
.gchat-retry:hover, .gchat-retry:focus-visible { background: #EEF6F7; }
/* Build 21.5: name + email + code before the chat */
.gchat-verify { flex: 1; padding: 1rem; border-top: 1px solid #E3ECEC; background: #fff; overflow-y: auto; }
.gchat-form[hidden], .gchat-log[hidden], .gchat-verify[hidden], .gchat-vstep[hidden] { display: none !important; }
.gchat-vstep { display: flex; flex-direction: column; gap: .35rem; }
.gchat-vstep label { font-size: .85rem; font-weight: 600; }
.gchat-vstep input { font: inherit; padding: .5rem .6rem; border: 1px solid #C9D6D6; border-radius: 8px; width: 100%; box-sizing: border-box; }
.gchat-vstep input:focus { outline: 2px solid #0E7C7B; outline-offset: 1px; }
.gchat-vintro, .gchat-vsent { margin: 0 0 .2rem; font-weight: 600; }
.gchat-vnote { margin: .25rem 0; font-size: .8rem; color: #4A5A5A; line-height: 1.35; }
.gchat-vrow { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-top: .25rem; }
.gchat-vmsg { margin: .5rem 0 0; font-size: .85rem; color: #9B2C2C; }
.gchat-verify .gchat-send { align-self: flex-start; margin-top: .25rem; }
