.chat-launcher[hidden]{display:none}
.chat-launcher{position:fixed;right:24px;bottom:calc(24px + env(safe-area-inset-bottom,0px));z-index:75;isolation:isolate;display:grid;place-items:center;min-height:56px;height:56px;width:56px;padding:9px;border:2px solid #ffffff;border-radius:50%;background:#00508a;color:#fff;box-shadow:0 8px 28px #003d3152,0 0 0 1px #0783432b;font-family:inherit;line-height:1.35;text-align:left;transition:background .18s,transform .18s,box-shadow .18s}
.chat-launcher:hover{background:#004170;transform:translateY(-3px);box-shadow:0 12px 32px #003d3166}
.chat-launcher[aria-expanded=true]{visibility:hidden}
.chat-bot-icon{animation:chat-greeting 1s .4s 1 ease-in-out}
.chat-launcher::before{content:'';position:absolute;inset:-6px;border:2px solid #0a70b9;border-radius:inherit;pointer-events:none;opacity:0;animation:chat-invite 2.2s .35s 2 ease-out}
@keyframes chat-invite{0%{transform:scale(.97);opacity:0}15%{opacity:.6}100%{transform:scale(1.13,1.28);opacity:0}}
@keyframes chat-greeting{0%,100%{transform:rotate(0)}25%{transform:rotate(-12deg)}50%{transform:rotate(9deg)}75%{transform:rotate(-4deg)}}
.chat-dialog{position:fixed;inset:auto 24px calc(24px + env(safe-area-inset-bottom,0px)) auto;margin:0;padding:0;width:min(600px,calc(100vw - 40px));height:min(860px,calc(100dvh - 48px));max-width:none;max-height:calc(100dvh - 48px);border:1px solid #c8d3da;border-radius:16px;background:#fff;color:#1e2e39;box-shadow:0 28px 100px #06241438;overflow:hidden;font-family:inherit}
.chat-dialog[open]{display:flex;flex-direction:column}
.chat-dialog::backdrop{background:#0b241c28;backdrop-filter:blur(2px)}
.chat-header{display:flex;align-items:center;gap:12px;padding:20px;background:#013a62;color:#fff;flex-shrink:0}
.chat-avatar{width:39px;height:39px;display:grid;place-items:center;background:#ffffff17;border:1px solid #ffffff25;border-radius:50%;font-size:21px;font-weight:600}
.chat-header h2{margin:0;font-size:15px;font-weight:600;letter-spacing:-.2px;line-height:1.5}
.chat-header p{margin:2px 0 0;font-size:12px;line-height:1.5;color:#cbdbe7}
.chat-close{background:transparent;color:#fff;padding:8px;margin-left:auto;border-radius:50%;flex:none;display:grid;place-items:center}
.chat-close:hover{background:#ffffff17}
.chat-close svg,.chat-input-row button svg{width:21px;height:21px;display:block}
.chat-conversation{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:21px 17px;background-color:#ecf2f6;background-image:radial-gradient(#c9d5dd 0.5px,transparent 0.5px);background-size:13px 13px;scroll-behavior:smooth}
.chat-message{max-width:94%;padding:13px 15px;border-radius:2px 12px 12px 12px;background:#fff;box-shadow:0 1px 3px #18352409;margin-bottom:14px;overflow-wrap:anywhere}
.chat-message p{font-size:13px;line-height:1.7;margin:0}
.chat-message p+p{margin-top:7px}
.chat-message .chat-intro-note{font-size:12px;color:#6e7a82;line-height:1.7}
.chat-message--user{margin-left:auto;background:#d2e3ef;border-radius:12px 2px 12px 12px;max-width:85%}
.chat-message--user p{font-size:13px;color:#263c4b}
.chat-sender{display:block;font-size:12px;font-weight:600;letter-spacing:.2px;color:#054a7c;margin-bottom:5px}
.chat-actions{display:flex;flex-wrap:wrap;gap:7px;padding:12px 16px 5px;background:#fff;border-top:1px solid #e2e8ed;flex-shrink:0}
.chat-actions button{background:#eef4f8;border:1px solid #d4e0e8;color:#314e63;border-radius:30px;padding:7px 11px;font:inherit;font-size:12px;white-space:nowrap}
.chat-actions button:hover{background:#dee9f0;border-color:#8ca9be}
.chat-actions button:disabled{opacity:.5;cursor:wait}
.chat-form{padding:11px 16px 14px;margin:0;background:#fff;flex-shrink:0}
.chat-input-row{display:flex;align-items:flex-end;gap:8px}
.chat-input-row textarea{min-width:0;flex:1;margin:0;border:1px solid #d1dae1;border-radius:9px;padding:12px 13px;font-family:inherit;font-size:13px;line-height:1.5;background:#f8fafc;color:#1f303d}
.chat-input-row button{width:42px;height:43px;border-radius:9px;background:#015998;color:#fff;flex:none;display:grid;place-items:center;padding:0}
.chat-input-row button:hover{background:#004475}
.chat-input-row button:disabled{opacity:.5;cursor:wait}
/* Fotos (asistente-v1 1.8.0, 27-11-2026): el botón de la cámara junto al cuadro, la foto lista para mandar y la miniatura. */
.chat-input-row .chat-photo{background:#fff;color:#015998;border:1px solid #d1dae1}
.chat-input-row .chat-photo:hover{background:#f1f6fa;border-color:#015998}
.chat-input-row .chat-photo[hidden]{display:none}
.chat-attach{display:flex;align-items:center;gap:10px;margin:0 0 8px;padding:6px;border:1px solid #d1dae1;border-radius:9px;background:#f8fafc}
.chat-attach[hidden]{display:none}
.chat-attach img{width:56px;height:56px;object-fit:cover;border-radius:6px;flex:none;background:#f1f6fa}
.chat-attach span{flex:1;min-width:0;font-size:13px;color:#1f303d}
.chat-attach-remove{flex:none;width:44px;height:44px;padding:0;border:0;border-radius:8px;background:none;color:#5b6b78;display:grid;place-items:center;cursor:pointer}
.chat-attach-remove:hover{color:#1f303d;background:#fff}
.chat-attach-remove svg{width:20px;height:20px}
.chat-photo-sent{display:block;width:180px;max-width:100%;height:auto;border-radius:8px}
.chat-photo-sent+p,.chat-photo-label+p{margin-top:6px}
.chat-photo-label{display:inline-block;font-size:12px;font-weight:700;letter-spacing:.3px;color:#263c4b;border:1px solid #9fbdd3;border-radius:6px;padding:2px 8px}
.chat-form-note{display:flex;justify-content:space-between;gap:8px;margin:8px 1px 0;font-size:12px;color:#7c8891;line-height:1.5}
.chat-links{display:flex;flex-wrap:wrap;gap:7px;margin-top:10px}
.chat-links>a{border:1px solid #ccdbe5;padding:7px 10px;border-radius:6px;color:#04416d;background:#f9fbfd;font-size:12px;font-weight:600;line-height:1.5;text-decoration:none}
.chat-links>a:hover{border-color:#87a4b8;background:#e8f0f6}
.chat-results{display:grid;gap:7px;margin-top:12px}
.chat-product{display:flex;align-items:center;gap:10px;border:1px solid #dce4e9;border-radius:7px;background:#fff;padding:8px;text-decoration:none;color:#26323b}
.chat-product:hover{border-color:#7a9cb5;background:#f9fcfe}
.chat-product>img,.chat-product-placeholder{width:48px;height:51px;object-fit:contain;flex:none;background:#f8fafb;border-radius:4px}
.chat-product-placeholder{display:grid;place-items:center}
.chat-product-placeholder::before{content:'';width:22px;height:22px;background:#768996;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 7 9-4 9 4v10l-9 4-9-4V7Zm0 0 9 4 9-4m-9 4v10M7 5l9 4'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 7 9-4 9 4v10l-9 4-9-4V7Zm0 0 9 4 9-4m-9 4v10M7 5l9 4'/%3E%3C/svg%3E") center/contain no-repeat}
.chat-product>span:last-child{min-width:0;flex:1}
.chat-product strong{display:block;font-size:12px;font-weight:600;line-height:1.5}
.chat-product small{display:block;font-size:12px;color:#748089;line-height:1.5;margin-top:4px}
.chat-product i{display:block;font-style:normal;color:#044c7f;font-size:12px;margin-top:5px;font-weight:600}
.chat-dialog button:focus-visible,.chat-dialog input:focus-visible,.chat-dialog a:focus-visible,.chat-launcher:focus-visible{outline:3px solid #e7ad3b;outline-offset:3px}
.chat-conversation:focus-visible{outline:2px solid #e7ad3b;outline-offset:-3px}
@media(max-width:650px){.chat-launcher{right:14px;bottom:calc(18px + env(safe-area-inset-bottom,0px));width:56px;height:56px;min-height:56px;padding:9px}.chat-dialog{inset:auto 10px calc(10px + env(safe-area-inset-bottom,0px)) 10px;width:calc(100vw - 20px);height:min(680px,calc(100dvh - 30px - env(safe-area-inset-bottom,0px)));max-height:calc(100dvh - 30px - env(safe-area-inset-bottom,0px));border-radius:14px}.chat-header{padding:17px}.chat-conversation{padding:18px 14px}.chat-input-row textarea{font-size:16px;padding:11px 12px}.chat-form-note{font-size:12px}.chat-form{padding-bottom:12px}.chat-message p{font-size:13px}}
@media(prefers-reduced-motion:reduce){.chat-launcher{transition:none}.chat-launcher::before,.chat-bot-icon{animation:none}.chat-conversation{scroll-behavior:auto}}

/* Lectura cómoda dentro de la conversación y acciones táctiles claras. */
.chat-header h2{font-size:16px}
.chat-header p{font-size:12px}
.chat-message p,.chat-message--user p{font-size:14px;line-height:1.65}
.chat-message .chat-intro-note{font-size:12px;color:#4d5c67}
.chat-sender{font-size:12px}
.chat-actions button{font-size:12px;min-height:36px}
.chat-close{width:44px;height:44px}
.chat-input-row textarea{font-size:14px}
.chat-input-row button{width:44px;height:44px}
.chat-form-note{font-size:12px;color:#53626c}
.chat-links>a{font-size:13px;min-height:36px;display:inline-flex;align-items:center}
.chat-product strong{font-size:13px}
.chat-product small{font-size:12px;color:#53636e}
.chat-product i{font-size:12px}
@media(max-width:650px){.chat-input-row textarea{font-size:16px}.chat-actions button,.chat-links>a{min-height:44px}.chat-header{padding:13px 15px}.chat-header h2{font-size:15px}.chat-header p{font-size:12px}}

/* Botón con la mascota del Asistente IA Copreser en vez del logo de WhatsApp (Matías, 04-11-2026). */
.chat-launcher{padding:0;background:#e3f0fa}
.chat-launcher:hover{background:#e3f0fa}
.chat-bot-icon{display:block;width:100%;height:100%;border-radius:50%;object-fit:cover}
.chat-avatar{overflow:hidden;padding:0;background:#e3f0fa}
.chat-avatar img{display:block;width:100%;height:100%}
@media(max-width:650px){.chat-launcher{padding:0}}

/* Globo «¡Hola! Estoy aquí para ayudarte» junto a la mascota (Matías, 04-11-2026). Sigue al botón cuando este sube para no
   tapar el aviso de agregado (--chat-bottom lo fija chat.js) y se oculta con la ×, al abrir el chat o si hay un aviso visible. */
.chat-teaser[hidden]{display:none}
.chat-teaser{position:fixed;z-index:74;right:calc(24px + 56px + 14px);bottom:calc(var(--chat-bottom,24px) + 10px + env(safe-area-inset-bottom,0px));display:flex;align-items:flex-start;gap:4px;max-width:min(290px,calc(100vw - 132px));padding:12px 8px 12px 16px;background:#fff;border:1px solid #d4dde4;border-radius:16px 16px 4px 16px;box-shadow:0 12px 32px #003d3133;animation:chat-teaser-in .35s ease-out}
.chat-teaser::after{content:'';position:absolute;right:-7px;bottom:20px;width:12px;height:12px;background:#fff;border-right:1px solid #d4dde4;border-bottom:1px solid #d4dde4;transform:rotate(-45deg)}
.chat-teaser-body{display:grid;gap:3px;padding:0;border:0;background:none;font:inherit;color:#0f2d42;text-align:left;cursor:pointer}
.chat-teaser-body strong{font-size:14px;font-weight:750;line-height:1.3}
.chat-teaser-body span{font-size:13px;line-height:1.4;color:#646d73}
.chat-teaser-body:hover strong{color:#004577}
.chat-teaser-close{display:grid;place-items:center;flex:none;width:28px;height:28px;margin:-6px -2px 0 4px;padding:0;border:0;border-radius:50%;background:none;color:#646d73;cursor:pointer}
.chat-teaser-close:hover{background:#e3ebf1;color:#0f2d42}
.chat-teaser-close svg{width:16px;height:16px}
.chat-teaser-body:focus-visible,.chat-teaser-close:focus-visible{outline:3px solid #e7ad3b;outline-offset:3px}
@keyframes chat-teaser-in{from{opacity:0;transform:translateY(8px) scale(.96)}to{opacity:1;transform:none}}
@media(max-width:650px){.chat-teaser{right:calc(14px + 64px + 12px);max-width:calc(100vw - 104px);padding:10px 6px 10px 14px}.chat-teaser-body strong{font-size:14px}}
@media(prefers-reduced-motion:reduce){.chat-teaser{animation:none}}

/* Bot cotizador (contrato asistente-v1): solo aparece con ASSISTANT_API_ENABLED y cuando el bot responde «estado». */
.chat-actions .chat-reset{background:#fff;border-color:#8fb0c8;color:#04416d;font-weight:600}
.chat-reset[hidden]{display:none}
.chat-message--ai p{white-space:pre-line}
.chat-product-reason{display:block;font-style:normal;font-size:12px;color:#3c4d5a;line-height:1.5;margin-top:4px}
.chat-cart{margin-top:12px;padding:11px 12px;border:1px solid #c6d7e4;border-radius:8px;background:#f2f8fc}
.chat-cart strong{display:block;font-size:13px;color:#1c394d;margin-bottom:6px}
.chat-cart ul{margin:0 0 10px;padding-left:18px;font-size:13px;line-height:1.6;color:#2b3c49}
.chat-cart-add{width:100%;min-height:40px;border-radius:8px;background:#015998;color:#fff;font-weight:600;font-size:14px}
.chat-cart-add:hover{background:#004475}
.chat-cart-add:disabled{background:#8ca7ba;cursor:default}
.chat-cart-result{margin:8px 0 0;font-size:13px;color:#2b3c49;line-height:1.5}
.chat-cart-result:empty{display:none}
.chat-cart-auto{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px}
.chat-cart-auto ul{flex:1 1 100%;margin:0;padding:0;list-style:none}
.chat-cart-auto li{padding-left:20px;position:relative}
.chat-cart-auto li::before{content:'';position:absolute;left:2px;top:.3em;width:12px;height:12px;background:#015998;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 12 5 5L20 6'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 12 5 5L20 6'/%3E%3C/svg%3E") center/contain no-repeat}
.chat-cart-auto li.chat-cart-rejected::before{content:'!';color:#9a3412}
.chat-cart-auto li.is-undone{color:#5d6b78;text-decoration:line-through}
.chat-cart-auto .chat-cart-result{flex:1 1 100%;margin:0}
/* «Deshacer» va en la fila de «Ver mi cotización» y se ve igual que esos enlaces: mismo alto, borde, radio y letra. */
.chat-cart-auto .chat-links{flex:1 1 100%;margin-top:4px;align-items:center}
.chat-cart-undo{display:inline-flex;align-items:center;min-height:36px;padding:7px 10px;border:1px solid #ccdbe5;border-radius:6px;background:#f9fbfd;color:#04416d;font-size:13px;font-weight:600;line-height:1.5}
.chat-cart-undo:hover{border-color:#87a4b8;background:#e8f0f6}
.chat-cart-undo:disabled{opacity:.55}
.chat-privacy{margin:6px 1px 0;font-size:12px;color:#53626c;line-height:1.5}
.chat-privacy[hidden]{display:none}
.chat-privacy a{color:#04416d}
.chat-turnstile{margin-top:6px}
.chat-turnstile[hidden]{display:none}
@media(max-width:650px){.chat-cart-add,.chat-cart-undo{min-height:44px}}

/* Ventana más grande y con menos texto (Matías, 05-11-2026: «agranda la ventana para que se vea más grande, quita el exceso de
   texto»). La tarjeta entera es el enlace (sin «Ver producto →»), con foto más grande; los atajos y el aviso de privacidad se
   ocultan al empezar a conversar con el bot (is-talking) y el contador solo aparece cerca del tope. */
.chat-form-note[hidden],.chat-form-note [hidden]{display:none}
.copreser-chat.is-talking .chat-actions button[data-chat-prompt]{display:none}
.chat-product{gap:14px;padding:10px 12px;position:relative;padding-right:30px}
.chat-product::after{content:'›';position:absolute;right:12px;top:50%;transform:translateY(-50%);font-size:22px;line-height:1;color:#7691a5}
.chat-product>img,.chat-product-placeholder{width:72px;height:72px}
.chat-product strong{font-size:14px;line-height:1.4}
.chat-product small{font-size:13px}
.chat-product-reason{font-size:14px}
.chat-message p,.chat-message--user p{font-size:15px}
@media(max-width:650px){
.chat-dialog{height:calc(100dvh - 20px - env(safe-area-inset-bottom,0px));max-height:calc(100dvh - 20px - env(safe-area-inset-bottom,0px))}
.chat-product>img,.chat-product-placeholder{width:60px;height:60px}
.chat-product strong{font-size:14px}
.chat-message p,.chat-message--user p{font-size:14px}
}

/* «Escribiendo…» mientras el bot piensa (Matías, 05-11-2026: «como el escribiendo de WhatsApp»). */
.chat-typing{width:fit-content;min-width:0;padding:14px 18px}
/* Avances mientras el bot responde (asistente-v1 1.7.0): el texto reemplaza a los puntos. */
.chat-typing--progress{padding:11px 16px;max-width:100%}
.chat-typing-text{display:block;font-size:14px;line-height:1.4;color:#3c5568;animation:chat-progress .25s ease-out}
@keyframes chat-progress{from{opacity:0;transform:translateY(2px)}to{opacity:1;transform:none}}
.chat-typing-dots{display:flex;align-items:center;gap:5px;height:18px}
.chat-typing-dots i{width:8px;height:8px;border-radius:50%;background:#64869e;opacity:.45;animation:chat-typing 1.2s infinite ease-in-out}
.chat-typing-dots i:nth-child(2){animation-delay:.16s}
.chat-typing-dots i:nth-child(3){animation-delay:.32s}
@keyframes chat-typing{0%,60%,100%{transform:translateY(0);opacity:.45}30%{transform:translateY(-4px);opacity:1}}
.chat-header p.is-typing{font-style:italic;color:#e5eef5}
@media(prefers-reduced-motion:reduce){.chat-typing-dots i{animation:none;opacity:.75}.chat-typing-text{animation:none}}

/* Cuadro de varias líneas (asistente-v1 1.4.0, «Pega tu lista», 06-11-2026): crece con el texto (chat.js) y respeta los saltos de
   línea, también en la burbuja del visitante. «Pegar mi lista» lo abre más alto. */
.chat-input-row textarea{display:block;resize:none;overflow-y:auto;min-height:46px;max-height:190px}
.chat-input-row textarea.is-list{min-height:120px}
.chat-message--user p{white-space:pre-line}
.chat-actions .chat-paste{background:#fff;border-color:#9fbbd0;color:#04416d;font-weight:600}
.chat-handoff>a{background:#015998;border-color:#015998;color:#fff;font-weight:600}
.chat-handoff>a:hover{background:#004475;border-color:#004475;color:#fff}

/* La mascota con el texto «Asistente» (09-11-2026; Matías: «siento que se pierde un poco»; eligió «1A + 2 + 3» en las
   maquetas). NN/g («Site AI chatbots», «Discoverability of AI on Amazon»): un ícono sin texto casi no se descubre; va una
   palabra conocida a la vista, que también está en el nombre accesible («Abrir el asistente de Copreser», WCAG 2.5.3).
   El globo «¡Hola!» pasa arriba del botón, que ahora es más ancho. */
.chat-launcher{display:flex;align-items:center;gap:10px;width:auto;height:56px;min-height:56px;padding:3px 20px 3px 3px;border:2px solid #00508a;border-radius:999px;background:#fff;color:#00508a}
.chat-launcher:hover{background:#e3f0fa}
.chat-launcher .chat-bot-icon{flex:none;width:46px;height:46px;background:#e3f0fa}
.chat-launcher-label{font-size:16px;font-weight:750;line-height:1;white-space:nowrap}
.chat-teaser{right:24px;bottom:calc(var(--chat-bottom,24px) + 56px + 16px + env(safe-area-inset-bottom,0px));max-width:min(300px,calc(100vw - 48px))}
.chat-teaser::after{right:40px;bottom:-7px;border-right:1px solid #d4dde4;border-bottom:1px solid #d4dde4;transform:rotate(45deg)}
@media(max-width:650px){
.chat-launcher{width:auto;height:52px;min-height:52px;padding:3px 16px 3px 3px}
.chat-launcher .chat-bot-icon{width:42px;height:42px}
.chat-launcher-label{font-size:15px}
.chat-teaser{right:14px;bottom:calc(var(--chat-bottom,18px) + 52px + 14px + env(safe-area-inset-bottom,0px));max-width:calc(100vw - 28px)}
}
/* Al bajar la página la píldora «Asistente» se encoge al círculo con la mascota, para no tapar enlaces ni botones
   (revisión de diseño, 17-11-2026: medía 158 px y quedaba encima de fichas, enlaces y «Cotizar»; Material Design,
   «Extended FAB»: el botón con texto se contrae al desplazarse). Arriba de la página, con el puntero encima o con el
   foco del teclado vuelve a mostrar el texto. chat.js pone «is-compact». */
.chat-launcher{transition:background .18s ease,transform .18s ease,box-shadow .18s ease,padding .2s ease,gap .2s ease}
.chat-launcher-label{max-width:140px;overflow:hidden;transition:max-width .2s ease,opacity .15s ease}
.chat-launcher.is-compact:not(:hover):not(:focus-visible){gap:0;padding:3px}
.chat-launcher.is-compact:not(:hover):not(:focus-visible) .chat-launcher-label{max-width:0;opacity:0}
@media(prefers-reduced-motion:reduce){.chat-launcher,.chat-launcher-label{transition:none}}
.chat-reset .icon{width:14px;height:14px;margin-right:5px;vertical-align:-2px}
