/* Coastline chat widget — uses site v3 tokens from site.css */
.cig-chat-root{position:fixed;left:18px;bottom:18px;z-index:80;font-family:var(--body);}
.cig-chat-launch{
  display:inline-flex;align-items:center;gap:10px;
  background:var(--navy);color:#fff;border:0;border-radius:999px;
  padding:12px 18px 12px 14px;font:700 .95rem var(--head);
  cursor:pointer;box-shadow:0 10px 24px rgba(10,31,68,.28);
}
.cig-chat-launch:hover{background:var(--navy-2)}
.cig-chat-launch svg{flex:0 0 auto}
.cig-chat-panel{
  display:none;flex-direction:column;
  width:min(380px,calc(100vw - 24px));height:min(560px,calc(100vh - 100px));
  background:#fff;border:1px solid var(--line);border-radius:16px;
  box-shadow:var(--shadow);overflow:hidden;
}
.cig-chat-root.open .cig-chat-panel{display:flex}
.cig-chat-root.open .cig-chat-launch{display:none}
.cig-chat-root.open{z-index:2147483646}
.cig-chat-head{
  background:var(--navy);color:#fff;padding:12px 14px 12px 16px;
  display:flex;align-items:flex-start;justify-content:space-between;gap:10px;
}
.cig-chat-head h2{color:#fff;font:700 1.02rem var(--head);margin:0 0 4px}
.cig-chat-disc{margin:0;font-size:.78rem;line-height:1.4;color:#C9D5EA;font-weight:400}
.cig-chat-close{
  background:transparent;border:0;color:#fff;font-size:1.5rem;line-height:1;
  cursor:pointer;padding:2px 6px;border-radius:8px;
}
.cig-chat-close:hover{background:rgba(255,255,255,.12)}
.cig-chat-log{flex:1;overflow:auto;padding:14px 14px 8px;background:var(--bg)}
.cig-chat-msg{max-width:92%;margin:0 0 10px;padding:10px 12px;border-radius:12px;font-size:.95rem;line-height:1.5}
.cig-chat-msg p{margin:0 0 .6em}
.cig-chat-msg p:last-child{margin:0}
.cig-chat-msg a{color:var(--navy-3);font-weight:600;text-decoration:underline}
.cig-chat-msg.bot{background:#fff;border:1px solid var(--line);color:var(--ink);border-bottom-left-radius:4px}
.cig-chat-msg.user{background:var(--navy);color:#fff;margin-left:auto;border-bottom-right-radius:4px}
.cig-chat-msg.user a{color:#fff}
.cig-chat-msg.sys{background:var(--gold-soft);border:1px solid var(--sand);color:var(--navy);font-size:.88rem}
.cig-chat-log[aria-busy="true"] .cig-chat-pending{display:block}
.cig-chat-pending{display:none;color:var(--muted);font-size:.9rem;padding:4px 2px 10px}
.cig-chat-sugs{display:flex;flex-wrap:wrap;gap:6px;padding:0 14px 8px;background:var(--bg)}
.cig-chat-sugs button{
  background:#fff;border:1px solid var(--line);border-radius:999px;color:var(--navy);
  font:600 .8rem var(--body);padding:6px 10px;cursor:pointer;
}
.cig-chat-sugs button:hover{border-color:var(--teal);background:var(--teal-soft)}
.cig-chat-form{display:flex;gap:8px;padding:10px 12px;border-top:1px solid var(--line);background:#fff}
.cig-chat-form textarea{
  flex:1;resize:none;min-height:44px;max-height:96px;margin:0;
  border:1px solid var(--field-border);border-radius:10px;padding:8px 10px;
  font:1rem var(--body);color:var(--ink);
}
.cig-chat-send{
  background:var(--gold);color:var(--navy);border:0;border-radius:10px;
  font:700 .9rem var(--head);padding:0 14px;cursor:pointer;align-self:flex-end;height:44px;
}
.cig-chat-send:hover{background:#FFC857}
.cig-chat-send:disabled{opacity:.6;cursor:not-allowed}
/* Widget sits bottom-left on all builds (Ron, 4 Dec 2026). The staging review-notes
   pill stays bottom-right (z-index 900). On a 390px staging preview the pill can be
   nearly full width, so raise the widget above it. Production has no review panel.
   Skip link is top-left on focus (z-index 1000) and stays clear of the bottom widget.
   There is no fixed cookie banner or mobile call FAB on this site. Netlify injects
   #nl-badge-frame ("Powered by Netlify") at z-index 2147483645, bottom-right; the
   open panel is almost full width on 390px, so lift .open above that badge. */
body:has(#review-notes) .cig-chat-root{left:18px;right:auto}
@media (max-width:390px){
  .cig-chat-root{left:8px;bottom:8px;right:auto}
  .cig-chat-panel{width:min(380px,calc(100vw - 16px));height:min(520px,calc(100vh - 88px));border-radius:14px}
  body:has(#review-notes) .cig-chat-root{left:8px;right:auto;bottom:68px;z-index:950}
  body:has(#review-notes) #review-notes:not([open]){width:fit-content;max-width:calc(100vw - 28px);pointer-events:none}
  body:has(#review-notes) #review-notes:not([open])>summary{pointer-events:auto;float:none}
}
