/* ═══ Botón del asistente virtual (propuesta aplicada 2026-11-23) ═══
   Botón blanco con aro ámbar y globo de diálogo marino con tres puntos «escribiendo». Computador y tablet (≥ 761 px): flotante abajo a la derecha con el texto «¿Te ayudo?»
   siempre visible. Celular (≤ 760 px): tercer botón de la barra de abajo (solo el globo), a la derecha de «Agendar visita gratis» y del teléfono.
   Llama la atención con ráfagas cortas (vibración tipo timbre + dos ondas ámbar + puntos que saltan); las programa asistente.js y paran al
   tocarlo. Sin luz verde (el verde queda solo para agendar). Con «reducir movimiento» no se mueve. */
.asist {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 50px; height: 50px; padding: 0; border: 0; border-radius: 12px;
  background: #fff; color: var(--navy); font: 700 15px/1 var(--font-display); cursor: pointer;
  box-shadow: 0 0 0 3px #ffb340, 0 8px 16px -10px rgba(10, 37, 64, .8); -webkit-tap-highlight-color: transparent;
  transition: background .16s, transform .16s var(--ease-out);
}
.asist svg { width: 26px; height: 26px; flex: none; overflow: visible; }
.asist-txt { display: none; white-space: nowrap; }
.asist:active { transform: scale(.97); }
.asist:focus-visible { outline: 3px solid var(--navy); outline-offset: 5px; }
@media (hover: hover) and (pointer: fine) { .asist:hover { background: #fff7e8; } }

/* Computador y tablet: flotante */
@media (min-width: 761px) {
  .asist {
    position: fixed; right: 22px; bottom: 22px; z-index: 95; width: auto; height: 56px; padding: 0 22px 0 18px; border-radius: 28px;
    box-shadow: 0 0 0 3px #ffb340, 0 14px 26px -12px rgba(10, 37, 64, .75);
  }
  .asist-txt { display: block; }
}

/* Ondas: dos anillos ámbar que salen del borde del botón */
.asist-onda { position: absolute; inset: 0; border-radius: inherit; border: 2px solid #ffb340; opacity: 0; pointer-events: none; }
.asist.asist-vibra .asist-onda { animation: asistOnda 1.6s var(--ease-out); }
.asist.asist-vibra .asist-onda:nth-of-type(2) { animation-delay: .35s; }
@keyframes asistOnda { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(1.5); opacity: 0; } }
@media (min-width: 761px) {
  .asist.asist-vibra .asist-onda { animation-name: asistOndaWeb; }
  @keyframes asistOndaWeb { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(1.45, 1.7); opacity: 0; } }
}
/* Vibración tipo timbre en cada ráfaga (1,1 s, se calma al final) */
.asist.asist-vibra { animation: asistTimbre 1.1s ease-in-out; }
@keyframes asistTimbre {
  0%, 100% { transform: rotate(0) scale(1); }
  8% { transform: rotate(-10deg) scale(1.05); } 16% { transform: rotate(9deg) scale(1.05); }
  24% { transform: rotate(-8deg) scale(1.05); } 32% { transform: rotate(7deg) scale(1.05); }
  40% { transform: rotate(-5deg) scale(1.02); } 48% { transform: rotate(4deg) scale(1.02); }
  56% { transform: rotate(-2deg); } 64% { transform: rotate(1deg); } 72% { transform: rotate(0); }
}
/* Puntos «escribiendo» dentro del globo */
.asist-pt { transform-box: fill-box; transform-origin: center; }
.asist.asist-vibra .asist-pt { animation: asistPunto .6s ease-in-out 3; }
.asist.asist-vibra .asist-pt:nth-of-type(2) { animation-delay: .12s; }
.asist.asist-vibra .asist-pt:nth-of-type(3) { animation-delay: .24s; }
@keyframes asistPunto { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-2.2px); } }

/* Panel de conversación */
.asist-panel {
  position: fixed; z-index: 96; right: 22px; bottom: 96px; width: min(360px, calc(100vw - 24px)); display: none; flex-direction: column;
  border-radius: 20px; background: #fff; overflow: hidden; box-shadow: 0 28px 60px -22px rgba(10, 37, 64, .7); border: 1px solid var(--line);
}
.asist-panel.asist-visible { display: flex; animation: asistPanel .28s var(--ease-out); }
@keyframes asistPanel { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.asist-cab { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--navy); color: #fff; }
.asist-cab strong { font: 800 16px/1.2 var(--font-display); }
.asist-cab small { display: block; margin-top: 2px; font-size: 12.5px; color: #b9cde3; }
.asist-cab button { margin-left: auto; width: 34px; height: 34px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .12); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; }
.asist-cab button:focus-visible { outline: 3px solid #ffbd66; outline-offset: 2px; }
.asist-cuerpo { display: flex; flex-direction: column; gap: 10px; padding: 16px; min-height: 140px; max-height: 50vh; overflow-y: auto; background: var(--bg-soft); }
.asist-msg { max-width: 88%; padding: 11px 14px; border-radius: 14px 14px 14px 4px; background: #fff; color: var(--text); font: 400 15px/1.45 var(--font-text); box-shadow: 0 1px 2px rgba(10, 37, 64, .12); }
.asist-pie { display: grid; gap: 8px; padding: 12px 16px 16px; border-top: 1px solid var(--line); background: #fff; }
.asist-pie p { margin: 0; font-size: 13px; color: var(--muted); }
.asist-pie .btn { min-height: 46px; }
@media (max-width: 760px) {
  .asist-panel { right: 12px; left: 12px; width: auto; bottom: calc(82px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  .asist, .asist *, .asist-panel { animation: none !important; transition: none !important; }
}
