/* Asistente virtual de surlex.cl (27-09-2026) */
.sxc-boton, .sxc-panel, .sxc-aviso { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; box-sizing: border-box; }
.sxc-panel *, .sxc-panel *::before, .sxc-panel *::after { box-sizing: border-box; }

.sxc-boton {
  position: fixed; right: 22px; bottom: 22px; z-index: 100000;
  width: 62px; height: 62px; border-radius: 50%; border: 0; cursor: pointer;
  background: #3B7CFE; color: #fff; box-shadow: 0 8px 24px rgba(22, 32, 44, .35);
  display: flex; align-items: center; justify-content: center; transition: transform .2s, background .2s;
}
.sxc-boton:hover { transform: scale(1.06); background: #2f6be6; }
.sxc-boton:focus-visible { outline: 3px solid #9fc0ff; outline-offset: 3px; }
.sxc-boton svg { width: 28px; height: 28px; fill: #fff; }
.sxc-boton.sxc-activo { background: #16202c; }

.sxc-aviso {
  position: fixed; right: 96px; bottom: 30px; z-index: 100000; max-width: 230px;
  background: #fff; color: #16202c; border-radius: 12px; padding: 10px 14px; cursor: pointer;
  box-shadow: 0 8px 24px rgba(22, 32, 44, .2); font-size: 14px; line-height: 1.35;
  opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .3s, transform .3s;
}
.sxc-aviso strong { display: block; }
.sxc-aviso span { color: #3B7CFE; }
.sxc-aviso.sxc-visible { opacity: 1; transform: none; pointer-events: auto; }

.sxc-panel {
  position: fixed; right: 22px; bottom: 96px; z-index: 100001;
  width: 370px; height: 580px; max-height: calc(100vh - 120px);
  background: #f4f6fa; border-radius: 16px; overflow: hidden;
  box-shadow: 0 18px 48px rgba(22, 32, 44, .35);
  display: flex; flex-direction: column;
  opacity: 0; transform: translateY(16px) scale(.98); pointer-events: none; visibility: hidden;
  transition: opacity .22s, transform .22s, visibility .22s;
}
.sxc-panel.sxc-abierto { opacity: 1; transform: none; pointer-events: auto; visibility: visible; }

.sxc-cab { background: #16202c; color: #fff; display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; }
.sxc-avatar { width: 38px; height: 38px; border-radius: 50%; background: #3B7CFE; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; flex: none; }
.sxc-titulo { flex: 1; min-width: 0; }
.sxc-titulo strong { display: block; font-size: 16px; }
.sxc-titulo span { font-size: 12.5px; color: #b9c6dc; }
.sxc-cerrar { background: none; border: 0; color: #fff; font-size: 28px; line-height: 1; cursor: pointer; padding: 0 4px; opacity: .8; }
.sxc-cerrar:hover { opacity: 1; }

.sxc-msgs { flex: 1; overflow-y: auto; padding: 16px 14px 8px; display: flex; flex-direction: column; gap: 8px; }
.sxc-msg { max-width: 86%; padding: 10px 13px; border-radius: 14px; font-size: 14.5px; line-height: 1.45; white-space: pre-line; word-wrap: break-word; }
.sxc-bot { background: #fff; color: #1d2733; border-bottom-left-radius: 4px; align-self: flex-start; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.sxc-yo { background: #3B7CFE; color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.sxc-bot a { color: #2f6be6; font-weight: 600; }
.sxc-bot a.sxc-wa { display: inline-block; margin-top: 8px; background: #25d366; color: #fff; padding: 7px 14px; border-radius: 18px; text-decoration: none; }

.sxc-escribiendo { display: flex; gap: 4px; padding: 13px 14px; }
.sxc-escribiendo i { width: 7px; height: 7px; border-radius: 50%; background: #9aa6b8; animation: sxc-punto 1s infinite; }
.sxc-escribiendo i:nth-child(2) { animation-delay: .15s; }
.sxc-escribiendo i:nth-child(3) { animation-delay: .3s; }
@keyframes sxc-punto { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }

.sxc-opciones { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 0 4px; }
.sxc-op {
  border: 1.5px solid #3B7CFE; background: #fff; color: #2f6be6; border-radius: 18px;
  padding: 7px 13px; font-size: 13.5px; cursor: pointer; line-height: 1.2; font-family: inherit;
}
.sxc-op:hover { background: #eef3ff; }
.sxc-op-principal { background: #3B7CFE; color: #fff; }
.sxc-op-principal:hover { background: #2f6be6; }
.sxc-fecha input { border: 1.5px solid #c9d3e3; border-radius: 10px; padding: 6px 10px; font-size: 14px; font-family: inherit; }

.sxc-resumen { max-width: 100%; width: 100%; }
.sxc-resumen dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 8px 0 10px; font-size: 13.5px; }
.sxc-resumen dt { color: #6b778a; }
.sxc-resumen dd { margin: 0; font-weight: 600; }
.sxc-acepto { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; line-height: 1.4; color: #4a5566; font-weight: 400; margin: 0; cursor: pointer; }
.sxc-acepto input { margin-top: 2px; flex: none; }
.sxc-acepto.sxc-falta { color: #c62828; }

.sxc-form { display: flex; gap: 8px; padding: 10px 12px; background: #fff; border-top: 1px solid #e3e8f0; }
.sxc-input { flex: 1; border: 1.5px solid #d5dce8; border-radius: 22px; padding: 10px 14px; font-size: 15px; font-family: inherit; outline: none; min-width: 0; }
.sxc-input:focus { border-color: #3B7CFE; }
.sxc-enviar { width: 42px; height: 42px; flex: none; border-radius: 50%; border: 0; background: #3B7CFE; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.sxc-enviar svg { width: 20px; height: 20px; fill: #fff; }
.sxc-trampa { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

@media (max-width: 480px) {
  .sxc-panel { right: 0; bottom: 0; width: 100%; height: 100%; max-height: none; border-radius: 0; }
  .sxc-panel.sxc-abierto ~ .sxc-boton { display: none; }
  .sxc-boton { right: 16px; bottom: 16px; width: 58px; height: 58px; }
  .sxc-aviso { right: 84px; bottom: 22px; }
  .sxc-input { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .sxc-panel, .sxc-aviso, .sxc-boton { transition: none; }
  .sxc-escribiendo i { animation: none; }
}
