#nexus-root{
  position:fixed;bottom:22px;z-index:999999;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,sans-serif;
  --nexus-accent:#4F46E5;
  --nexus-header:#4F46E5;
  --nexus-bg:#0F1219;
  --nexus-text:#E8EAF0;
}
#nexus-root.nexus-pos-right{right:22px}
#nexus-root.nexus-pos-left{left:22px}
#nexus-panel[hidden],
#nexus-chat[hidden],
#nexus-prechat[hidden],
#nexus-root [hidden]{display:none !important}
.nexus-launcher{
  width:58px;height:58px;border:0;border-radius:50%;
  background:var(--nexus-accent);color:#fff;cursor:pointer;
  box-shadow:0 12px 30px rgba(79,70,229,.35);
  display:grid;place-items:center;
}
.nexus-launcher .nexus-icon-close{display:none}
.nexus-launcher.is-open .nexus-icon-chat{display:none}
.nexus-launcher.is-open .nexus-icon-close{display:block}
.nexus-panel{
  position:absolute;bottom:72px;width:360px;max-width:calc(100vw - 24px);
  height:560px;max-height:calc(100vh - 120px);
  background:var(--nexus-bg);color:var(--nexus-text);border-radius:18px;overflow:hidden;
  box-shadow:0 24px 60px rgba(0,0,0,.35);display:flex;flex-direction:column;
  border:1px solid #1e2433
}
.nexus-pos-right .nexus-panel{right:0}
.nexus-pos-left .nexus-panel{left:0}
.nexus-head{
  display:flex;align-items:center;gap:12px;padding:16px;
  background:linear-gradient(135deg,var(--nexus-header),var(--nexus-accent))
}
.nexus-avatar{width:36px;height:36px;border-radius:10px;background:rgba(255,255,255,.18);display:grid;place-items:center;font-weight:700;object-fit:cover}
.nexus-launcher-img{width:28px;height:28px;border-radius:50%;object-fit:cover}
.nexus-head strong{display:block;font-size:14px}
.nexus-head span{display:block;font-size:12px;opacity:.9}
.nexus-status{margin-left:auto;font-size:11px;background:rgba(0,0,0,.2);padding:4px 8px;border-radius:999px}
.nexus-status.is-online{background:#22c55e}
.nexus-x{width:32px;height:32px;border:0;border-radius:8px;background:rgba(0,0,0,.2);color:#fff;font-size:22px;line-height:1;cursor:pointer;margin-left:6px}
.nexus-body,.nexus-chat{flex:1;display:flex;flex-direction:column;min-height:0}
/* v1.0.10: offline-form scroll — het prechat-paneel (nexus-body) had al scrollbar-styling
   maar miste overflow-y, waardoor de offline-form (onderwerp + bericht) geknipt werd. */
.nexus-body{overflow-y:auto}
.nexus-lead{padding:16px 16px 0;color:#c5cad6;font-size:14px}
#nexus-start-form{padding:16px;display:flex;flex-direction:column;gap:10px}
#nexus-start-form label{font-size:12px;color:#9aa3b5;display:flex;flex-direction:column;gap:6px}
#nexus-start-form input,#nexus-start-form textarea,.nexus-composer textarea{
  background:#151b27;border:1px solid #2a3142;color:#fff;border-radius:10px;padding:10px 12px;font:inherit
}
.nexus-btn,.nexus-composer button{
  background:var(--nexus-accent);color:#fff;border:0;border-radius:10px;padding:11px 14px;cursor:pointer;font-weight:600
}
.nexus-messages,#nexus-start-form,.nexus-body{
  scrollbar-width:thin;
  scrollbar-color:#3a4258 transparent;
}
.nexus-messages::-webkit-scrollbar,
#nexus-start-form::-webkit-scrollbar,
.nexus-body::-webkit-scrollbar{width:8px}
.nexus-messages::-webkit-scrollbar-track,
#nexus-start-form::-webkit-scrollbar-track,
.nexus-body::-webkit-scrollbar-track{background:transparent}
.nexus-messages::-webkit-scrollbar-thumb,
#nexus-start-form::-webkit-scrollbar-thumb,
.nexus-body::-webkit-scrollbar-thumb{background:#3a4258;border-radius:8px}
.nexus-messages::-webkit-scrollbar-thumb:hover,
#nexus-start-form::-webkit-scrollbar-thumb:hover,
.nexus-body::-webkit-scrollbar-thumb:hover{background:#525b75}
.nexus-messages{flex:1;overflow:auto;padding:16px;display:flex;flex-direction:column;gap:10px}
.nexus-msg{max-width:82%;padding:9px 12px;border-radius:14px;font-size:13px;line-height:1.45;white-space:pre-wrap}
.nexus-msg.visitor{align-self:flex-end;background:var(--nexus-accent)}
.nexus-msg.agent,.nexus-msg.bot{align-self:flex-start;background:#1b2230}
.nexus-msg time{display:block;opacity:.6;font-size:10px;margin-top:4px}
.nexus-msg.system{align-self:center;background:#222a3d;color:#98a2bd;font-size:12px;text-align:center;max-width:90%}
.nexus-composer{display:flex;gap:8px;padding:12px;border-top:1px solid #1e2433}
.nexus-composer textarea{flex:1;resize:none;min-height:42px}
.nexus-composer button{width:42px;height:42px;border-radius:12px;padding:0;display:grid;place-items:center}
.nexus-foot{text-align:center;font-size:11px;color:#6b7386;padding:8px;border-top:1px solid #1e2433}
.nexus-toast{margin:12px 16px;padding:12px;background:#12351f;color:#4ade80;border-radius:10px;font-size:13px}
/* v1.0.13: duurzame "geannuleerd"-indicator (amber, onderscheidbaar van de groene succes-toast). */
.nexus-cancelled-banner{background:#2b2317;color:#f6c978;border-left:3px solid #f59e0b}
/* v1.0.15: "afgesloten door support" (blauw) onderscheiden van "geannuleerd" (amber). */
.nexus-cancelled-banner--closed{background:#151b26;color:#9fb3d1;border-left:3px solid #3b82f6}
.nexus-hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
@media (max-width:420px){
  .nexus-panel{width:calc(100vw - 16px);height:calc(100vh - 100px)}
}