/* Asistente de la página: califica al visitante y lo pasa al WhatsApp de ventas.
   Usa las variables de estilo.css (colores y tipografías del sitio). */
.asis-burbuja {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 58px; padding: 0 20px 0 16px; border: 0; border-radius: 999px;
  background: var(--acero); color: #fff; font: 600 1rem var(--texto); cursor: pointer;
  box-shadow: 0 12px 30px rgba(18, 49, 79, .35);
}
.asis-burbuja:hover { background: var(--acero-medio); }
.asis-burbuja svg { width: 26px; height: 26px; flex: none; }
.asis-burbuja .punto { position: absolute; top: 8px; left: 38px; width: 11px; height: 11px; border-radius: 50%; background: #34d399; border: 2px solid var(--acero); }
.asis-burbuja[aria-expanded="true"] { display: none; }
.asis-aviso {
  position: fixed; right: 18px; bottom: 88px; z-index: 60; max-width: 270px;
  background: var(--papel); color: var(--acero); border: 1px solid var(--plata); border-radius: 14px;
  padding: 12px 36px 12px 14px; font-size: .95rem; box-shadow: 0 12px 30px rgba(18, 49, 79, .2);
}
.asis-aviso button { position: absolute; top: 6px; right: 6px; border: 0; background: none; font-size: 1.1rem; color: var(--plata-oscura); cursor: pointer; }
@media (prefers-reduced-motion: no-preference) { .asis-aviso { animation: asisEntra .3s ease-out; } }

.asis-panel {
  position: fixed; right: 18px; bottom: 18px; z-index: 70;
  width: min(380px, calc(100vw - 24px)); height: min(600px, calc(100vh - 36px));
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--niebla); border: 1px solid var(--plata); border-radius: 20px;
  box-shadow: 0 30px 70px rgba(18, 49, 79, .35); font-family: var(--texto); color: var(--acero);
}
.asis-panel[hidden] { display: none; }
.asis-panel.en-barra { top: 70px; bottom: auto; height: min(600px, calc(100vh - 86px)); }
@media (prefers-reduced-motion: no-preference) { .asis-panel { animation: asisEntra .22s ease-out; } }
@keyframes asisEntra { from { opacity: 0; transform: translateY(10px); } }
.asis-cab { display: flex; align-items: center; gap: 10px; padding: 14px 14px 14px 16px; background: var(--acero); color: #fff; }
.asis-cab .foto { width: 38px; height: 38px; border-radius: 50%; background: #fff; display: grid; place-items: center; flex: none; }
.asis-cab .foto img { width: 28px; }
.asis-cab b { display: block; font-family: var(--titular); font-stretch: 112%; font-size: 1.05rem; line-height: 1.1; }
.asis-cab small { color: #BFD3E6; font-size: .8rem; }
.asis-cab small::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #34d399; margin-right: 5px; vertical-align: 1px; }
.asis-cab .acciones { margin-left: auto; display: flex; gap: 2px; }
.asis-cab .acciones button { border: 0; background: none; color: #fff; width: 34px; height: 34px; border-radius: 8px; cursor: pointer; font-size: 1.05rem; }
.asis-cab .acciones button:hover { background: rgba(255,255,255,.12); }
.asis-mensajes { flex: 1; overflow-y: auto; padding: 16px 14px 8px; display: flex; flex-direction: column; gap: 8px; }
.asis-msg { max-width: 88%; padding: 10px 13px; border-radius: 16px; font-size: .96rem; line-height: 1.45; white-space: pre-line; }
.asis-msg.bot { background: var(--papel); border: 1px solid var(--plata); border-bottom-left-radius: 5px; align-self: flex-start; }
.asis-msg.yo { background: var(--acero); color: #fff; border-bottom-right-radius: 5px; align-self: flex-end; }
.asis-msg b { color: var(--cian-texto); }
.asis-msg ul { margin: 6px 0 0; padding-left: 1.1em; }
.asis-escribiendo { align-self: flex-start; background: var(--papel); border: 1px solid var(--plata); border-radius: 16px; padding: 12px 14px; display: flex; gap: 4px; }
.asis-escribiendo i { width: 7px; height: 7px; border-radius: 50%; background: var(--plata-oscura); opacity: .5; }
@media (prefers-reduced-motion: no-preference) {
  .asis-escribiendo i { animation: asisPunto 1s infinite; }
  .asis-escribiendo i:nth-child(2) { animation-delay: .15s; }
  .asis-escribiendo i:nth-child(3) { animation-delay: .3s; }
}
@keyframes asisPunto { 50% { opacity: 1; transform: translateY(-2px); } }
.asis-opciones { display: flex; flex-wrap: wrap; gap: 7px; padding: 4px 14px 12px; }
.asis-op {
  border: 1.5px solid var(--acero); background: var(--papel); color: var(--acero);
  border-radius: 999px; padding: .45em .9em; font: 600 .9rem var(--texto); cursor: pointer; text-decoration: none;
}
.asis-op:hover { background: var(--acero); color: #fff; }
.asis-op[aria-pressed="true"] { background: var(--acero); color: #fff; }
.asis-op.principal { background: var(--wa); border-color: var(--wa); color: #fff; }
.asis-op.principal:hover { background: var(--wa-hover); }
.asis-op.suave { border-color: var(--plata); color: var(--acero-medio); }
.asis-op svg { width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px; }
.asis-entrada { display: flex; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid var(--plata); background: var(--papel); }
.asis-entrada[hidden] { display: none; }
.asis-entrada input { flex: 1; min-width: 0; font: 400 1rem var(--texto); color: var(--acero); border: 1.5px solid var(--plata); border-radius: 999px; padding: .6em 1em; background: var(--niebla); }
.asis-entrada input:focus { outline: none; border-color: var(--cian); background: #fff; }
.asis-entrada button { border: 0; border-radius: 50%; width: 44px; height: 44px; background: var(--acero); color: #fff; cursor: pointer; flex: none; display: grid; place-items: center; }
.asis-entrada button svg { width: 20px; height: 20px; }
.asis-pie { text-align: center; font-size: .75rem; color: var(--plata-oscura); padding: 0 12px 8px; background: var(--papel); }
@media (max-width: 560px) {
  .asis-panel, .asis-panel.en-barra { right: 0; bottom: 0; top: auto; width: 100vw; height: 88vh; border-radius: 20px 20px 0 0; }
  .asis-burbuja { right: 14px; bottom: 14px; padding: 0 16px 0 14px; }
  .asis-burbuja .texto { display: none; }
  .asis-burbuja .punto { left: 32px; }
  .asis-aviso { right: 14px; bottom: 82px; }
}
