/* Conversación con el agente de la Sesión de Rumbo (NED-043). Tokens de DESIGN.md (--nc-*). */
.nr[hidden] { display: none !important; }
.nr { position: fixed; inset: 0; z-index: 1060; display: grid; justify-items: end; align-items: end; }
.nr-scrim { position: absolute; inset: 0; background: rgba(4, 6, 12, .62); backdrop-filter: blur(3px); }
.nr-sheet { position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  width: min(440px, calc(100vw - 32px)); height: min(680px, calc(100svh - 32px)); margin: 16px;
  background: var(--nc-surface-1, #0D1322); color: var(--nc-ink, #EEF2FA); border: 1px solid var(--nc-hairline, #22304F);
  border-radius: 24px; box-shadow: 0 30px 80px rgba(0, 0, 0, .55); overflow: hidden;
  font: 400 16px/1.45 var(--nc-body, system-ui, sans-serif); animation: nr-in .28s cubic-bezier(.2, .8, .2, 1); }
@keyframes nr-in { from { transform: translateY(24px); opacity: 0; } }
.nr-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 18px; border-bottom: 1px solid var(--nc-hairline, #22304F); }
.nr-avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--nc-mark, #F4D74B); color: #070A12; font: 900 15px/1 var(--nc-display, sans-serif); letter-spacing: -.02em; }
.nr-who { display: grid; gap: 2px; min-width: 0; flex: 1; }
.nr-who b { font: 800 17px/1.1 var(--nc-display, sans-serif); font-stretch: 105%; }
.nr-who small { color: var(--nc-muted, #8C98B4); font: 500 12px/1.3 var(--nc-mono, monospace); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nr-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--nc-ok, #5FD39A); margin-right: 4px; vertical-align: 1px; }
.nr-x { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--nc-hairline, #22304F);
  background: transparent; color: var(--nc-ink, #EEF2FA); font-size: 22px; line-height: 1; cursor: pointer; }
.nr-log { overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.nr-msg { margin: 0; max-width: 86%; padding: 11px 14px; border-radius: 18px; white-space: pre-wrap; overflow-wrap: anywhere; flex-shrink: 0; }
.nr-agent { align-self: flex-start; background: var(--nc-surface-2, #121A2E); border: 1px solid var(--nc-hairline, #22304F); border-bottom-left-radius: 6px; }
.nr-team { align-self: flex-start; background: rgba(90, 134, 206, .16); border: 1px solid rgba(141, 176, 242, .35); border-bottom-left-radius: 6px; }
.nr-team-name { display: block; font: 600 11px/1.3 var(--nc-mono, monospace); color: var(--nc-primary-hi, #8DB0F2); margin-bottom: 4px; }
.nr-me { align-self: flex-end; background: var(--nc-primary, #5A86CE); color: #fff; border-bottom-right-radius: 6px; }
.nr-me.nr-pending { opacity: .7; }
.nr-msg a { color: var(--nc-mark, #F4D74B); text-decoration: underline; text-underline-offset: 2px; }
.nr-me a { color: #fff; }
.nr-msg b { font-weight: 700; }
.nr-join { display: inline-flex; margin-top: 8px; padding: 9px 14px; border-radius: 999px; background: var(--nc-mark, #F4D74B);
  color: #070A12 !important; text-decoration: none !important; font-weight: 700; }
.nr-typing { align-self: flex-start; display: inline-flex; gap: 5px; padding: 14px 16px; border-radius: 18px; background: var(--nc-surface-2, #121A2E); flex-shrink: 0; }
.nr-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--nc-muted, #8C98B4); animation: nr-dot 1s infinite ease-in-out; }
.nr-typing i:nth-child(2) { animation-delay: .15s; } .nr-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes nr-dot { 50% { transform: translateY(-4px); opacity: .5; } }
.nr-note { align-self: center; color: var(--nc-muted, #8C98B4); font: 500 12px/1.4 var(--nc-mono, monospace); text-align: center; margin: 4px 0; }
.nr-quick { display: flex; gap: 8px; padding: 0 18px 10px; overflow-x: auto; scrollbar-width: none; }
.nr-quick[hidden] { display: none; }
.nr-quick button { flex: none; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--nc-hairline, #22304F);
  background: transparent; color: var(--nc-ink, #EEF2FA); font: 500 14px/1.2 var(--nc-body, sans-serif); cursor: pointer; }
.nr-quick button:hover { border-color: var(--nc-mark, #F4D74B); }
.nr-form { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px 10px 18px; border-top: 1px solid var(--nc-hairline, #22304F); }
.nr-form textarea { flex: 1; min-width: 0; resize: none; max-height: 140px; border: 0; outline: 0; background: transparent;
  color: var(--nc-ink, #EEF2FA); font: 400 16px/1.4 var(--nc-body, sans-serif); padding: 10px 0; }
/* gana a los estilos de formulario del sitio (#nedi-site textarea:focus) */
#wrapwrap .nr .nr-form textarea, #wrapwrap .nr .nr-form textarea:focus { border: 0; outline: 0; box-shadow: none;
  background: transparent; border-radius: 0; min-height: 0; }
.nr-form textarea::placeholder { color: var(--nc-muted, #8C98B4); }
.nr-send { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--nc-mark, #F4D74B); color: #070A12; cursor: pointer; display: grid; place-items: center; }
.nr-send:disabled { opacity: .45; cursor: default; }
.nr-foot { display: flex; gap: 8px; justify-content: center; padding: 0 12px 12px; font: 500 12px/1.3 var(--nc-mono, monospace); color: var(--nc-muted, #8C98B4); }
.nr-foot a { color: var(--nc-muted, #8C98B4); }
.nr-foot a:first-child { color: var(--nc-ok, #5FD39A); }
.nr-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.nr-x:focus-visible, .nr-send:focus-visible, .nr-quick button:focus-visible { outline: 2px solid var(--nc-mark, #F4D74B); outline-offset: 2px; }
/* en /contacto la conversación vive en la página */
.nr-inline .nr { position: static; display: block; }
.nr-inline .nr-scrim, .nr-inline .nr-x { display: none; }
.nr-inline .nr-sheet { width: 100%; height: min(620px, 78svh); margin: 0; animation: none; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
@media (max-width: 640px) {
  .nr:not(.nr-in-page) { align-items: stretch; justify-items: stretch; }
  .nr:not(.nr-in-page) .nr-sheet { width: 100%; height: 100%; height: 100dvh; margin: 0; border-radius: 0; border: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px); }
}
@media (prefers-reduced-motion: reduce) { .nr-sheet { animation: none; } .nr-typing i { animation: none; } }
