/* Standalone source stylesheet for the server-owned chat. */
[data-chat-trigger], [data-chat-panel], [data-np-legacy-chat],
#assistant div:has(> form textarea[placeholder="Спросите про конвейеры, ЖКХ, on-prem…"]) { display: none !important; }
.np-chat, .np-chat-launcher { --np-bg: rgb(var(--surface, 20 24 34)); --np-fg: rgb(var(--text, 239 243 251)); --np-accent: rgb(var(--accent, 85 105 245)); box-sizing: border-box; color: var(--np-fg); font-family: inherit; font-size: 14px; font-weight: 400; line-height: 1.5; }
.np-chat *, .np-chat-launcher { box-sizing: border-box; }
.np-chat [hidden], .np-chat[hidden], .np-chat-launcher[hidden] { display: none !important; }
.np-chat { display: flex; flex-direction: column; min-width: 0; background: var(--np-bg); border: 1px solid rgb(var(--text, 239 243 251) / .16); border-radius: 20px; box-shadow: 0 18px 60px #0003; overflow: hidden; }
.np-chat--inline { width: 100%; height: 560px; min-height: 480px; }
.np-chat--floating { position: fixed; z-index: 99; right: max(20px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom)); width: 400px; max-width: calc(100vw - 24px); height: 650px; max-height: calc(100dvh - 40px); }
.np-chat-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 18px; border-bottom: 1px solid rgb(var(--text, 239 243 251) / .12); flex: none; }
.np-chat-title { font-weight: 650; }
.np-chat-close { background: transparent; border: 0; color: inherit; font-size: 26px; cursor: pointer; padding: 0 8px; }
.np-chat-log { overflow-y: auto; overscroll-behavior: contain; padding: 18px; display: flex; flex-direction: column; gap: 12px; flex: 1 1 140px; min-height: 100px; }
.np-chat-message { white-space: pre-wrap; overflow-wrap: anywhere; border-radius: 15px; padding: 10px 13px; max-width: 93%; background: rgb(var(--text, 239 243 251) / .05); align-self: flex-start; }
.np-chat-message--user { background: rgb(var(--accent, 85 105 245) / .16); align-self: flex-end; }
.np-chat-status, .np-chat-privacy { opacity: .72; font-size: 12px; }
.np-chat-error { margin: 0; padding: 0 16px; color: #ce5b43; font-size: 12px; }
.np-chat-error:empty { display: none; }
.np-chat-compose { display: flex; align-items: flex-end; gap: 8px; padding: 12px 14px 6px; border-top: 1px solid rgb(var(--text, 239 243 251) / .12); flex: none; }
.np-chat textarea, .np-chat input { color: inherit; background: rgb(var(--text, 239 243 251) / .035); border: 1px solid rgb(var(--text, 239 243 251) / .2); border-radius: 9px; padding: 8px 10px; font: inherit; min-width: 0; }
.np-chat textarea { resize: vertical; width: 100%; max-height: 110px; min-height: 44px; }
.np-chat textarea::placeholder { color: inherit; opacity: .55; }
.np-chat button { font: inherit; cursor: pointer; }
.np-chat button:disabled { cursor: default; opacity: .5; }
.np-chat-submit, .np-chat-launcher { border: 0; border-radius: 10px; background: var(--np-accent); color: white; padding: 10px 13px; font-weight: 600; }
.np-chat-launcher { position: fixed; z-index: 98; bottom: max(20px, env(safe-area-inset-bottom)); right: max(20px, env(safe-area-inset-right)); border-radius: 30px; box-shadow: 0 10px 35px #0004; padding: 15px 20px; cursor: pointer; font-size: 14px; }
.np-chat-privacy { flex: none; margin: 0; padding: 4px 15px 12px; font-size: 10px; }
.np-chat a { text-decoration: underline; text-underline-offset: 2px; color: inherit; }
.np-chat-reconnect { align-self: flex-start; margin: 8px 16px; background: transparent; border: 1px solid currentColor; border-radius: 8px; padding: 5px 10px; color: inherit; }
.np-chat-lead { overflow: auto; max-height: 300px; flex: 0 1 auto; margin: 8px 14px; padding: 12px; border: 1px solid rgb(var(--accent, 85 105 245) / .4); border-radius: 12px; }
.np-chat-lead fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.np-chat-lead legend { font-weight: 650; padding: 0; }
.np-chat-lead p { font-size: 12px; margin: 4px 0 10px; }
.np-chat-lead label { display: block; margin: 7px 0; font-size: 12px; }
.np-chat-lead label > input:not([type="checkbox"]) { display: block; width: 100%; margin-top: 3px; }
.np-chat-lead .np-chat-consent { display: flex; align-items: flex-start; gap: 8px; line-height: 1.4; margin: 12px 0; }
.np-chat-consent input { flex: none; width: 17px; height: 17px; margin: 1px 0 0; padding: 0; accent-color: var(--np-accent); }
.np-chat-lead .np-chat-submit { width: 100%; font-size: 12px; }
.np-chat-lead-success { color: #388c67; margin: 6px 16px; font-size: 13px; }
.np-chat :focus-visible, .np-chat-launcher:focus-visible { outline: 2px solid var(--np-accent); outline-offset: 3px; }
@media (max-width: 600px) {
  .np-chat--inline { height: 520px; }
  .np-chat--floating { inset: 8px; width: auto; height: auto; max-width: none; max-height: none; padding-bottom: env(safe-area-inset-bottom); }
  .np-chat-compose { gap: 6px; }
  .np-chat-compose .np-chat-submit { padding: 10px; font-size: 12px; }
}
