/* WhatsApp floating button — sito e landing */
.whatsapp-button {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: #25D366;
  color: #fff !important;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.4);
  z-index: 100;
  transition: transform 0.2s;
  text-decoration: none;
}

.whatsapp-button:hover {
  transform: scale(1.1);
  opacity: 1;
}

.whatsapp-tooltip {
  position: absolute;
  left: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%) translateX(-8px);
  background: #fff;
  color: #1A0A1E;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.9em;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s ease, transform 0.45s ease, visibility 0.45s ease;
}

.whatsapp-tooltip::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-right-color: #fff;
  border-left: 0;
}

.whatsapp-button.is-tooltip-visible .whatsapp-tooltip,
.whatsapp-button.is-hover .whatsapp-tooltip {
  opacity: 0.96;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

.whatsapp-button.is-buzzing {
  animation: whatsappBuzz 0.55s ease-in-out 2;
}

@keyframes whatsappBuzz {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  20% {
    transform: translate(-2px, 1px) rotate(-4deg);
  }
  40% {
    transform: translate(2px, -1px) rotate(4deg);
  }
  60% {
    transform: translate(-2px, -1px) rotate(-3deg);
  }
  80% {
    transform: translate(2px, 1px) rotate(3deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .whatsapp-button.is-buzzing {
    animation: none;
  }

  .whatsapp-tooltip {
    transition: none;
  }
}

@media (max-width: 480px) {
  .whatsapp-button {
    bottom: 16px;
    left: 16px;
  }

  .whatsapp-tooltip {
    white-space: normal;
    max-width: 140px;
    font-size: 0.8em;
    padding: 8px 10px;
  }
}
