/* Chat bot "¿Te ayudamos?" (12/11/2026). Lo arma bot.js.
   Preferencias de Sergio: letra oscura y grande, botón naranja lleno, marco azul. Probar a 320 px. */
.svbot-boton {
  position: fixed; z-index: 70; right: 16px; bottom: var(--svbot-abajo, calc(16px + env(safe-area-inset-bottom, 0px)));
  display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 20px 0 16px;
  border: 0; border-radius: 999px; background: #cc4a22; color: #fff; cursor: pointer;
  font: 700 17px/1 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  box-shadow: 0 10px 26px rgba(90, 45, 20, .28), 0 0 0 3px #fff;
  transition: transform .2s ease, background-color .2s ease, bottom .25s ease;
}
.svbot-boton:hover { background: #b23f1c; transform: translateY(-2px); }
.svbot-boton:focus-visible { outline: 3px solid #1e4e9c; outline-offset: 3px; }
.svbot-icono { display: inline-flex; }
body.svbot-abierto .svbot-boton { display: none; }

.svbot-caja {
  position: fixed; z-index: 71; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  width: min(400px, calc(100vw - 32px)); height: min(600px, calc(100svh - 32px));
  display: flex; flex-direction: column; overflow: hidden;
  background: #fff; color: #3a2418; border: 2px solid #1e4e9c; border-radius: 20px;
  box-shadow: 0 24px 60px rgba(30, 40, 80, .28);
  font: 400 17px/1.5 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  animation: svbot-entra .25s ease;
}
.svbot-caja[hidden] { display: none; }
@keyframes svbot-entra { from { opacity: 0; transform: translateY(14px) scale(.98); } }

.svbot-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 14px 14px 18px; background: #1e4e9c; color: #fff; }
.svbot-cab b { display: block; font-size: 18px; }
.svbot-cab small { display: block; font-size: 15px; opacity: .92; }
.svbot-cerrar { width: 44px; height: 44px; flex: none; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .16); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; }
.svbot-cerrar:hover { background: rgba(255, 255, 255, .28); }
.svbot-cerrar:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

.svbot-mensajes { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 16px 14px 18px; display: flex; flex-direction: column; gap: 12px; background: #fff6ec; }
.svbot-msj { max-width: 92%; padding: 12px 14px; border-radius: 16px; word-wrap: break-word; }
.svbot-msj.bot { align-self: flex-start; background: #fff; border: 1px solid #f0dccb; border-bottom-left-radius: 6px; }
.svbot-msj.yo { align-self: flex-end; background: #1e4e9c; color: #fff; font-weight: 600; border-bottom-right-radius: 6px; }
.svbot-msj p { margin: 0 0 8px; }
.svbot-msj p:last-child { margin-bottom: 0; }
.svbot-msj ul { margin: 0 0 8px; padding-left: 20px; }
.svbot-msj li { margin: 2px 0; }
.svbot-msj a { color: #1e4e9c; font-weight: 700; text-decoration: underline; }

.svbot-opciones { display: flex; flex-direction: column; gap: 8px; }
.svbot-grupo { margin: 6px 0 0; font-size: 15px; font-weight: 700; color: #3a2418; text-transform: uppercase; letter-spacing: .04em; }
.svbot-op {
  display: block; width: 100%; padding: 11px 14px; text-align: left; cursor: pointer;
  background: #fff; color: #3a2418; border: 2px solid #1e4e9c; border-radius: 12px;
  font-weight: 600; font-size: 16px; line-height: 1.35; font-family: inherit; text-decoration: none;
  transition: background-color .15s ease;
}
.svbot-op:hover { background: #dce8fb; }
.svbot-op:focus-visible { outline: 3px solid #cc4a22; outline-offset: 2px; }
.svbot-otra { align-self: flex-start; width: auto; }
.svbot-pedir { margin-top: 6px; background: #cc4a22; border-color: #cc4a22; color: #fff; text-align: center; font-weight: 700; }
.svbot-pedir:hover { background: #b23f1c; }

.svbot-escribe { display: inline-flex; gap: 4px; padding: 4px 0; }
.svbot-escribe i { width: 8px; height: 8px; border-radius: 50%; background: #7a5a45; animation: svbot-punto 1s infinite ease-in-out; }
.svbot-escribe i:nth-child(2) { animation-delay: .15s; }
.svbot-escribe i:nth-child(3) { animation-delay: .3s; }
@keyframes svbot-punto { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

/* Celular: el botón queda como círculo para no tapar la página; la caja ocupa la pantalla */
@media (max-width: 600px) {
  .svbot-boton { right: 12px; bottom: var(--svbot-abajo, calc(12px + env(safe-area-inset-bottom, 0px))); width: 56px; height: 56px; padding: 0; justify-content: center; }
  .svbot-texto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .svbot-caja { right: 8px; left: 8px; width: auto; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); height: calc(100svh - 16px); }
}
@media (prefers-reduced-motion: reduce) {
  .svbot-caja, .svbot-escribe i { animation: none; }
  .svbot-boton { transition: none; }
}
