/* Asistente virtual — tokens del sitio (#0D2278 azul, #719BE2 acento, #F0F2F8 fondo alterno, radio 4px) */
/* z-index 1040: por debajo de .cookie-overlay (z-index 1080 en style.css), así el banner de cookies siempre queda encima */
.asis { position: fixed; right: 20px; bottom: 20px; z-index: 1040; font-family: Inter, system-ui, sans-serif; }
.asis[hidden], .asis [hidden] { display: none !important; }
.asis-abrir { width: 56px; height: 56px; border-radius: 50%; border: 0; background: #0D2278; color: #fff; font-size: 1.5rem; box-shadow: 0 6px 18px rgba(13,34,120,.35); cursor: pointer; }
.asis-abrir:hover, .asis-abrir:focus-visible { background: #719BE2; outline: none; }
.asis-abierto .asis-abrir { display: none; }
.asis-panel { position: absolute; right: 0; bottom: 0; width: 370px; max-height: min(620px, calc(100vh - 40px)); display: flex; flex-direction: column; background: #fff; border-radius: 4px; box-shadow: 0 12px 40px rgba(13,34,120,.25); overflow: hidden; }
.asis-encabezado { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: #0D2278; color: #fff; }
.asis-encabezado strong { display: block; font-family: Barlow, sans-serif; font-size: 1rem; }
.asis-encabezado small { display: block; opacity: .8; font-size: .75rem; }
.asis-punto { width: 9px; height: 9px; border-radius: 50%; background: #2ecc71; flex-shrink: 0; }
.asis-cerrar { margin-left: auto; background: none; border: 0; color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.asis-mensajes { flex: 1; overflow-y: auto; padding: 14px; background: #F0F2F8; display: flex; flex-direction: column; gap: 8px; }
.asis-msg { max-width: 85%; padding: 9px 12px; border-radius: 4px; font-size: .9rem; line-height: 1.45; word-wrap: break-word; }
.asis-asistente { align-self: flex-start; background: #fff; color: #1A1D29; border-left: 3px solid #719BE2; }
.asis-asistente a { color: #0D2278; font-weight: 500; }
.asis-usuario { align-self: flex-end; background: #0D2278; color: #fff; }
.asis-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.asis-chips button { border: 1px solid #719BE2; background: #fff; color: #0D2278; border-radius: 4px; padding: 5px 10px; font-size: .8rem; cursor: pointer; }
.asis-chips button:hover, .asis-chips button:focus-visible { background: #719BE2; color: #fff; outline: none; }
.asis-chips a { border: 1px solid #719BE2; background: #fff; color: #0D2278; border-radius: 4px; padding: 5px 10px; font-size: .8rem; text-decoration: none; }
.asis-chips a:hover, .asis-chips a:focus-visible { background: #719BE2; color: #fff; outline: none; }
.asis-escribiendo span { display: inline-block; width: 6px; height: 6px; margin: 0 2px; border-radius: 50%; background: #719BE2; animation: asis-rebote 1s infinite; }
.asis-escribiendo span:nth-child(2) { animation-delay: .15s; } .asis-escribiendo span:nth-child(3) { animation-delay: .3s; }
@keyframes asis-rebote { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .asis-escribiendo span { animation: none; } }
.asis-form { display: flex; border-top: 1px solid #E4E8F2; }
.asis-form input[type=text] { flex: 1; border: 0; padding: 12px; font-size: .9rem; outline: none; }
.asis-form button { border: 0; background: none; color: #0D2278; padding: 0 14px; font-size: 1.1rem; cursor: pointer; }
.asis-trampa { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.asis-leyenda { margin: 0; padding: 6px 12px 8px; font-size: .68rem; color: #6B7280; background: #fff; }
.asis-leyenda a { color: #6B7280; }
.asis-burbuja { position: absolute; right: 0; bottom: 68px; width: 240px; background: #fff; border-radius: 4px; padding: 10px 28px 10px 12px; font-size: .85rem; color: #1A1D29; box-shadow: 0 6px 18px rgba(13,34,120,.2); cursor: pointer; }
.asis-burbuja-cerrar { position: absolute; top: 4px; right: 6px; border: 0; background: none; font-size: 1.1rem; color: #6B7280; cursor: pointer; }
@media (max-width: 575.98px) {
  .asis { right: 14px; bottom: 14px; }
  .asis-abierto { inset: 0; }
  .asis-abierto .asis-panel { position: fixed; inset: 0; width: 100%; max-height: none; border-radius: 0; }
}
