/* V20 TEST — botón global de WhatsApp. Solo afecta a su clase y al espacio móvil reservado. */
.v20-whatsapp-float {
  position: fixed;
  z-index: 1000;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: max(28px, env(safe-area-inset-bottom, 0px));
  display: inline-flex;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, .38);
  border-radius: 999px;
  background: #25d366;
  color: #fff;
  box-shadow: 0 5px 16px rgba(0, 0, 0, .2);
  font: 700 14px/1.2 system-ui, -apple-system, "Segoe UI", sans-serif;
  text-decoration: none;
  animation: v21-whatsapp-pulse 5s ease-in-out infinite;
  -webkit-tap-highlight-color: transparent;
}

.v20-whatsapp-float:hover {
  background: #1ebe5d;
  animation-play-state: paused;
  transform: translateY(-2px);
}

.v20-whatsapp-float:focus-visible {
  outline: 3px solid #075e36;
  outline-offset: 4px;
  animation-play-state: paused;
}

.v20-whatsapp-float__icon {
  display: block;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
}

.v20-whatsapp-float__icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.v20-whatsapp-float__label {
  white-space: nowrap;
}

@keyframes v21-whatsapp-pulse {
  0%, 82%, 100% {
    box-shadow: 0 5px 16px rgba(0, 0, 0, .2);
    transform: scale(1);
  }
  88% {
    box-shadow: 0 0 0 6px rgba(37, 211, 102, .2), 0 6px 18px rgba(0, 0, 0, .18);
    transform: scale(1.055);
  }
  94% {
    box-shadow: 0 5px 16px rgba(0, 0, 0, .2);
    transform: scale(1);
  }
}

@media (max-width: 640px) {
  .v20-whatsapp-float {
    right: max(12px, env(safe-area-inset-right, 0px));
    bottom: max(22px, env(safe-area-inset-bottom, 0px));
    width: 54px;
    height: 54px;
    min-height: 54px;
    padding: 0;
  }

  .v20-whatsapp-float__icon {
    width: 29px;
    height: 29px;
    flex-basis: 29px;
  }

  .v20-whatsapp-float__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    clip-path: inset(50%);
  }

  /* Reserva el borde inferior para que el flotante no tape el cierre de página. */
  body.v20-wa-enabled .main {
    padding-bottom: 96px;
  }

  body.v20-wa-enabled .footer {
    padding-bottom: 96px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .v20-whatsapp-float {
    animation: none;
    transition: none;
  }

  .v20-whatsapp-float:hover {
    transform: none;
  }
}
