/* Next Role Studio site chat widget (Nov 6, 2026).
   Self-contained: every rule is prefixed .nrsc- so nothing
   leaks into or out of the host page's styles. The widget talks
   only to portal.nextrole.studio /api/public/chat/*. Visitor
   messages queue for the studio — nothing auto-replies. */
.nrsc-launcher {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 900;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #e8445f, #d12f4c);
  color: #fff;
  font-family: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(30, 27, 75, 0.35);
}
.nrsc-launcher:hover { filter: brightness(1.07); }
.nrsc-launcher:focus-visible { outline: 3px solid #6366f1; outline-offset: 2px; }
.nrsc-launcher .nrsc-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: #7cf2b2;
  box-shadow: 0 0 0 3px rgba(124, 242, 178, 0.3);
}
.nrsc-panel {
  position: fixed;
  right: 20px;
  bottom: 84px;
  z-index: 900;
  width: min(368px, calc(100vw - 32px));
  height: min(540px, calc(100dvh - 120px));
  display: none;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid #c6c1e0;
  background: #f4f4fa;
  color: #16132b;
  font-family: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  box-shadow: 0 18px 48px rgba(13, 11, 26, 0.4);
}
.nrsc-panel.nrsc-open { display: flex; }
.nrsc-head {
  padding: 14px 16px 12px;
  background: linear-gradient(135deg, #1e1b4b, #3730a3);
  color: #fff;
}
.nrsc-head-row { display: flex; align-items: center; justify-content: space-between; }
.nrsc-title { font-size: 16px; font-weight: 700; }
.nrsc-close {
  border: none; background: transparent; color: #fff;
  font-size: 20px; line-height: 1; cursor: pointer; padding: 2px 6px;
}
.nrsc-honest { margin: 6px 0 0; font-size: 12.5px; line-height: 1.45; color: #d9d6f5; }
.nrsc-lead { padding: 12px 14px 4px; }
.nrsc-lead label { display: block; font-size: 12px; font-weight: 600; color: #454166; margin: 8px 0 4px; }
.nrsc-lead input {
  width: 100%; box-sizing: border-box;
  padding: 9px 10px; border: 1px solid #c6c1e0; border-radius: 10px;
  font: inherit; background: #fff; color: #16132b;
}
.nrsc-lead-note { margin: 8px 0 4px; font-size: 12px; color: #5f5b78; }
.nrsc-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px 4px; }
.nrsc-chip {
  border: 1px solid #3730a3; background: #eceaf6; color: #2b2585;
  border-radius: 999px; padding: 6px 11px; font: inherit; font-size: 12.5px;
  cursor: pointer;
}
.nrsc-chip:hover { background: #ddd9f5; }
.nrsc-msgs {
  flex: 1; overflow-y: auto; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 8px;
}
.nrsc-msg { max-width: 85%; padding: 9px 12px; border-radius: 14px; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word; }
.nrsc-msg-visitor { align-self: flex-end; background: #3730a3; color: #fff; border-bottom-right-radius: 4px; }
.nrsc-msg-studio { align-self: flex-start; background: #fff; border: 1px solid #ddd9ee; border-bottom-left-radius: 4px; }
.nrsc-msg-state { align-self: flex-end; font-size: 11px; color: #5f5b78; margin-top: -4px; }
.nrsc-ack {
  align-self: flex-start; max-width: 85%;
  padding: 8px 12px; border-radius: 14px; border-bottom-left-radius: 4px;
  background: #eceaf6; color: #454166; font-style: italic; line-height: 1.45;
}
.nrsc-status { padding: 0 14px 6px; font-size: 12px; color: #5f5b78; min-height: 15px; }
.nrsc-status.nrsc-error { color: #b91c1c; }
.nrsc-form { display: flex; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid #ddd9ee; background: #fff; }
.nrsc-input {
  flex: 1; box-sizing: border-box; resize: none;
  padding: 9px 10px; border: 1px solid #c6c1e0; border-radius: 10px;
  font: inherit; max-height: 96px;
}
.nrsc-send {
  border: none; border-radius: 10px; padding: 0 16px;
  background: #e8445f; color: #fff; font: inherit; font-weight: 600; cursor: pointer;
}
.nrsc-send:hover { background: #d12f4c; }
.nrsc-send:disabled { opacity: 0.55; cursor: default; }
@media (max-width: 480px) {
  .nrsc-launcher { right: 14px; bottom: 14px; }
  .nrsc-panel { right: 8px; bottom: 72px; width: calc(100vw - 16px); }
}
