/* WhatsApp Business Floating Button */

.whatsapp-float {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 40px;
  right: 40px;
  background-color: #25d366;
  color: #FFF;
  border-radius: 50px;
  text-align: center;
  font-size: 30px;
  box-shadow: 2px 2px 3px #999;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  text-decoration: none;
  animation: pulse 2s infinite;
}

.whatsapp-float:hover {
  background-color: #128C7E;
  color: #FFF;
  transform: scale(1.1);
  box-shadow: 4px 4px 8px #666;
  text-decoration: none;
  animation: none;
}

.whatsapp-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

/* Animación de pulso sutil */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

/* Tooltip opcional al hacer hover */
.whatsapp-float::before {
  content: "¿Hablamos por WhatsApp?";
  position: absolute;
  right: 70px;
  top: 50%;
  transform: translateY(-50%);
  background-color: #fff;
  color: #333;
  padding: 8px 15px;
  border-radius: 8px;
  white-space: nowrap;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  font-size: 14px;
  font-weight: 500;
}

.whatsapp-float:hover::before {
  opacity: 1;
  visibility: visible;
}

/* Flecha del tooltip */
.whatsapp-float::after {
  content: "";
  position: absolute;
  right: 60px;
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-left-color: #fff;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.whatsapp-float:hover::after {
  opacity: 1;
  visibility: visible;
}

/* Responsive para móviles */
@media screen and (max-width: 767px) {
  .whatsapp-float {
    width: 50px;
    height: 50px;
    bottom: 20px;
    right: 20px;
    font-size: 25px;
  }

  /* Ocultar tooltip en móvil */
  .whatsapp-float::before,
  .whatsapp-float::after {
    display: none;
  }
}

/* Responsive para tablets */
@media screen and (min-width: 768px) and (max-width: 1024px) {
  .whatsapp-float {
    width: 55px;
    height: 55px;
    bottom: 30px;
    right: 30px;
    font-size: 28px;
  }
}

/* Asegurar que no interfiera con el scroll en laptop pequeño */
@media screen and (max-height: 768px) {
  .whatsapp-float {
    bottom: 20px;
    right: 20px;
  }
}
