/* Fixit chat styles live in the shadow root. Host sites may allowlist this file without unsafe-inline. */
:host{border:0!important;outline:none!important;box-shadow:none!important}
:host(:not([data-focus-input="keyboard"])) *{outline:none!important}
:host{all:initial;--ink:#202830;--muted:#68707b;--status-ink:#52606b;--lime:#0066cc;font:14px/1.5 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;position:fixed;right:24px;bottom:24px;z-index:2147483000;color:var(--ink);color-scheme:light;text-align:left;line-height:1.5;direction:ltr;display:block} :host([data-side=left]){left:24px;right:auto}*{box-sizing:border-box}button,input,textarea{font:inherit}button{cursor:pointer;color:inherit;touch-action:manipulation}button:disabled{cursor:default;opacity:.5}button:focus-visible,textarea:focus-visible,summary:focus-visible,a:focus-visible{outline:2px solid var(--lime);outline-offset:3px}svg{width:22px;height:22px;display:block}button{border:0}#toggle{display:grid;place-items:center;margin-left:auto;width:56px;height:56px;border-radius:50%;background:var(--lime);box-shadow:0 5px 24px #26331d20;transition:transform .2s}#toggle:hover{transform:translateY(-2px)}#toggle svg{width:27px;height:27px}#panel{position:relative;inset:auto;margin:0 0 16px;padding:0;color:inherit;width:390px;max-width:calc(100vw - 32px);height:var(--widget-height,540px);max-height:calc(100dvh - 108px);background:#fff;border:1px solid #e6e8eb;border-radius:20px;box-shadow:0 8px 28px #20283014;overflow:hidden;display:flex;flex-direction:column;transform-origin:bottom right;animation:panel-in .28s cubic-bezier(.2,.8,.2,1)}#panel[hidden]{display:none}header{display:flex;align-items:center;gap:12px;padding:21px 18px 16px;flex-shrink:0}.avatar{color:var(--launcher-ink,#ffffff);display:grid;place-items:center;flex-shrink:0;width:38px;height:38px;border-radius:11px;background:var(--lime);font-size:18px;font-weight:650;line-height:1;overflow:hidden}.avatar svg{width:56%;height:56%}.avatar img{display:block;width:100%;height:100%;object-fit:contain}.avatar[data-logo]{background:#fff;box-shadow:inset 0 0 0 1px #2028301a}header .identity{flex:1;min-width:0}#title{display:block;font-size:14px;font-weight:650;line-height:1.4;overflow-wrap:anywhere}header small{font-size:12px;color:var(--muted)}header button{width:34px;height:34px;flex-shrink:0;background:transparent;color:var(--ink);display:grid;place-items:center;border-radius:50%;transition:background-color .15s,color .15s}header button+button{margin-left:-8px}header button svg{width:18px;height:18px;stroke-width:1.5}header button:hover{background:var(--chat-soft,#f4f5f7)}#restart svg{transition:transform .35s ease}#restart:hover svg{transform:rotate(-45deg)}#messages{padding:16px 18px 8px;flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scroll-behavior:smooth}.message{display:flex;gap:9px;margin:0 0 20px;animation:message-in .22s ease-out}.message .avatar{width:28px;height:28px;border-radius:50%;font-size:13px;margin-top:3px}.message-content{max-width:calc(100% - 36px);min-width:0}.bubble{margin:0;padding:12px 14px;border-radius:17px;background:var(--chat-soft,#f4f5f7);white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.55;font-size:14px}.message[data-role=user]{justify-content:flex-end}.message[data-role=user] .bubble{background:var(--lime);color:var(--launcher-ink,#ffffff)}.message[data-role=user] .message-content{max-width:89%}.meta{color:var(--muted);font-size:10px;margin:5px 10px 0;display:block}.message[data-role=user] .meta{text-align:right}.sent{display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:flex-end;gap:6px}.sent+.bubble{margin-top:6px}.sent img{display:block;max-width:min(190px,100%);max-height:190px;border-radius:14px;border:1px solid var(--chat-line,#dce1e6);object-fit:cover}.sent-file{max-width:100%;padding:9px 12px;border-radius:14px;border:1px solid var(--chat-line,#dce1e6);font-size:13px;overflow-wrap:anywhere}details{margin:7px 10px;color:var(--status-ink);font-size:11px}summary{cursor:pointer}details ul{padding-left:16px;margin:6px 0}details a{color:inherit;overflow-wrap:anywhere}#suggestions{display:flex;gap:8px;flex-wrap:wrap;margin:3px 0 22px 36px}#suggestions button{background:var(--panel-bg,#fff);border:1px solid var(--chat-line,#e2e5e9);color:var(--ink);border-radius:22px;padding:8px 12px;font-size:12px}#suggestions button:hover{background:var(--chat-soft,#f4f5f7)}#typing{display:flex;align-items:center;gap:9px;margin:0 0 20px;min-height:28px}#typing[hidden]{display:none}#typing .avatar{width:28px;height:28px;border-radius:50%;font-size:13px}
/* Lo que el asistente está haciendo: solo el texto, con un brillo que lo recorre de izquierda a derecha. */
#step{font-size:14px;line-height:1.4;color:var(--status-ink)}#step:empty{display:none}
@supports ((-webkit-background-clip:text) or (background-clip:text)){#step{background:linear-gradient(90deg,var(--status-ink) 0%,var(--status-ink) 42%,color-mix(in srgb,var(--status-ink) 28%,transparent) 50%,var(--status-ink) 58%,var(--status-ink) 100%) 100% 0/250% 100% no-repeat;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;animation:step-shine 1.7s linear infinite}}
form{margin:6px 16px 0;padding:5px;display:flex;align-items:flex-end;gap:5px;border:1px solid var(--chat-line,#dce1e6);border-radius:13px;background:var(--panel-bg,#fff)}textarea{width:100%;flex:1;min-width:0;border:0;resize:none;background:transparent;outline:none;max-height:120px;padding:8px 9px;line-height:21px;color:var(--ink);scrollbar-width:thin}textarea::placeholder{color:var(--muted);opacity:1}:host([data-focus-input="keyboard"]) form:focus-within{border-color:#dce1e6;outline:2px solid var(--lime);outline-offset:2px}#send{width:36px;height:36px;border-radius:10px;background:var(--ink);color:var(--inverse-ink,#fff);display:grid;place-items:center;flex-shrink:0}#attach{width:36px;height:36px;border-radius:10px;background:transparent;color:var(--muted);display:grid;place-items:center;flex-shrink:0}#attach:hover:not(:disabled){color:var(--ink);background:var(--chat-line,#eef1f4)}#attach[hidden]{display:none}#attach svg{width:18px;height:18px}#status{font-size:11px;padding:8px 20px 0;color:var(--status-ink)}#status:empty{display:none}#retry{background:transparent;text-decoration:underline;margin-left:6px;padding:0}footer{padding:13px 12px 15px;text-align:center;font-size:10px;color:var(--muted)}@keyframes panel-in{from{opacity:0;transform:translateY(14px) scale(.98)}to{opacity:1;transform:none}}@keyframes message-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}@keyframes step-shine{from{background-position:100% 0}to{background-position:0 0}}@media(max-width:480px){:host{right:16px;right:max(16px,env(safe-area-inset-right,0px));bottom:20px;bottom:max(20px,calc(env(safe-area-inset-bottom,0px) + 8px))}:host([data-side=left]){left:16px;left:max(16px,env(safe-area-inset-left,0px));right:auto}#panel{width:calc(100vw - 24px);max-width:none;height:var(--widget-height,540px);max-height:calc(100dvh - 100px)}header{padding:17px 15px}header button{width:40px;height:40px}#messages{padding-left:14px;padding-right:14px}}@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
#panel{background:var(--panel-bg,#fff)}#toggle{display:flex;align-items:center;justify-content:center;white-space:nowrap;color:var(--launcher-ink,#202830)}#toggle[hidden],#close[hidden]{display:none}#toggle span{font-weight:600;font-size:13px}#toggle svg{flex:none}#call{flex:none;padding:6px 9px;border-radius:8px;background:var(--chat-soft,#f4f5f7);color:var(--ink);font-size:12px;font-weight:600;text-decoration:none;white-space:nowrap}#call:hover{background:#eceef1}
.bubble>p{margin:0 0 9px}.bubble>p:last-child{margin-bottom:0}.bubble>ul,.bubble>ol{margin:8px 0;padding-left:19px}.bubble>ul:last-child,.bubble>ol:last-child{margin-bottom:0}.bubble li{margin:5px 0;padding-left:2px}.bubble code{font-size:.92em;background:#e6e9ed;padding:1px 4px;border-radius:4px}.bubble>hr{border:0;border-top:1px solid #dce1e6;margin:12px 0}.bubble a{color:inherit;text-decoration:underline;text-underline-offset:2px}textarea:focus-visible{outline:none}
:host([data-inline]){position:static;display:block;width:100%;height:100%}:host([data-inline]) #panel{width:100%;max-width:none;height:100%;max-height:none;margin:0;border-radius:20px;box-shadow:none}:host([data-inline]) #toggle{display:none}
/* En una sección de la web del negocio: su ancho y el alto del tamaño elegido. */
:host([data-section]){height:auto}:host([data-section]) #panel{height:var(--widget-height,540px)}
#contact-options{margin:6px 20px;font-size:12px}.contact-form{display:grid;gap:8px;margin:10px 0;padding:12px}.contact-control{display:block;width:100%;padding:8px;border:1px solid #dce1e6;border-radius:7px}.contact-submit{padding:9px;border-radius:8px;background:var(--ink);color:var(--inverse-ink,#fff)}.contact-link{display:block;margin:8px 0}#verify{display:grid;gap:8px;margin:4px 0 12px;padding:12px;border:1px solid var(--chat-line,#dce1e6);border-radius:12px;font-size:13px}#verify>p{margin:0}#verify form{display:grid;gap:8px}#verify label{display:grid;gap:4px;font-size:12px;color:var(--muted)}#verify .contact-control{font:inherit;color:var(--ink);background:transparent}#verify .contact-submit{font:inherit;border:0;cursor:pointer}#verify .contact-submit:disabled{opacity:.6;cursor:default}#verify>p[role="status"]:empty{display:none}#verify .verify-other{justify-self:start;padding:0;border:0;background:none;color:var(--ink);font:inherit;font-size:12px;text-decoration:underline;cursor:pointer}

/* Con un fondo propio, --ink, --muted y --status-ink los calcula chat.js. */
:host([data-panel-tone="dark"]){--chat-soft:#33363e;--chat-line:#5a5d64;--inverse-ink:#202830}
:host([data-panel-tone="dark"]) .bubble code,:host([data-panel-tone="dark"]) #call:hover{background:var(--chat-line)}

/* Safari no reajusta por su cuenta el tamaño del texto del widget ni resalta cada toque. */
:host{-webkit-text-size-adjust:100%;text-size-adjust:100%;-webkit-tap-highlight-color:transparent}
/* El botón cambia de icono al abrir, y avisa de una respuesta que llegó con el chat minimizado. */
#toggle{position:relative}#toggle svg{transition:transform .2s ease,opacity .15s ease}#toggle[aria-expanded="false"] svg:nth-of-type(2),#toggle[aria-expanded="true"] svg:nth-of-type(1),#toggle[aria-expanded="true"] span{display:none}#toggle[aria-expanded="true"]{width:56px!important;padding:0!important;gap:0!important}#toggle:active{transform:scale(.94)}
#toggle[data-unread]::after{content:"";position:absolute;top:1px;right:1px;width:13px;height:13px;border-radius:50%;background:#e5484d;box-shadow:0 0 0 2px #fff}
/* Volver a lo último cuando llega una respuesta mientras se lee más arriba. */
#latest{position:absolute;left:50%;bottom:120px;transform:translateX(-50%);width:36px;height:36px;border-radius:50%;background:var(--panel-bg,#fff);color:var(--ink);box-shadow:0 2px 10px #20283026,0 0 0 1px #2028301a;display:grid;place-items:center;z-index:1}#latest[hidden]{display:none}#latest svg{width:18px;height:18px}
/* Con el dedo: objetivos de 44 px y texto de 16 px en los campos, que es lo que evita que Safari amplíe la página al escribir. */
@media(pointer:coarse){header button{width:44px;height:44px}header button+button{margin-left:-6px}#send,#attach{width:44px;height:44px;border-radius:12px}textarea,.contact-control,#verify .contact-control{font-size:16px}textarea{padding:11px 9px;line-height:22px}#suggestions button{min-height:44px;padding:10px 14px;font-size:14px}#latest{width:44px;height:44px}.contact-submit,#verify .contact-submit{min-height:44px}}
/* En el móvil, una hoja a pantalla completa. chat.js la abre como diálogo modal y, cuando el teclado encoge la ventana visible
   (en iOS la página no cambia de tamaño), le da su alto y su posición (--sheet-*). Va con inset:0 y no con 100dvh, que en Safari
   se actualiza con retraso; el fondo es opaco porque Safari tiñe sus barras con el color de lo que toca el borde. */
:host([data-sheet]) #panel{position:fixed;inset:0;width:auto!important;height:auto;max-width:none;max-height:none;margin:0;border:0;border-radius:0;box-shadow:none;touch-action:none;transform-origin:bottom center;animation:sheet-in .26s cubic-bezier(.2,.8,.2,1)}
:host([data-sheet][data-fitted]) #panel{top:var(--sheet-top,0px);bottom:auto;height:var(--sheet-height,100%)}
:host([data-sheet]) #panel::backdrop{background:var(--panel-bg,#fff)}
/* Safari da a la franja de la hora el color de una barra fija pegada al borde de arriba, y no cuenta lo fijo que ocupa toda la
   pantalla, como la hoja: sin esta barra propia, la franja se quedaba del color de la cabecera de la web. Va sobre el relleno de
   la cabecera del chat, del mismo color, así que no se ve ni tapa nada. */
#edge{display:none}
:host([data-sheet]) #edge{display:block;position:fixed;top:0;left:0;right:0;height:8px;background:var(--panel-bg,#fff)}
:host([data-sheet]) #toggle{display:none}
:host([data-sheet]) header{padding:max(12px,env(safe-area-inset-top,0px)) max(12px,env(safe-area-inset-right,0px)) 10px max(16px,env(safe-area-inset-left,0px))}
/* El gesto de arrastrar solo desplaza la conversación y el texto que se escribe, nunca la página de detrás. */
:host([data-sheet]) #messages{touch-action:pan-y;padding-left:max(14px,env(safe-area-inset-left,0px));padding-right:max(14px,env(safe-area-inset-right,0px))}
:host([data-sheet]) #messages::before{content:"";float:left;width:1px;margin-left:-1px;height:calc(100% + 1px)}
:host([data-sheet]) textarea,:host([data-sheet]) button,:host([data-sheet]) a,:host([data-sheet]) input,:host([data-sheet]) summary{touch-action:manipulation}
:host([data-sheet]) textarea{touch-action:pan-y}
:host([data-sheet]) form{margin-left:max(12px,env(safe-area-inset-left,0px));margin-right:max(12px,env(safe-area-inset-right,0px))}
:host([data-sheet]) footer{padding-bottom:max(12px,env(safe-area-inset-bottom,0px))}
:host([data-sheet]) .bubble{font-size:15px}
@keyframes sheet-in{from{opacity:0;transform:translateY(24px)}to{opacity:1;transform:none}}

/* Carrusel de los productos de una respuesta (Juan, 29-11-2026): desplazamiento nativo con ajuste a cada tarjeta. Sin foto o
   sin precio, la tarjeta se queda con lo que hay. */
.products{position:relative;margin:8px 0 0}
.products-track{position:relative;display:flex;gap:10px;overflow-x:auto;scroll-snap-type:x mandatory;overscroll-behavior-x:contain;scrollbar-width:none;touch-action:pan-x pan-y;padding:2px;margin:-2px;border-radius:16px}
.products-track::-webkit-scrollbar{display:none}
.products-track:focus-visible{outline:2px solid var(--lime);outline-offset:1px}
@media (prefers-reduced-motion:no-preference){.products-track{scroll-behavior:smooth}}
.product{flex:0 0 150px;min-width:0;scroll-snap-align:start}
.product a{display:flex;flex-direction:column;height:100%;color:inherit;text-decoration:none;background:var(--panel-bg,#fff);border:1px solid var(--chat-line,#e2e5e9);border-radius:14px;overflow:hidden;transition:border-color .15s,box-shadow .15s}
.product a:hover{border-color:var(--muted);box-shadow:0 4px 14px #2028301a}
.product a:focus-visible{outline-offset:-2px}
.product-photo{position:relative;display:block;aspect-ratio:4/5;background:var(--chat-soft,#f4f5f7)}
.product-photo img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}
.products[data-photos=none] .product-photo{aspect-ratio:auto;min-height:0;background:none}
.product-badge{position:absolute;left:8px;top:8px;padding:2px 8px;border-radius:20px;background:#202830d9;color:#fff;font-size:10px;font-weight:600;line-height:1.5}
.products[data-photos=none] .product-badge{position:static;display:inline-block;margin:10px 10px 0}
.product-name{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;margin:9px 11px 0;font-size:12.5px;font-weight:600;line-height:1.35}
.product-name:last-child{margin-bottom:11px}
.product-price{display:block;margin:3px 11px 11px;font-size:12.5px;line-height:1.35;color:var(--status-ink)}
.product-price s{color:var(--muted)}
.products-controls{position:absolute;inset:0 -12px;z-index:1;display:flex;justify-content:space-between;align-items:center;pointer-events:none}
.products-controls[hidden]{display:none}
.products-controls button{pointer-events:auto;width:30px;height:30px;padding:0;border:1px solid var(--chat-line,#e2e5e9);border-radius:50%;background:var(--panel-bg,#fff);color:var(--ink);box-shadow:0 2px 8px #2028301f;display:grid;place-items:center;transition:opacity .15s}
.products-controls button:disabled{opacity:0;pointer-events:none}
.products-controls svg{width:16px;height:16px}
@media (hover:none) and (pointer:coarse){.products-controls{display:none}}
:host([data-sheet]) .product{flex-basis:164px}
:host([data-sheet]) .product-name,:host([data-sheet]) .product-price{font-size:13.5px}
