/* Floating assistant: matches the other floating buttons, and uses the brand tokens. */
.nx-chat-button { position: fixed; right: 24px; bottom: 200px; z-index: 998; display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; padding: 0; border: 0; border-radius: 50%; background: var(--nx-float); color: #FFFFFF; box-shadow: 0 6px 18px rgba(28, 28, 28, 0.22), 0 0 0 1px rgba(255, 255, 255, 0.14); cursor: pointer; transition: transform 200ms, background-color 200ms, opacity 200ms; }
.nx-chat-button svg { width: 26px; height: 26px; }
.nx-chat-button:hover { transform: translateY(-2px); background: var(--nx-orange); }
.nx-chat-count { position: absolute; top: -2px; right: -2px; display: flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 4px; box-sizing: border-box; border: 2px solid var(--bg); border-radius: 999px; background: var(--nx-orange); color: #FFFFFF; font-size: 11px; font-weight: 700; }
.nx-chat-count[hidden] { display: none; }
.nx-chat-button:focus-visible { outline: 2px solid var(--nx-orange); outline-offset: 2px; }

.nx-chat-panel { position: fixed; right: 96px; bottom: 24px; z-index: 1001; display: flex; flex-direction: column; width: 380px; height: min(620px, calc(100vh - 48px)); overflow: hidden; border: 1px solid var(--nx-line); border-radius: 14px; background: var(--nx-surface); color: var(--nx-ink); font-family: var(--nx-ui); box-shadow: 0 16px 48px rgba(28, 28, 28, 0.24); opacity: 0; transform: translateY(16px); transition: opacity 200ms ease, transform 200ms ease; }
.nx-chat-panel[hidden] { display: none; }
.nx-chat-panel.nx-chat-open { opacity: 1; transform: none; }

.nx-chat-head { display: flex; align-items: center; gap: 8px; padding: 16px; border-bottom: 1px solid var(--nx-line); }
.nx-chat-head h2 { flex: 1; margin: 0; font-family: var(--nx-ui); font-size: 16px; font-weight: 700; color: var(--nx-ink); }
.nx-chat-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--nx-field-green); }
.nx-chat-close { width: 44px; height: 44px; margin: -8px; border: 0; border-radius: 50%; background: transparent; color: var(--nx-ink); cursor: pointer; transition: background-color 200ms; }
.nx-chat-close:hover { background: var(--hover-bg); }

.nx-chat-log { display: flex; flex: 1; flex-direction: column; gap: 8px; min-height: 0; padding: 16px; overflow-y: auto; }
.nx-chat-bubble { max-width: 85%; padding: 10px 14px; border-radius: 14px; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; white-space: pre-wrap; }
.nx-chat-user { align-self: flex-end; border-bottom-right-radius: 4px; background: #C94D0A; color: #FFFFFF; }
.nx-chat-assistant { align-self: flex-start; border-bottom-left-radius: 4px; background: var(--nx-sand); color: var(--nx-ink); }
.nx-chat-typing { display: flex; gap: 4px; padding: 14px; }
.nx-chat-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--nx-muted); animation: nx-chat-bounce 1.2s infinite ease-in-out; }
.nx-chat-typing span:nth-child(2) { animation-delay: 0.15s; }
.nx-chat-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes nx-chat-bounce { 0%, 60%, 100% { transform: none; opacity: 0.5; } 30% { transform: translateY(-4px); opacity: 1; } }

.nx-chat-listings { display: flex; flex-direction: column; gap: 8px; align-self: stretch; }
.nx-chat-listings a { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border: 1px solid var(--nx-line); border-radius: 10px; background: var(--nx-surface); color: var(--nx-ink); font-size: 13px; text-decoration: none; transition: border-color 200ms; }
.nx-chat-listings a:hover, .nx-chat-listings a:focus-visible { border-color: var(--nx-orange); outline: none; }
.nx-chat-listings strong { font-size: 14px; font-weight: 600; }
.nx-chat-listings span { color: var(--nx-muted); }
.nx-chat-listings .nx-chat-price { color: var(--nx-orange); font-weight: 700; font-variant-numeric: tabular-nums; }

.nx-chat-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 8px; }
.nx-chat-chips:empty { display: none; }
.nx-chat-chips button { min-height: 36px; padding: 0 14px; border: 1px solid var(--nx-line); border-radius: 999px; background: var(--nx-surface); color: var(--nx-ink); font-family: var(--nx-ui); font-size: 13px; font-weight: 600; cursor: pointer; transition: border-color 200ms, color 200ms; }
.nx-chat-chips button:hover:not(:disabled) { border-color: var(--nx-orange); color: var(--nx-orange); }
.nx-chat-chips button:disabled { opacity: 0.6; cursor: default; }

.nx-chat-form { display: flex; gap: 8px; padding: 8px 16px 16px; }
.nx-chat-form input { flex: 1; min-width: 0; min-height: 44px; padding: 0 14px; border: 1px solid var(--nx-line); border-radius: 10px; background: var(--input-bg); color: var(--nx-ink); font-family: var(--nx-ui); font-size: 16px; }
.nx-chat-form input:focus { outline: none; border-color: var(--nx-orange); box-shadow: 0 0 0 3px rgba(232, 89, 12, 0.18); }
.nx-chat-form button { flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #C94D0A; color: #FFFFFF; cursor: pointer; transition: background-color 200ms; }
.nx-chat-form button:hover:not(:disabled) { background: #B34408; }
.nx-chat-form button:disabled { opacity: 0.6; cursor: default; }

.nx-chat-handoff { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px solid var(--nx-line); border-radius: 14px; }
.nx-chat-handoff p { margin: 0; font-size: 14px; line-height: 1.4; }
.nx-chat-handoff label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--nx-muted); }
.nx-chat-handoff input, .nx-chat-handoff textarea { padding: 10px 12px; border: 1px solid var(--nx-line); border-radius: 10px; background: var(--input-bg); color: var(--nx-ink); font-family: var(--nx-ui); font-size: 16px; font-weight: 400; resize: vertical; }
.nx-chat-handoff input:focus, .nx-chat-handoff textarea:focus { outline: none; border-color: var(--nx-orange); }
.nx-chat-handoff button { min-height: 44px; border: 0; border-radius: 999px; background: #C94D0A; color: #FFFFFF; font-family: var(--nx-ui); font-size: 14px; font-weight: 600; cursor: pointer; transition: background-color 200ms; }
.nx-chat-handoff button:hover:not(:disabled) { background: #B34408; }
.nx-chat-error { color: var(--nx-danger); }

@media (max-width: 600px) {
  .nx-chat-panel { inset: 0; width: auto; height: 100vh; height: 100dvh; border: 0; border-radius: 0; transform: translateY(100%); }
  .nx-chat-button { right: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .nx-chat-panel, .nx-chat-button { transition: none; }
  .nx-chat-typing span { animation: none; }
}
