/* WhatsApp Floating Button - Optimizado para conversión */

/* Botón flotante principal */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
  opacity: 0;
  transform: scale(0);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.whatsapp-float.show {
  opacity: 1;
  transform: scale(1);
}

/* Botón principal */
.whatsapp-button {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #25D366;
  color: white;
  width: 65px;
  height: 65px;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  position: relative;
  animation: shake 1s ease-in-out infinite;
}

/* Animación de vibración */
@keyframes shake {
  0%, 100% {
    transform: rotate(0deg);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: rotate(-8deg);
  }
  20%, 40%, 60%, 80% {
    transform: rotate(8deg);
  }
}

.whatsapp-button:hover {
  background: #20BA5A;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
  transform: scale(1.1);
}

.whatsapp-button i {
  font-size: 32px;
}

/* Pulso animado */
.whatsapp-pulse {
  position: absolute;
  width: 65px;
  height: 65px;
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.4);
  animation: pulse-animation 2s infinite;
}

@keyframes pulse-animation {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

/* Tooltip */
.whatsapp-tooltip {
  position: absolute;
  right: 80px;
  top: 50%;
  transform: translateY(-50%);
  background: #25D366;
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 1;
  visibility: visible;
  transition: all 0.3s ease;
}

.whatsapp-tooltip::after {
  content: '';
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  border-left: 8px solid #25D366;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
}

.whatsapp-float:hover .whatsapp-tooltip {
  right: 85px;
}

/* Badge de notificación */
.whatsapp-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ff3b30;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  border: 2px solid white;
  animation: badge-bounce 2s infinite;
}

@keyframes badge-bounce {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}

/* Versión móvil */
@media (max-width: 768px) {
  .whatsapp-float {
    bottom: 20px;
    right: 20px;
  }

  .whatsapp-button {
    width: 60px;
    height: 60px;
  }

  .whatsapp-button i {
    font-size: 28px;
  }

  .whatsapp-pulse {
    width: 60px;
    height: 60px;
  }

  .whatsapp-tooltip {
    display: none;
  }
}

/* Botones CTA inline */
.whatsapp-cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #25D366;
  color: white;
  padding: 16px 32px;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
  border: none;
  cursor: pointer;
}

.whatsapp-cta-button:hover {
  background: #20BA5A;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
  color: white;
}

.whatsapp-cta-button i {
  font-size: 22px;
  margin-right: 12px;
}

/* Variante secundaria */
.whatsapp-cta-secondary {
  background: white;
  color: #25D366;
  border: 2px solid #25D366;
}

.whatsapp-cta-secondary:hover {
  background: #25D366;
  color: white;
  border-color: #20BA5A;
}

/* Versión pequeña para footer/sidebar */
.whatsapp-cta-small {
  padding: 12px 24px;
  font-size: 16px;
}

.whatsapp-cta-small i {
  font-size: 18px;
  margin-right: 8px;
}

/* Animación de entrada para CTAs */
@keyframes slideInFromRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-slide-in {
  animation: slideInFromRight 0.6s ease-out;
}
