/* Vision2 Enquiry Assistant. Scoped to .v2a; themes can override the custom properties. */
.v2a {
  --v2a-accent: #14293d;
  --v2a-bg: #ffffff;
  --v2a-surface: #f4f3f1;
  --v2a-text: #1d2329;
  --v2a-muted: #56606b;
  --v2a-line: #d9d6d0;
  --v2a-answered: #1f6b45;
  --v2a-routed: #8a5a00;
  --v2a-held: #a3261b;
  font: inherit;
  color: var(--v2a-text);
}
.v2a *, .v2a *::before, .v2a *::after { box-sizing: border-box; }
.v2a-noscript { margin: 0; }
.v2a-box { background: var(--v2a-bg); border: 1px solid var(--v2a-line); border-radius: 12px; display: flex; flex-direction: column; overflow: hidden; max-width: 640px; }
.v2a-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; flex-shrink: 0; background: var(--v2a-accent); color: #fff; }
.v2a .v2a-head .v2a-title { margin: 0; min-width: 0; font: inherit; font-size: 1.05rem; font-weight: 700; line-height: 1.3; color: #fff; overflow-wrap: anywhere; }
.v2a-log { padding: 16px; display: flex; flex-direction: column; gap: 10px; min-height: 220px; max-height: 420px; overflow-y: auto; background: var(--v2a-surface); }
.v2a-log:focus-visible { outline: 3px solid var(--v2a-accent); outline-offset: -3px; }
.v2a-turn { display: flex; flex-direction: column; max-width: 88%; }
.v2a-guest { align-self: flex-end; }
.v2a-bot { align-self: flex-start; }
.v2a-bubble { padding: 10px 14px; border-radius: 14px; line-height: 1.45; white-space: pre-line; word-wrap: break-word; }
.v2a-guest .v2a-bubble { background: var(--v2a-accent); color: #fff; border-bottom-right-radius: 4px; }
.v2a-bot .v2a-bubble { background: var(--v2a-bg); border: 1px solid var(--v2a-line); border-bottom-left-radius: 4px; }
.v2a-tag { font-size: .75rem; letter-spacing: .04em; text-transform: uppercase; color: var(--v2a-muted); margin: 0 0 4px 2px; font-weight: 600; }
.v2a-is-answered .v2a-bubble { border-left: 4px solid var(--v2a-answered); }
.v2a-is-answered .v2a-tag { color: var(--v2a-answered); }
.v2a-is-routed .v2a-bubble { border-left: 4px solid var(--v2a-routed); }
.v2a-is-routed .v2a-tag { color: var(--v2a-routed); }
.v2a-is-held .v2a-bubble { border-left: 4px solid var(--v2a-held); background: #fdf3f2; }
.v2a-is-held .v2a-tag { color: var(--v2a-held); }
.v2a-is-wait .v2a-bubble { color: var(--v2a-muted); font-style: italic; }
.v2a-suggest { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 16px 0; background: var(--v2a-bg); }
.v2a-chip { border: 1px solid var(--v2a-line); background: var(--v2a-bg); color: var(--v2a-text); border-radius: 999px; padding: 8px 12px; min-height: 36px; cursor: pointer; font: inherit; font-size: .9rem; }
.v2a-chip:hover { border-color: var(--v2a-accent); }
.v2a-form { display: flex; gap: 8px; padding: 12px 16px; background: var(--v2a-bg); }
.v2a-input, .v2a-handoff input, .v2a-handoff textarea { flex: 1; min-width: 0; border: 1px solid #8a9199; border-radius: 8px; padding: 10px 12px; font: inherit; color: var(--v2a-text); background: #fff; min-height: 44px; width: 100%; }
.v2a-send { background: var(--v2a-accent); color: #fff; border: 0; border-radius: 8px; padding: 10px 16px; min-height: 44px; font: inherit; font-weight: 600; cursor: pointer; }
.v2a-send:disabled { opacity: .55; cursor: wait; }
.v2a :focus-visible { outline: 3px solid #1e4a70; outline-offset: 2px; }
.v2a-privacy { margin: 0; padding: 0 16px 12px; font-size: .8rem; color: var(--v2a-muted); background: var(--v2a-bg); }
.v2a-handoff { margin-top: 10px; display: grid; gap: 6px; }
.v2a-handoff label { font-size: .85rem; font-weight: 600; }
.v2a-handoff .v2a-send { justify-self: start; }
.v2a-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.v2a-msg { margin: 0; color: var(--v2a-held); font-size: .9rem; }
.v2a-msg:empty { display: none; }
.v2a-done { margin: 10px 0 0; font-weight: 600; color: var(--v2a-answered); }
.v2a-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; }
/* Floating launcher */
.v2a-floating { --v2a-viewport-height: 100vh; position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom) + var(--v2a-viewport-inset, 0px)); max-width: calc(100vw - 32px); z-index: 9990; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.v2a-launch { background: var(--v2a-accent); color: #fff; border: 0; border-radius: 999px; padding: 12px 18px; min-height: 48px; font: inherit; font-weight: 600; cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.v2a-panel { width: min(380px, calc(100vw - 32px)); order: -1; box-shadow: 0 12px 36px rgba(0,0,0,.2); border-radius: 12px; }
.v2a-panel[hidden] { display: none; }
/* Keep the header and input reachable on short screens and with a keyboard open.
   The transcript takes the remaining space and scrolls; the outer box is a
   fallback for unusually large text. Inline assistants keep their normal flow. */
.v2a-panel .v2a-box { width: 100%; max-height: max(120px, calc(var(--v2a-viewport-height) - 100px - env(safe-area-inset-bottom))); overflow-y: auto; overscroll-behavior: contain; }
.v2a-panel .v2a-head, .v2a-panel .v2a-suggest, .v2a-panel .v2a-form, .v2a-panel .v2a-privacy { flex-shrink: 0; }
.v2a-panel .v2a-log { min-height: 0; max-height: min(360px, 45vh); flex: 1 1 auto; overscroll-behavior: contain; }
.v2a .v2a-head .v2a-close { flex: 0 0 44px; width: 44px; height: 44px; min-height: 44px; padding: 0; margin: 0; }
@supports (height: 100dvh) { .v2a-floating { --v2a-viewport-height: 100dvh; } }
.v2a-close { background: transparent; color: #fff; border: 0; font-size: 1.6rem; line-height: 1; width: 44px; height: 44px; cursor: pointer; margin: -10px -10px -10px 0; }
@media (prefers-reduced-motion: no-preference) { .v2a-log { scroll-behavior: smooth; } }
@media print { .v2a-floating { display: none; } }

