/* Asistente de la página: globo de conversación. Todo con prefijo «as-» para no chocar con los estilos del sitio.
   El color sale de --as-color (lo elige la agencia en el panel). */
.as-raiz { --as-color: #5A63C8; --as-tinta: #23263A; --as-suave: #5B6078; --as-linea: #E2E5F2; --as-fondo: #F5F6FC;
  position: fixed; right: 18px; bottom: 18px; z-index: 2147483000; display: grid; justify-items: end; gap: 12px;
  font: 15px/1.45 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; color: var(--as-tinta); }
.as-raiz *, .as-raiz *::before, .as-raiz *::after { box-sizing: border-box; }
.as-raiz [hidden] { display: none !important; }
.as-globo { display: inline-flex; align-items: center; gap: .5rem; border: 0; border-radius: 999px; padding: .8rem 1.2rem; background: var(--as-color); color: #fff; font: inherit; font-weight: 650; cursor: pointer;
  box-shadow: 0 10px 28px -8px rgba(35, 38, 58, .45); }
.as-globo:hover { filter: brightness(1.06); }
.as-abierto .as-globo-texto { display: none; }
.as-globo:focus-visible, .as-opcion:focus-visible, .as-enviar:focus-visible, .as-cerrar:focus-visible { outline: 3px solid var(--as-tinta); outline-offset: 2px; }
.as-panel { width: min(380px, calc(100vw - 24px)); height: min(560px, calc(100vh - 110px)); display: flex; flex-direction: column; background: #fff; border: 1px solid var(--as-linea); border-radius: 20px; overflow: hidden;
  box-shadow: 0 24px 60px -16px rgba(35, 38, 58, .45); }
.as-cabeza { display: flex; align-items: center; justify-content: space-between; padding: .85rem 1rem; background: var(--as-color); color: #fff; }
.as-cabeza strong { font-weight: 700; }
.as-cerrar { border: 0; background: transparent; color: #fff; font-size: 1rem; cursor: pointer; width: 32px; height: 32px; border-radius: 8px; }
.as-cerrar:hover { background: rgba(255, 255, 255, .18); }
.as-mensajes { flex: 1 1 auto; min-height: 90px; overflow-y: auto; padding: 1rem; display: grid; align-content: start; gap: .55rem; background: var(--as-fondo); }
.as-msj { margin: 0; max-width: 86%; padding: .6rem .85rem; border-radius: 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.as-bot { background: #fff; border: 1px solid var(--as-linea); border-bottom-left-radius: 6px; justify-self: start; }
.as-yo { background: var(--as-color); color: #fff; border-bottom-right-radius: 6px; justify-self: end; }
.as-espera { color: var(--as-suave); font-style: italic; }
.as-opciones { flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: .4rem; padding: .7rem 1rem .2rem; max-height: 270px; overflow-y: auto; }
.as-opcion { border: 1.5px solid var(--as-color); background: #fff; color: var(--as-tinta); border-radius: 999px; padding: .42rem .9rem; font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; text-decoration: none; }
.as-opcion:hover { background: var(--as-fondo); }
.as-opcion.as-fuerte { background: var(--as-color); color: #fff; }
.as-opcion[disabled] { opacity: .55; cursor: default; }
.as-form { display: grid; gap: .5rem; width: 100%; }
.as-campo { display: grid; grid-template-columns: 84px 1fr; align-items: center; gap: .5rem; font-size: .86rem; font-weight: 600; }
.as-campo input, .as-campo select, .as-entrada input { width: 100%; border: 1px solid #8B91AA; border-radius: 10px; padding: .5rem .65rem; font: inherit; color: var(--as-tinta); background: #fff; }
.as-campo input:focus-visible, .as-campo select:focus-visible, .as-entrada input:focus-visible { outline: 2px solid var(--as-color); outline-offset: 1px; }
.as-form-pie { display: flex; justify-content: flex-end; gap: .4rem; }
.as-cabeza, .as-entrada { flex: 0 0 auto; }
.as-entrada { display: grid; grid-template-columns: 1fr auto; gap: .45rem; padding: .7rem 1rem .9rem; }
.as-enviar { border: 0; border-radius: 10px; background: var(--as-color); color: #fff; width: 42px; font-size: 1rem; cursor: pointer; }
.as-error { font: 15px/1.5 system-ui, sans-serif; max-width: 48ch; margin: 3rem auto; padding: 0 1rem; color: #8A1D3A; }
@media (max-width: 520px) {
  .as-raiz { right: 12px; bottom: 12px; }
  .as-panel { height: min(520px, calc(100vh - 96px)); }
}
