/* Website chat */
.sgc { --sgc-bg: var(--surface, #fff); --sgc-fg: var(--fg, #14233d); --sgc-line: var(--line, #d6dce5); --sgc-me: var(--band, #14233d); --sgc-on-me: var(--on-band, #f2f5fa);
  --sgc-accent: var(--signal, #d3312b); --sgc-soft: var(--ground, #f2f4f7);
  position: fixed; right: max(1rem, env(safe-area-inset-right, 0px)); bottom: calc(5rem + env(safe-area-inset-bottom, 0px)); z-index: 2147483646; /* above Netlify's badge */ font-family: var(--f-body, Arial, sans-serif); }
.sgc-launch { display: inline-flex; align-items: center; gap: .55rem; border: 2px solid var(--sgc-accent); background: var(--band, #14233d); color: var(--on-band, #fff);
  font: 700 1rem/1 var(--f-body, Arial, sans-serif); padding: .8rem 1.1rem .8rem .9rem; border-radius: 999px; cursor: pointer; box-shadow: 0 10px 28px rgba(8, 16, 29, .28); }
.sgc-launch svg { width: 1.35rem; height: 1.35rem; fill: currentColor; }
.sgc-launch:hover { background: var(--sgc-accent); }
.sgc-launch:focus-visible, .sgc button:focus-visible, .sgc textarea:focus-visible { outline: 3px solid var(--sgc-accent); outline-offset: 2px; }
.sgc.is-open .sgc-launch { display: none; }

.sgc-panel { position: absolute; right: 0; bottom: 0; width: min(23rem, calc(100vw - 2rem)); height: min(36rem, calc(100vh - 7rem)); height: min(36rem, calc(100dvh - 7rem)); max-height: calc(100vh - 6rem);
  display: flex; flex-direction: column; background: var(--sgc-bg); color: var(--sgc-fg); border: 1px solid var(--sgc-line); border-radius: 10px; overflow: hidden;
  box-shadow: 0 18px 48px rgba(8, 16, 29, .32); }
.sgc-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; background: var(--band, #14233d); color: var(--on-band, #fff); padding: .8rem .9rem .8rem 1rem; border-bottom: 3px solid var(--sgc-accent); }
.sgc-head b { display: block; font: 900 1.15rem/1.1 var(--f-display, "Arial Narrow", sans-serif); letter-spacing: .03em; text-transform: uppercase; }
.sgc-head small { color: var(--on-band-muted, #aab6c9); font-size: .8rem; }
.sgc-x { background: none; border: 0; color: inherit; font-size: 1.7rem; line-height: 1; width: 2.4rem; height: 2.4rem; border-radius: 6px; cursor: pointer; }
.sgc-x:hover { background: rgba(255, 255, 255, .12); }

.sgc-log { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .6rem; background: var(--sgc-soft); overscroll-behavior: contain; }
.sgc-msg { max-width: 88%; padding: .6rem .8rem; border-radius: 10px; font-size: .95rem; line-height: 1.45; overflow-wrap: anywhere; }
.sgc-msg p { margin: 0; } .sgc-msg p + p, .sgc-msg ul + p, .sgc-msg p + ul { margin-top: .45rem; }
.sgc-msg ul { margin: 0; padding-left: 1.1rem; }
.sgc-bot { align-self: flex-start; background: var(--sgc-bg); border: 1px solid var(--sgc-line); border-bottom-left-radius: 3px; }
.sgc-bot a { color: var(--sgc-accent); font-weight: 700; }
.sgc-me { align-self: flex-end; background: var(--sgc-me); color: var(--sgc-on-me); border-bottom-right-radius: 3px; }
.sgc-typing { display: inline-flex; gap: .3rem; padding: .8rem .9rem; }
.sgc-typing span { width: .45rem; height: .45rem; border-radius: 50%; background: var(--muted, #56637a); animation: sgc-dot 1s infinite ease-in-out; }
.sgc-typing span:nth-child(2) { animation-delay: .15s; } .sgc-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes sgc-dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .sgc-typing span { animation: none; opacity: .6; } }

.sgc-chips { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0 1rem; background: var(--sgc-soft); }
.sgc-chips:not(:empty) { padding-bottom: .8rem; }
.sgc-chips button { font: 600 .85rem var(--f-body, Arial, sans-serif); color: var(--sgc-fg); background: var(--sgc-bg); border: 1px solid var(--sgc-line); border-radius: 999px; padding: .45rem .75rem; cursor: pointer; }
.sgc-chips button:hover { border-color: var(--sgc-accent); color: var(--sgc-accent); }

.sgc-form { display: flex; gap: .5rem; align-items: flex-end; padding: .7rem; border-top: 1px solid var(--sgc-line); background: var(--sgc-bg); }
.sgc-form textarea { flex: 1; resize: none; font: 400 1rem/1.4 var(--f-body, Arial, sans-serif); color: var(--sgc-fg); background: var(--sgc-soft); border: 1px solid var(--sgc-line); border-radius: 8px; padding: .6rem .7rem; max-height: 120px; }
.sgc-form button { flex: none; width: 2.75rem; height: 2.75rem; border: 0; border-radius: 8px; background: var(--sgc-accent); color: #fff; cursor: pointer; display: grid; place-items: center; }
.sgc-form button svg { width: 1.25rem; height: 1.25rem; fill: currentColor; }
.sgc-foot { margin: 0; padding: 0 .9rem .7rem; font-size: .75rem; color: var(--muted, #56637a); background: var(--sgc-bg); }
.sgc-foot a { color: inherit; font-weight: 700; }
.sgc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Phones: sit above the call bar; open as a near full-screen sheet */
@media (max-width: 860px) {
  .sgc { bottom: calc(9rem + env(safe-area-inset-bottom, 0px)); right: 1rem; }
  .sgc-launch { padding: .75rem; } .sgc-launch span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .sgc-launch svg { width: 1.6rem; height: 1.6rem; }
  .sgc.is-open { inset: 0; right: 0; bottom: 0; }
  .sgc-panel { position: fixed; inset: auto 0 0 0; width: 100%; height: 100%; height: 100dvh; border-radius: 0; border: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px); padding-top: env(safe-area-inset-top, 0px); background: var(--sgc-bg); }
}
