/* Centennial Assistant chat widget.
   Reuses the site's existing color tokens / radius / shadow from site.css
   (--navy, --blue, --gold, --ink, --slate, --mist, --white, --radius,
   --radius-sm, --shadow, --border). Loaded on every page after site.css. */

.cai-bubble{
  position:fixed;
  right:24px;
  bottom:24px;
  z-index:60;
  width:60px;height:60px;border-radius:50%;
  background:var(--navy);color:#fff;border:none;cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  box-shadow:var(--shadow);
  transition:transform .15s;
  padding:0;
}
.cai-bubble:hover{transform:translateY(-2px)}
.cai-bubble svg{width:28px;height:28px;fill:none;stroke:#fff;stroke-width:2}
.cai-bubble .cai-badge{
  position:absolute;top:-4px;right:-4px;background:var(--gold);color:var(--ink);
  font-size:11px;font-weight:800;border-radius:999px;padding:2px 6px;line-height:1.3;
  box-shadow:0 2px 6px rgba(9,28,51,.25);
}

/* Clear the fixed mobile call bar (site.css shows it under max-width:1283px).
   The bubble raises here on both "narrow desktop" and phone widths -- but
   the panel stays anchored to the bubble (bottom-right, fixed width) at
   this breakpoint; it only becomes a full-width sheet at true phone widths
   below (site.css's 1283px breakpoint is where the mobile nav/call-bar
   appears, not where the site's own layout goes single-column -- that's a
   much narrower ~680px, so anchoring the panel's sheet mode to 1283px would
   make it span the viewport at ordinary laptop widths and cover the page). */
@media (max-width:1283px){
  .cai-bubble{ bottom:104px; right:16px; }
  .cai-panel{ bottom:104px; right:16px; }
}

/* True phone widths: the panel becomes a full-width bottom sheet. */
@media (max-width:520px){
  .cai-panel{ left:16px; right:16px; width:auto; }
}

.cai-panel{
  position:fixed;
  right:24px;
  bottom:96px;
  z-index:61;
  width:380px;
  max-width:calc(100vw - 32px);
  max-height:min(640px,calc(100vh - 140px));
  background:#fff;
  border-radius:var(--radius);
  border:var(--border);
  box-shadow:var(--shadow);
  display:flex;
  flex-direction:column;
  overflow:hidden;
  font-family:Inter,Arial,sans-serif;
}
.cai-panel[hidden]{display:none}

.cai-head{
  background:var(--navy);color:#fff;padding:14px 16px;
  display:flex;align-items:flex-start;justify-content:space-between;gap:10px;flex:0 0 auto;
}
.cai-head-title{font-weight:800;font-size:15px;line-height:1.3}
.cai-head-sub{font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#c9d8ec;margin-top:2px}
.cai-close{background:transparent;border:none;color:#fff;font-size:20px;line-height:1;cursor:pointer;padding:2px 4px;border-radius:6px}
.cai-close:hover{background:rgba(255,255,255,.15)}

.cai-body{
  flex:1 1 auto;overflow-y:auto;padding:16px;background:var(--mist);
  display:flex;flex-direction:column;gap:10px;
}
.cai-msg{max-width:88%;padding:10px 13px;border-radius:14px;font-size:14px;line-height:1.45}
.cai-msg.bot{background:#fff;border:var(--border);color:var(--ink);align-self:flex-start;border-bottom-left-radius:4px}
.cai-msg.user{background:var(--blue);color:#fff;align-self:flex-end;border-bottom-right-radius:4px}
.cai-msg.small{font-size:12px;color:var(--slate);background:transparent;border:none;padding:0 4px}

.cai-options{display:flex;flex-direction:column;gap:8px;align-self:stretch;margin-top:2px}
.cai-opt{
  background:#fff;border:2px solid rgba(5,45,94,.14);color:var(--navy);
  font-weight:700;font-size:14px;text-align:left;padding:10px 12px;border-radius:12px;
  cursor:pointer;transition:border-color .15s,background .15s;
}
.cai-opt:hover{border-color:var(--blue)}
.cai-opt:focus-visible{outline:3px solid #0b64d1;outline-offset:2px}

.cai-inputrow{flex:0 0 auto;border-top:var(--border);background:#fff;padding:10px;display:flex;flex-direction:column;gap:8px}
.cai-field-row{display:flex;gap:8px;align-items:center}
.cai-input{
  flex:1 1 auto;font-family:inherit;font-size:14px;padding:10px 12px;
  border:2px solid rgba(5,45,94,.14);border-radius:12px;color:var(--ink);background:#fff;
}
.cai-input:focus{outline:none;border-color:var(--blue)}
.cai-send{
  flex:0 0 auto;background:var(--gold);color:var(--ink);border:none;border-radius:12px;
  font-weight:800;padding:10px 14px;cursor:pointer;
}
.cai-send:disabled{opacity:.5;cursor:not-allowed}
.cai-hint{font-size:11px;color:var(--slate);padding:0 2px}

.cai-consent-row{display:flex;align-items:flex-start;gap:10px;padding:4px 2px}
.cai-consent-row input[type="checkbox"]{width:auto;height:auto;flex:0 0 auto;margin:3px 0 0;accent-color:var(--blue);cursor:pointer}
.cai-consent-row label{font-size:12px;line-height:1.5;color:var(--slate);cursor:pointer}
.cai-consent-row label a{color:var(--blue)}

.cai-error{color:#b3261e;font-weight:600;font-size:13px;margin:0;padding:0 2px}
.cai-error[hidden]{display:none}

.cai-final{padding:12px 4px;display:flex;flex-direction:column;gap:10px}
.cai-final a.btn{width:100%}

/* Honeypot: identical convention to the site's other forms (hp-field in
   site.css) — visually hidden, out of tab order, present in the DOM for
   bots that autofill every input. */
.cai-hp{position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden}
