/* nxstructural assistant - the chat bubble on every page */
.nxbot-bub { position: fixed; right: 18px; bottom: 18px; z-index: 2500; height: 50px; padding: 0 16px 0 8px;
  border-radius: 25px; border: 0; background: #1f3a5f; color: #fff; box-shadow: 0 8px 22px rgba(15, 23, 42, .28);
  cursor: pointer; display: flex; align-items: center; gap: 8px; transition: transform .15s, background .15s;
  font: 600 15px/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.nxbot-bub:hover { transform: translateY(-2px); background: #27497a; }
.nxbot-bub:focus-visible { outline: 3px solid #fdba74; outline-offset: 2px; }
.nxbot-bub img { width: 38px; height: auto; display: block; }
.nxbot-mark { width: 34px; height: 34px; border-radius: 8px; background: rgba(255, 255, 255, .12); flex: none;
  display: flex; align-items: center; justify-content: center; }
.nxbot-mark img { width: 28px; height: auto; display: block; }
.nxbot-panel { position: fixed; right: 18px; bottom: 78px; z-index: 2501; width: min(380px, calc(100vw - 32px));
  height: min(560px, calc(100vh - 110px)); background: #fff; border-radius: 14px; border: 1px solid #cbd5e1;
  box-shadow: 0 18px 48px rgba(15, 23, 42, .25); display: flex; flex-direction: column; overflow: hidden;
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: #1e293b; }
.nxbot-panel { margin: 0; padding: 0; }                           /* the site's own styles must not frame it */
.nxbot-panel, .nxbot-panel * { box-sizing: border-box; }
.nxbot-panel[hidden], .nxbot-bub[hidden], .nxbot-chips[hidden] { display: none; }
.nxbot-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: #1f3a5f; color: #fff; }
.nxbot-head b { flex: 1; font-size: 15px; }
.nxbot-head small { display: block; font-weight: 400; opacity: .8; font-size: 12px; }
.nxbot-head button { background: transparent; border: 0; color: #fff; font-size: 20px; line-height: 1; cursor: pointer;
  padding: 2px 6px; border-radius: 6px; }
.nxbot-head button:hover { background: rgba(255, 255, 255, .15); }
.nxbot-log { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; background: #f8fafc; }
.nxbot-msg { max-width: 92%; padding: 8px 11px; border-radius: 12px; overflow-wrap: anywhere; }
.nxbot-me { align-self: flex-end; background: #1f3a5f; color: #fff; border-bottom-right-radius: 4px; }
.nxbot-bot { align-self: flex-start; background: #fff; border: 1px solid #e2e8f0; border-bottom-left-radius: 4px; }
.nxbot-bot h4 { margin: 0 0 4px; font-size: 14px; color: #0f2d52; }
.nxbot-bot p { margin: 0 0 6px; white-space: pre-line; }
.nxbot-bot mark { background: #fef08a; padding: 0 1px; border-radius: 2px; }
.nxbot-tag { display: inline-block; font-size: 11px; color: #64748b; background: #f1f5f9; border-radius: 9px; padding: 0 7px; margin-bottom: 4px; }
.nxbot-open { display: inline-block; font-weight: 600; color: #1d4ed8; text-decoration: none; margin-right: 10px; }
.nxbot-open:hover { text-decoration: underline; }
.nxbot-note { font-size: 12.5px; color: #92400e; margin-top: 4px; }
.nxbot-rel { margin: 6px 0 0; padding: 0; list-style: none; border-top: 1px dashed #e2e8f0; }
.nxbot-rel li { margin-top: 5px; }
.nxbot-rel a, .nxbot-link { color: #1d4ed8; cursor: pointer; text-decoration: none; background: none; border: 0; padding: 0;
  font: inherit; text-align: left; }
.nxbot-rel a:hover, .nxbot-link:hover { text-decoration: underline; }
.nxbot-fb { display: flex; gap: 6px; align-items: center; margin-top: 6px; font-size: 12px; color: #64748b; }
.nxbot-fb button { border: 1px solid #cbd5e1; background: #fff; border-radius: 6px; cursor: pointer; padding: 0 7px; font-size: 13px; }
.nxbot-fb button:hover { background: #f1f5f9; }
.nxbot-fb button.on { background: #dcfce7; border-color: #86efac; }
.nxbot-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px 0; background: #fff; }
.nxbot-chips button { border: 1px solid #cbd5e1; background: #fff; color: #1f3a5f; border-radius: 14px; padding: 3px 10px;
  font-size: 12.5px; cursor: pointer; text-align: left; }
.nxbot-chips button:hover { background: #eef2f7; border-color: #94a3b8; }
.nxbot-form { display: flex; gap: 6px; padding: 10px 12px; border-top: 1px solid #e2e8f0; background: #fff; }
.nxbot-form input { flex: 1; min-width: 0; border: 1px solid #cbd5e1; border-radius: 8px; padding: 7px 10px; font: inherit; }
.nxbot-form input:focus { outline: 2px solid #93c5fd; border-color: #60a5fa; }
.nxbot-form button { border: 0; background: #d35400; color: #fff; border-radius: 8px; padding: 0 14px; font-weight: 600; cursor: pointer; }
.nxbot-form button:disabled { opacity: .6; cursor: default; }
.nxbot-typing { color: #64748b; font-style: italic; }
@media (max-width: 560px) {
  .nxbot-panel { inset: 0; width: 100%; height: 100%; border-radius: 0; right: 0; bottom: 0; }
  .nxbot-bub { right: 12px; bottom: 12px; height: 46px; padding: 0 14px 0 7px; font-size: 14px; }
  .nxbot-bub img { width: 34px; }
}
body.bld-locked .nxbot-bub, body.bld-locked .nxbot-panel { display: none; }    /* the building editor's full-screen work mode */
@media print { .nxbot-bub, .nxbot-panel { display: none !important; } }
