/*
 * whatsapp-float.css
 * Botón flotante de WhatsApp — mismo estilo LIMPIO que el toggle de tema:
 * círculo simple, sombra suave, sin pulso/tooltip/rebote. Espejo del toggle
 * (toggle abajo-derecha, WhatsApp abajo-izquierda).
 */

.whatsapp-float {
  position: fixed;
  bottom: 24px;
  left: 24px;                 /* espejo del theme-toggle (derecha) */
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;        /* verde WhatsApp (reconocible) */
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.5);
  transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease,
              visibility 0.3s ease, bottom 0.3s ease;
  z-index: 9999;
  /* aparece con un fade limpio (la clase la añade whatsapp-float.js) */
  opacity: 0;
  visibility: hidden;
}

.whatsapp-float-visible {
  opacity: 1;
  visibility: visible;
}

.whatsapp-float:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.6);
}

.whatsapp-float:active {
  transform: scale(0.95);
}

.whatsapp-float svg {
  width: 30px;
  height: 30px;
}

/* El pulso y el tooltip se eliminan en el rediseño limpio (el JS aún crea el
   span del pulso; lo ocultamos). */
.whatsapp-float-pulse { display: none; }

/* Banner de cookies visible: subir AMBOS botones flotantes (toggle + WhatsApp)
   por igual y en TODAS las páginas (este archivo se carga en todas, incluida
   /inteligencia-artificial/ que usa su propio stylesheet). consent.js marca
   body.consent-active. */
body.consent-active .whatsapp-float,
body.consent-active .theme-toggle {
  bottom: 110px;
}

@media (max-width: 768px) {
  body.consent-active .whatsapp-float,
  body.consent-active .theme-toggle {
    bottom: 170px;   /* el banner de cookies es más alto en mobile (apilado) */
  }
}

/* Mobile — mismas medidas/offsets que el theme-toggle */
@media (max-width: 768px) {
  .whatsapp-float {
    width: 44px;
    height: 44px;
    bottom: 12px;
    left: 12px;
  }
  .whatsapp-float svg {
    width: 24px;
    height: 24px;
  }
}
