.whatsapp-float {
  position: fixed;
  bottom: 6rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(100px) scale(0.8);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  will-change: transform, opacity;
  z-index: 9998;
  text-decoration: none;
}

.whatsapp-float.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.whatsapp-float:hover {
  background: linear-gradient(135deg, #128C7E 0%, #075E54 100%);
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5);
}

.whatsapp-float svg {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
}

.whatsapp-float:hover svg {
  transform: scale(1.1) rotate(5deg);
}

.whatsapp-float:active {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 3px 12px rgba(37, 211, 102, 0.4);
}

/* Pulse animation per attirare l'attenzione */
@keyframes whatsappPulse {
  0% {
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
  }
  50% {
    box-shadow: 0 4px 24px rgba(37, 211, 102, 0.6), 0 0 0 8px rgba(37, 211, 102, 0.1);
  }
  100% {
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
  }
}

.whatsapp-float.visible {
  animation: whatsappPulse 2s ease-in-out infinite;
}

.whatsapp-float:hover {
  animation: none;
}

@media (max-width: 767px) {
  .whatsapp-float {
    width: 45px;
    height: 45px;
    bottom: 5.5rem;
    right: 1.5rem;
  }

  .whatsapp-float svg {
    width: 20px;
    height: 20px;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .whatsapp-float {
    width: 48px;
    height: 48px;
    bottom: 5.75rem;
  }

  .whatsapp-float svg {
    width: 22px;
    height: 22px;
  }
}
