/* Asistente NovaRent: widget flotante. Usa las variables de global.css, con valores de respaldo. */
#nb-root { --nb-primary: var(--primary, #0067c6); --nb-dark: var(--dark, #0a2455); --nb-accent: var(--accent, #3b9bea); --nb-line: var(--line, #e2e8f0); --nb-bg: var(--bg, #f6f8fb); --nb-ink: var(--ink, #101f41); font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
#nb-root *, #nb-root *::before, #nb-root *::after { box-sizing: border-box; }

.nb-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 9990;
  width: 60px; height: 60px; border-radius: 50%; border: 0; cursor: pointer;
  background: linear-gradient(135deg, #0a2455 0%, #0067c6 60%, #3b9bea 100%); color: #fff;
  box-shadow: 0 8px 24px rgba(10, 36, 85, .35); display: flex; align-items: center; justify-content: center;
  transition: transform .15s ease;
}
.nb-fab:hover { transform: scale(1.06); }
.nb-fab:focus-visible, .nb-chip:focus-visible, .nb-close:focus-visible, .nb-send:focus-visible { outline: 3px solid #fbbf24; outline-offset: 2px; }
.nb-fab svg { width: 28px; height: 28px; }
.nb-fab .nb-dot { position: absolute; top: 4px; right: 4px; width: 14px; height: 14px; border-radius: 50%; background: #22c55e; border: 2px solid #fff; }

.nb-hint {
  position: fixed; right: 88px; bottom: 28px; z-index: 9989; max-width: 220px;
  background: #fff; color: var(--nb-ink); border: 1px solid var(--nb-line); border-radius: 14px 14px 4px 14px;
  padding: 10px 14px; font-size: .9rem; line-height: 1.35; box-shadow: 0 8px 24px rgba(10, 36, 85, .15); cursor: pointer;
  animation: nb-in .3s ease;
}

.nb-panel {
  position: fixed; right: 18px; bottom: 90px; z-index: 9991;
  width: 380px; max-width: calc(100vw - 24px); height: 580px; max-height: calc(100vh - 110px);
  background: #fff; border-radius: 18px; border: 1px solid var(--nb-line);
  box-shadow: 0 20px 50px rgba(10, 36, 85, .3); display: none; flex-direction: column; overflow: hidden;
}
.nb-panel.open { display: flex; animation: nb-in .2s ease; }
@keyframes nb-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.nb-head {
  background: linear-gradient(135deg, #0a2455 0%, #0067c6 70%); color: #fff;
  padding: 14px 16px; display: flex; align-items: center; gap: 12px;
}
.nb-head img { width: 38px; height: 38px; border-radius: 10px; background: #fff; padding: 4px; }
.nb-head .nb-title { font-weight: 700; font-size: 1rem; line-height: 1.2; }
.nb-head .nb-sub { font-size: .78rem; opacity: .85; }
.nb-head .nb-sub::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; margin-right: 6px; }
.nb-head .nb-spacer { flex: 1; }
.nb-close { background: rgba(255, 255, 255, .15); color: #fff; border: 0; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 1.2rem; line-height: 1; }
.nb-close:hover { background: rgba(255, 255, 255, .28); }

.nb-log { flex: 1; overflow-y: auto; padding: 16px 14px 8px; background: var(--nb-bg); scroll-behavior: smooth; }
.nb-msg { max-width: 88%; margin: 0 0 10px; padding: 10px 13px; border-radius: 14px; font-size: .92rem; line-height: 1.45; word-wrap: break-word; }
.nb-msg.bot { background: #fff; border: 1px solid var(--nb-line); border-bottom-left-radius: 4px; color: var(--nb-ink); }
.nb-msg.user { background: var(--nb-primary); color: #fff; margin-left: auto; border-bottom-right-radius: 4px; }
.nb-msg p { margin: 0 0 6px; }
.nb-msg p:last-child { margin-bottom: 0; }
.nb-msg ul { margin: 4px 0 4px 18px; padding: 0; }
.nb-msg li { margin: 2px 0; }
.nb-msg a { color: var(--nb-primary); text-decoration: underline; }
.nb-msg strong { color: var(--nb-dark); }
.nb-typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
.nb-typing i { width: 7px; height: 7px; border-radius: 50%; background: #94a3b8; animation: nb-blink 1s infinite; }
.nb-typing i:nth-child(2) { animation-delay: .15s; }
.nb-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes nb-blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

.nb-opts { padding: 8px 12px 10px; background: var(--nb-bg); border-top: 1px solid var(--nb-line); display: flex; flex-wrap: wrap; gap: 7px; max-height: 40%; overflow-y: auto; }
.nb-opts:empty { display: none; }
.nb-chip {
  background: #fff; color: var(--nb-primary); border: 1.5px solid var(--nb-primary); border-radius: 999px;
  padding: 7px 13px; font-size: .86rem; font-weight: 600; cursor: pointer; font-family: inherit; text-align: left; text-decoration: none; line-height: 1.25;
}
.nb-chip:hover { background: var(--nb-primary); color: #fff; text-decoration: none; }
.nb-chip.wa { background: #25d366; border-color: #25d366; color: #073b1d; }
.nb-chip.wa:hover { background: #1faa52; border-color: #1faa52; color: #fff; }
.nb-chip.soft { border-color: #94a3b8; color: #475569; }
.nb-chip.soft:hover { background: #475569; border-color: #475569; color: #fff; }

.nb-form { display: grid; gap: 8px; width: 100%; }
.nb-form input, .nb-form textarea { width: 100%; border: 1px solid #cbd5e1; border-radius: 10px; padding: 9px 11px; font: inherit; font-size: .9rem; color: var(--nb-ink); background: #fff; }
.nb-form textarea { resize: vertical; min-height: 54px; }
.nb-form input:focus, .nb-form textarea:focus, .nb-input input:focus { outline: 2px solid var(--nb-accent); border-color: var(--nb-accent); }
.nb-form .nb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.nb-form .nb-err { color: #b91c1c; font-size: .82rem; min-height: 1em; }
.nb-form button { background: var(--nb-primary); color: #fff; border: 0; border-radius: 999px; padding: 10px 16px; font-weight: 700; cursor: pointer; font-family: inherit; }
.nb-form button:disabled { opacity: .6; cursor: wait; }

.nb-input { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--nb-line); background: #fff; }
.nb-input input { flex: 1; border: 1px solid #cbd5e1; border-radius: 999px; padding: 9px 14px; font: inherit; font-size: .92rem; min-width: 0; color: var(--nb-ink); }
.nb-send { background: var(--nb-primary); color: #fff; border: 0; border-radius: 50%; width: 40px; height: 40px; cursor: pointer; display: flex; align-items: center; justify-content: center; flex: none; }
.nb-send:hover { background: var(--nb-dark); }
.nb-send svg { width: 18px; height: 18px; }
.nb-foot { text-align: center; font-size: .7rem; color: #94a3b8; padding: 0 0 8px; background: #fff; }

@media (max-width: 520px) {
  .nb-panel { right: 0; bottom: 0; width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; border: 0; }
  .nb-hint { right: 84px; bottom: 26px; max-width: 170px; }
}
@media (prefers-reduced-motion: reduce) { .nb-panel.open, .nb-hint { animation: none; } .nb-log { scroll-behavior: auto; } .nb-typing i { animation: none; } }
@media print { #nb-root { display: none; } }
