/* Chat móvil accesible y aislado del diseño editorial. */
#natural-chat{--nc-green:#196448;--nc-ink:#17372a;--nc-line:#dbe7db;font-family:system-ui,-apple-system,'Segoe UI',sans-serif;color:var(--nc-ink)}
#natural-chat *{box-sizing:border-box}#natural-chat [hidden]{display:none!important}
.nc-chat-fab{position:fixed;z-index:160;right:max(18px,env(safe-area-inset-right));bottom:calc(18px + env(safe-area-inset-bottom));width:62px;height:62px;display:grid;place-items:center;border:2px solid #fff;border-radius:22px;background:linear-gradient(145deg,#276c4e,#13452f);color:#fff;box-shadow:0 12px 35px #123e2870;cursor:pointer;transition:transform .16s ease}
.nc-chat-fab:hover{transform:translateY(-3px)}.nc-chat-fab svg{width:28px;height:28px;stroke:currentColor;stroke-width:1.8;fill:none;stroke-linejoin:round;stroke-linecap:round}.nc-chat-fab:focus-visible,#natural-chat button:focus-visible,#natural-chat a:focus-visible,#natural-chat input:focus-visible,#natural-chat textarea:focus-visible{outline:3px solid #f5bd4a;outline-offset:3px}
.nc-chat-label{position:absolute;right:calc(100% + 10px);top:50%;transform:translateY(-50%);background:#fff;border:1px solid #dfe8e0;color:#204f3b;border-radius:12px;box-shadow:0 8px 28px #09230d22;padding:9px 12px;font-size:12px;font-weight:800;white-space:nowrap;pointer-events:none}
.nc-chat-panel{position:fixed;z-index:165;right:max(18px,env(safe-area-inset-right));bottom:calc(92px + env(safe-area-inset-bottom));width:min(385px,calc(100vw - 32px));height:min(630px,calc(100dvh - 118px));min-height:325px;display:flex;flex-direction:column;overflow:hidden;border-radius:24px;background:#fff;border:1px solid var(--nc-line);box-shadow:0 28px 88px #0b2d2050}
.nc-chat-head{display:flex;align-items:center;gap:11px;min-height:80px;padding:14px 16px;background:linear-gradient(118deg,#184632,#2b7851);color:#fff}.nc-chat-head img{width:42px;height:42px;border-radius:13px;object-fit:contain;background:#fff}.nc-chat-head .nc-heading{flex:1;min-width:0}.nc-chat-head strong{display:block;font-size:16px}.nc-chat-head small{display:block;font-size:11px;opacity:.88;margin-top:2px}.nc-chat-close{border:0;background:#ffffff20;color:#fff;display:grid;place-items:center;width:36px;height:36px;border-radius:12px;font-size:21px;cursor:pointer}
.nc-chat-toolbar{padding:10px 13px;background:#f5f9f4;border-bottom:1px solid var(--nc-line);display:flex;align-items:center;justify-content:space-between;gap:8px}.nc-chat-toolbar span{font-size:11px;font-weight:700;color:#4e6656}.nc-chat-toolbar button,.nc-chat-back{border:1px solid #b9d3c0;background:#fff;color:#1a6145;border-radius:10px;font-size:11px;padding:8px;font-weight:800;cursor:pointer}
.nc-chat-log{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;display:flex;flex-direction:column;align-items:stretch;gap:12px;padding:15px 13px;background:#fbfdf9;scrollbar-color:#b6ceb7 transparent}
.nc-chat-intro{align-self:center;border:1px solid #d9ebd5;background:#eef6e9;border-radius:16px;padding:13px;font-size:13px;line-height:1.5;max-width:98%}
.nc-chat-msg{max-width:94%;border:1px solid #e2eae0;border-radius:17px;padding:10px 12px;background:#fff;box-shadow:0 3px 10px #153e1b09;line-height:1.47}.nc-chat-speaker{display:block;color:#4e7b60;font-size:10px;letter-spacing:.02em;font-weight:900;margin-bottom:4px}.nc-chat-body{font-size:13px;white-space:pre-wrap;overflow-wrap:anywhere}.nc-chat-msg.from-me{align-self:flex-end;background:#226849;color:#fff;border-color:#226849;border-bottom-right-radius:5px}.nc-chat-msg.from-me .nc-chat-speaker{color:#d3f3db}.nc-chat-msg.from-agent{border-left:3px solid #55a876}.nc-chat-msg.from-system{align-self:center;background:#f3f7f0;text-align:center}.nc-chat-msg.from-system .nc-chat-speaker{color:#657c69}
.nc-chat-links{display:grid;gap:6px;max-width:100%}.nc-chat-link{display:block;padding:10px 12px;border-radius:12px;border:1px solid #bed4bf;background:#f4faef;color:#135a38!important;text-decoration:none!important;font-size:12px;font-weight:800;overflow-wrap:anywhere}.nc-chat-link:hover{background:#e9f5e1}
.nc-chat-contact{display:grid;gap:8px;padding:12px;border-top:1px solid var(--nc-line);background:#f4f9f3}.nc-chat-contact p{font-size:12px;margin:0}.nc-chat-contact input{width:100%;min-height:36px;border:1px solid #c6d6c7;border-radius:9px;padding:8px;font-size:13px}.nc-chat-contact label{display:flex;gap:8px;font-size:11px;align-items:flex-start;line-height:1.3}.nc-chat-contact label input{width:16px;height:16px;min-height:0}.nc-chat-contact button{background:#1a6145;color:#fff;border:0;border-radius:9px;padding:9px;font-weight:800;cursor:pointer}
.nc-chat-compose{display:flex;align-items:end;gap:8px;padding:11px;background:#fff;border-top:1px solid var(--nc-line)}.nc-chat-compose textarea{flex:1;min-width:0;min-height:42px;max-height:112px;resize:vertical;border:1px solid #c8d9c8;border-radius:12px;padding:11px;font:inherit;font-size:13px;color:#183e29}.nc-chat-compose button{width:42px;height:42px;flex-shrink:0;border:0;border-radius:12px;background:#226849;color:white;font-size:17px;cursor:pointer}.nc-chat-compose button:disabled{opacity:.55}
.nc-chat-foot{display:flex;align-items:center;justify-content:space-between;gap:5px;padding:7px 12px;border-top:1px solid #edf3ec}.nc-chat-foot span{font-size:10px;color:#587262}.nc-chat-foot a{font-size:10px;color:#266447;text-decoration:underline}
@media(max-width:640px){.nc-chat-fab{width:54px;height:54px;right:12px;bottom:calc(13px + env(safe-area-inset-bottom));border-radius:18px}.nc-chat-label{display:none}.nc-chat-panel{inset:auto 9px calc(76px + env(safe-area-inset-bottom)) 9px;width:auto;height:min(620px,calc(100dvh - 94px));border-radius:20px}.nc-chat-head{min-height:68px;padding:10px 12px}.nc-chat-log{padding:12px 10px}.sticky-buy{right:78px!important}}
@media(max-height:540px){.nc-chat-panel{height:calc(100dvh - 86px);min-height:0}}
@media(prefers-reduced-motion:reduce){.nc-chat-fab{transition:none!important}}

#natural-chat .visually-hidden{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important}

/* v3 · Respuesta inmediata con indicador de actividad (respetar movimiento reducido). */
#natural-chat .nc-chat-typing{display:flex;align-items:center;align-self:flex-start;gap:9px;max-width:90%;padding:10px 13px;border-radius:16px 16px 16px 5px;background:#fff;border:1px solid #d6e7d7;box-shadow:0 4px 14px rgba(22,74,42,.07);color:#345d43;font-size:12px;font-weight:700;line-height:1.3}
#natural-chat .nc-chat-typing[hidden]{display:none!important}
#natural-chat .nc-chat-typing-dots{display:flex;gap:4px;align-items:center;height:13px}
#natural-chat .nc-chat-typing-dots i{width:6px;height:6px;border-radius:100%;display:block;background:#338764;animation:naturalChatBounce 1.2s ease-in-out infinite}
#natural-chat .nc-chat-typing-dots i:nth-child(2){animation-delay:.16s}
#natural-chat .nc-chat-typing-dots i:nth-child(3){animation-delay:.32s}
@keyframes naturalChatBounce{0%,62%,100%{transform:translateY(0);opacity:.45}31%{transform:translateY(-4px);opacity:1}}
#natural-chat .nc-chat-msg.pending{opacity:.75}
#natural-chat .nc-chat-msg.failed{border-color:#e8b3a8;background:#fff6f3;color:#702f29}
#natural-chat .nc-chat-msg.failed .nc-chat-speaker{color:#a03d31}
#natural-chat .nc-chat-log{overflow-x:hidden;min-width:0}
#natural-chat .nc-chat-msg{min-width:0;overflow-wrap:anywhere}
#natural-chat .nc-chat-compose textarea{resize:none;overflow-y:auto;max-height:120px;font-size:16px}
#natural-chat .nc-chat-compose button{touch-action:manipulation}
@media(max-width:640px){#natural-chat .nc-chat-panel{max-width:calc(100vw - 18px);height:min(670px,calc(100dvh - 94px));min-height:0}#natural-chat .nc-chat-compose{padding:9px}#natural-chat .nc-chat-toolbar{gap:6px}#natural-chat .nc-chat-toolbar button{line-height:1.25;text-align:center}}
@media(prefers-reduced-motion:reduce){#natural-chat .nc-chat-typing-dots i{animation:none;opacity:1}}

.nc-chat-body p{margin:0 0 8px}.nc-chat-body p:last-child{margin-bottom:0}.nc-chat-answer-point{padding-left:4px}
.nc-chat-links{display:grid;gap:8px}.nc-chat-link{min-height:42px;display:flex;align-items:center;justify-content:center;text-align:center}
