/* Site assistant widget (assets/chat.js). Daylight tokens from app.css, so light and dark mode follow the page.
   Public pages: the button sits above the floating "Report a problem" button. Member pages (sidebar shell): the report
   trigger lives in the menus, so the button takes the corner; on phones it clears the bottom tab bar. */
#ctbChat{position:fixed;right:16px;bottom:68px;z-index:55;font-family:var(--body)}
#ctbChat.inapp{bottom:20px}
#ctbChat.open{z-index:80}
.cc-launch{display:inline-flex;align-items:center;gap:8px;min-height:48px;padding:0 18px 0 10px;border:0;border-radius:999px;background:var(--grad);color:#fff;font:700 15px var(--body);cursor:pointer;box-shadow:0 6px 22px rgba(11,79,204,.35)}
.cc-launch img{width:28px;height:28px;border-radius:50%;background:#fff;padding:2px}
.cc-launch:focus-visible{outline:3px solid var(--amber);outline-offset:2px}
#ctbChat.open .cc-launch{display:none}
.cc-panel{position:fixed;right:16px;bottom:16px;width:390px;max-width:calc(100vw - 32px);height:min(620px,calc(100vh - 96px));height:min(620px,calc(100dvh - 96px));display:flex;flex-direction:column;background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:var(--r2);box-shadow:0 18px 50px rgba(14,26,47,.25);overflow:hidden}
.cc-panel[hidden]{display:none}
.cc-head{display:flex;align-items:center;gap:10px;padding:12px 12px 12px 14px;background:var(--grad);color:#fff}
.cc-av{width:36px;height:36px;border-radius:50%;background:#fff;padding:3px;flex-shrink:0}
.cc-ttl{display:flex;flex-direction:column;line-height:1.2;min-width:0;flex:1}
.cc-ttl b{font:700 16px var(--head)}.cc-ttl small{font-size:12.5px;opacity:.9}
.cc-x{width:40px;height:40px;border:0;border-radius:10px;background:rgba(255,255,255,.16);color:#fff;font-size:24px;line-height:1;cursor:pointer;flex-shrink:0}
.cc-x:hover{background:rgba(255,255,255,.28)}
.cc-msgs{flex:1;overflow-y:auto;overscroll-behavior:contain;padding:14px 12px;display:flex;flex-direction:column;gap:10px;background:var(--canvas)}
.cc-m{display:flex;gap:8px;align-items:flex-end;max-width:100%}
.cc-m.me{justify-content:flex-end}
.cc-mav{width:24px;height:24px;border-radius:50%;background:#fff;border:1px solid var(--line);padding:2px;flex-shrink:0}
.cc-b{max-width:86%;padding:10px 12px;border-radius:14px;font-size:14.5px;line-height:1.5;overflow-wrap:anywhere;white-space:pre-wrap}
.cc-m.bot .cc-b{background:var(--surface);border:1px solid var(--line);border-bottom-left-radius:4px;color:var(--text)}
.cc-m.me .cc-b{background:var(--blue);color:#fff;border-bottom-right-radius:4px}
.cc-b a{color:var(--link);font-weight:600}
.cc-m.me .cc-b a{color:#fff}
.cc-open{display:inline-block;margin-top:8px;font-size:13px}
.cc-handoff .cc-b,.cc-sendform .cc-b{background:var(--blue-soft);border-color:transparent;white-space:normal}
.cc-sendform .cc-b{display:flex;flex-direction:column;gap:8px;width:86%}
.cc-sendform textarea,.cc-sendform input{width:100%;font:inherit;font-size:14px;padding:8px 10px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--text)}
.cc-sendform .btn{align-self:flex-start}
.cc-note{color:var(--muted)}
.cc-wait .cc-b{display:inline-flex;gap:4px;padding:14px}
.cc-wait .cc-b span{width:7px;height:7px;border-radius:50%;background:var(--muted);animation:ccdot 1s infinite ease-in-out}
.cc-wait .cc-b span:nth-child(2){animation-delay:.15s}.cc-wait .cc-b span:nth-child(3){animation-delay:.3s}
@keyframes ccdot{0%,80%,100%{opacity:.3;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}
@media (prefers-reduced-motion:reduce){.cc-wait .cc-b span{animation:none}}
.cc-starters{display:flex;flex-wrap:wrap;gap:6px;padding:8px 12px 0;background:var(--canvas)}
.cc-starters[hidden]{display:none}
.cc-starters button{border:1px solid var(--line);background:var(--surface);color:var(--link);font:600 13px var(--body);padding:7px 11px;border-radius:999px;cursor:pointer;min-height:34px}
.cc-starters button:hover{border-color:var(--blue)}
.cc-form{display:flex;gap:8px;align-items:flex-end;padding:10px 12px;border-top:1px solid var(--line);background:var(--surface)}
.cc-form textarea{flex:1;resize:none;font:inherit;font-size:15px;line-height:1.4;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface2);color:var(--ink);max-height:120px;min-height:44px}
.cc-form textarea:focus{outline:2px solid var(--blue);outline-offset:0;border-color:transparent}
.cc-send{width:44px;height:44px;border:0;border-radius:12px;background:var(--blue);color:#fff;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}
.cc-send:disabled{opacity:.5;cursor:wait}
.cc-foot{display:flex;flex-direction:column;align-items:center;gap:2px;padding:0 12px 10px;background:var(--surface);font-size:12px;color:var(--muted)}
.cc-foot button{border:0;background:none;color:var(--link);font:600 13px var(--body);cursor:pointer;padding:4px;min-height:32px}
@media (max-width:980px){#ctbChat.inapp{bottom:calc(78px + env(safe-area-inset-bottom))}}
@media (max-width:640px){
  #ctbChat{right:12px;bottom:62px}
  .cc-launch{min-height:46px;padding:0 14px 0 8px}
  .cc-panel{left:0;right:0;bottom:0;width:auto;max-width:100vw;box-sizing:border-box;height:88vh;height:88dvh;border-radius:20px 20px 0 0;border-bottom:0;padding-bottom:env(safe-area-inset-bottom)}
  .cc-b{max-width:88%}
}
