/* ============================================================
   BOTÓN FLOTANTE DE WHATSAPP
   ============================================================ */

.whatsapp-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: var(--z-floating);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--color-whatsapp);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.25),
    0 0 0 0 rgba(37, 211, 102, 0);
  text-decoration: none;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.4s ease,
              transform 0.4s var(--ease-out-quart),
              box-shadow 0.3s ease,
              background-color 0.3s ease;
}
.whatsapp-fab.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.whatsapp-fab:hover,
.whatsapp-fab:focus-visible {
  transform: translateY(0) scale(1.1);
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.4),
    0 0 0 8px rgba(37, 211, 102, 0.15);
}
.whatsapp-fab:focus-visible {
  outline: 2px solid var(--color-text-primary);
  outline-offset: 4px;
}

.whatsapp-fab__icon {
  width: 30px;
  height: 30px;
  color: var(--color-text-primary);
  z-index: 2;
}
.whatsapp-fab__icon svg {
  width: 100%;
  height: 100%;
}

/* Pulse rings */
.whatsapp-fab::before,
.whatsapp-fab::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--color-whatsapp);
  opacity: 0;
  z-index: 0;
}
.whatsapp-fab.is-visible::before {
  animation: whatsappPulse 3.5s ease-out infinite;
}
.whatsapp-fab.is-visible::after {
  animation: whatsappPulse 3.5s ease-out infinite 1.5s;
}
@keyframes whatsappPulse {
  0%   { transform: scale(1);   opacity: 0.5; }
  100% { transform: scale(1.9); opacity: 0; }
}

@media (max-width: 767px) {
  .whatsapp-fab {
    width: 56px;
    height: 56px;
    bottom: 20px;
    right: 20px;
  }
  .whatsapp-fab__icon {
    width: 28px;
    height: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .whatsapp-fab.is-visible::before,
  .whatsapp-fab.is-visible::after {
    animation: none;
  }
  .whatsapp-fab {
    transition: opacity 0.4s ease;
  }
  .whatsapp-fab:hover,
  .whatsapp-fab:focus-visible {
    transform: none;
  }
}
