.ns-chat-widget {
  --nsc-ink: #18211f;
  --nsc-muted: #68716e;
  --nsc-accent: #46c878;
  position: fixed;
  z-index: 1200;
  right: 20px;
  bottom: 20px;
  color: var(--nsc-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.ns-chat-widget *, .ns-chat-widget *::before, .ns-chat-widget *::after { box-sizing: border-box; }
.nsc-trigger {
  position: relative;
  display: grid;
  width: 60px;
  height: 60px;
  margin-left: auto;
  place-items: center;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 19px;
  background: var(--nsc-ink);
  color: #fff;
  box-shadow: 0 16px 40px rgba(19,32,27,.25);
  cursor: pointer;
  transition: transform .2s ease, background .2s ease;
}
.nsc-trigger:hover { transform: translateY(-2px); background: #24332f; }
.nsc-trigger svg { width: 27px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.nsc-badge { position: absolute; top: -3px; right: -3px; display: none; width: 13px; height: 13px; border: 2px solid #fff; border-radius: 50%; background: #e9674f; }
.nsc-badge.is-visible { display: block; }
.nsc-panel {
  position: absolute;
  right: 0;
  bottom: 72px;
  display: grid;
  grid-template-rows: auto minmax(180px, 1fr) auto 26px;
  width: min(380px, calc(100vw - 32px));
  height: min(570px, calc(100svh - 120px));
  overflow: hidden;
  border: 1px solid rgba(24,33,31,.1);
  border-radius: 23px;
  background: #f6f8f6;
  box-shadow: 0 26px 75px rgba(19,32,27,.22);
  opacity: 0;
  transform: translateY(10px) scale(.98);
  visibility: hidden;
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.ns-chat-widget.is-open .nsc-panel { opacity: 1; transform: none; visibility: visible; }
.nsc-head { display: grid; grid-template-columns: 42px 1fr auto; gap: 11px; align-items: center; padding: 17px 18px; background: var(--nsc-ink); color: #fff; }
.nsc-avatar { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid rgba(255,255,255,.55); border-radius: 50%; font-size: 11px; font-weight: 850; }
.nsc-kicker, .nsc-head h2, .nsc-head span { margin: 0; }
.nsc-kicker { color: var(--nsc-accent); font-size: 9px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.nsc-head h2 { font-size: 17px; line-height: 1.25; }
.nsc-head span { color: rgba(255,255,255,.65); font-size: 10px; }
.nsc-close { padding: 2px 5px; border: 0; background: transparent; color: rgba(255,255,255,.72); cursor: pointer; font-size: 25px; }
.nsc-messages { display: flex; flex-direction: column; gap: 9px; min-height: 0; padding: 18px; overflow-y: auto; }
.nsc-message { max-width: 84%; padding: 10px 12px; border-radius: 14px; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; white-space: pre-wrap; }
.nsc-message-agent { align-self: flex-start; border-bottom-left-radius: 4px; background: #fff; box-shadow: 0 3px 15px rgba(20,34,28,.06); }
.nsc-message-client { align-self: flex-end; border-bottom-right-radius: 4px; background: var(--nsc-ink); color: #fff; }
.nsc-compose { display: grid; grid-template-columns: 1fr 43px; gap: 8px; padding: 11px 12px 12px; border-top: 1px solid rgba(24,33,31,.09); background: #fff; }
.nsc-compose textarea { width: 100%; max-height: 110px; padding: 10px 11px; border: 1px solid rgba(24,33,31,.13); border-radius: 11px; outline: 0; resize: none; color: var(--nsc-ink); font: inherit; font-size: 13px; }
.nsc-compose button { display: grid; width: 43px; height: 43px; place-items: center; align-self: end; border: 0; border-radius: 12px; background: var(--nsc-ink); color: #fff; cursor: pointer; font-size: 21px; }
.nsc-compose button:disabled { opacity: .5; cursor: wait; }
.nsc-status { height: 26px; margin: 0; padding: 0 14px 10px; overflow: hidden; background: #fff; color: var(--nsc-muted); font-size: 10px; line-height: 16px; }
.nsc-status.is-error { color: #a13737; }
.nsc-trigger:focus-visible, .nsc-panel button:focus-visible, .nsc-panel textarea:focus-visible { outline: 3px solid rgba(70,200,120,.35); outline-offset: 2px; }

@media (max-width: 600px) {
  .ns-chat-widget { right: 12px; bottom: 12px; }
  .nsc-panel { position: fixed; right: 10px; bottom: 82px; left: 10px; width: auto; height: min(600px, calc(100svh - 96px)); }
}
@media (prefers-reduced-motion: reduce) { .nsc-trigger, .nsc-panel { transition: none; } }
