/* La burbuja de WhatsApp de todas las páginas (js/whatsapp.js abre la tarjeta con aspecto de chat).
   Abajo a la derecha; en la home sube por encima de «Ver la demo» y, en el móvil, de la barra de abajo.
   Por debajo de la demo en vídeo (z-index 110), que la tapa al abrirse. */
.wa { position: fixed; right: 20px; bottom: 20px; z-index: 90; font-family: inherit; }
@media (min-width: 681px) { body:has(.guia-lanzar) .wa { bottom: 84px; } }
/* Con el menú del móvil abierto, fuera: si no, quedaría encima de su parte de abajo. */
body:has(.nav-mov[open]) .wa, body:has(.menu-movil[open]) .wa { display: none; }
.wa-boton { position: relative; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: #25d366; color: #fff; box-shadow: 0 10px 24px -6px rgba(37, 211, 102, .55), 0 6px 16px rgba(0, 0, 0, .22); transition: transform .2s; }
.wa-boton:hover { transform: scale(1.06); }
.wa-boton svg { width: 31px; height: 31px; }
.wa-boton::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 50%; background: #25d366; animation: wa-latido 2.4s ease-out 1s 3; }
@keyframes wa-latido { from { transform: scale(1); opacity: .5; } to { transform: scale(1.7); opacity: 0; } }
.wa-boton:focus-visible, .wa-tarjeta a:focus-visible, .wa-tarjeta button:focus-visible { outline: 2px solid #128c7e; outline-offset: 3px; }
.wa-tarjeta { position: absolute; right: 0; bottom: calc(100% + 14px); width: 320px; max-width: calc(100vw - 32px); overflow: hidden; border-radius: 16px; background: #efeae2; box-shadow: 0 24px 60px -18px rgba(0, 0, 0, .45); opacity: 0; visibility: hidden; transform: translateY(12px) scale(.97); transform-origin: bottom right; transition: opacity .2s, transform .2s, visibility .2s; }
.wa.abierta .wa-tarjeta { opacity: 1; visibility: visible; transform: none; }
.wa-cabeza { display: flex; align-items: center; gap: 12px; padding: 12px 10px 12px 14px; background: #128c7e; color: #fff; }
.wa-cabeza img { flex: none; width: 42px; height: 42px; border-radius: 50%; background: #fff; }
.wa-cabeza div { flex: 1; min-width: 0; line-height: 1.25; }
.wa-cabeza b { display: block; font-size: 15px; font-weight: 700; }
.wa-cabeza span { display: block; font-size: 12px; opacity: .9; }
.wa-cerrar { flex: none; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: none; color: #fff; font-size: 24px; line-height: 1; cursor: pointer; opacity: .85; }
.wa-cerrar:hover { opacity: 1; background: rgba(255, 255, 255, .12); }
.wa-cuerpo { padding: 18px 14px 16px 20px; }
.wa-mensaje { position: relative; max-width: 92%; margin: 0; padding: 9px 12px 8px; border-radius: 2px 10px 10px 10px; background: #fff; color: #111b21; font-size: 14px; line-height: 1.45; box-shadow: 0 1px 1px rgba(0, 0, 0, .1); }
.wa-mensaje::before { content: ""; position: absolute; top: 0; left: -7px; border-style: solid; border-width: 0 8px 9px 0; border-color: transparent #fff transparent transparent; }
.wa-pie { padding: 0 14px 14px; }
.wa-ir { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 12px; border-radius: 26px; background: #25d366; color: #fff; font-size: 15px; font-weight: 700; text-decoration: none; box-shadow: 0 8px 18px -6px rgba(37, 211, 102, .6); transition: background .2s; }
.wa-ir:hover { background: #1fb457; color: #fff; }
.wa-ir svg { width: 20px; height: 20px; }
@media (max-width: 680px) {
  .wa { right: 16px; bottom: 16px; }
  .wa { transition: bottom .3s ease; }
  body:has(.barra-movil:not(.escondida)) .wa { bottom: 92px; }
}
@media (prefers-reduced-motion: reduce) { .wa-boton::before { animation: none; } .wa-tarjeta, .wa-boton { transition: none; } }
