/* Botón Flotante con Efecto de Onda Expansiva */
.floating-button {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
  overflow: hidden;
  user-select: none;
}

.floating-button:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 35px rgba(102, 126, 234, 0.6);
}

.floating-button:active {
  transform: scale(0.95);
}

/* Icono del botón */
.floating-button-icon {
  color: white;
  font-size: 24px;
  transition: all 0.3s ease;
  z-index: 2;
  position: relative;
}

.floating-button:hover .floating-button-icon {
  transform: rotate(360deg);
}

/* Efecto de onda expansiva */
.floating-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.6s ease;
  z-index: 1;
}

.floating-button:hover::before {
  width: 300px;
  height: 300px;
  opacity: 0;
}

/* Ondas concéntricas */
.floating-button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border: 2px solid rgba(102, 126, 234, 0.6);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: ripple 2s infinite;
}

/* Animación de ondas */
@keyframes ripple {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  70% {
    transform: translate(-50%, -50%) scale(2);
    opacity: 0.5;
  }
  100% {
    transform: translate(-50%, -50%) scale(2.5);
    opacity: 0;
  }
}

/* Efecto de pulso continuo */
.floating-button.pulse {
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
  }
  50% {
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.8),
                0 0 0 10px rgba(102, 126, 234, 0.1),
                0 0 0 20px rgba(102, 126, 234, 0.05);
  }
  100% {
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
  }
}

/* Animación de entrada */
.floating-button.animate-in {
  animation: slideInUp 0.5s ease-out;
}

@keyframes slideInUp {
  0% {
    transform: translateY(100px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Efecto click - Explosión de ondas */
.floating-button.clicked::before {
  width: 400px;
  height: 400px;
  background: rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
}

/* Tooltip */
.floating-button-tooltip {
  position: absolute;
  right: 85px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 14px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  pointer-events: none;
}

.floating-button-tooltip::after {
  content: '';
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-left-color: rgba(0, 0, 0, 0.8);
}

.floating-button:hover .floating-button-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(-10px);
}

/* Variantes de color */
.floating-button.whatsapp {
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}

.floating-button.whatsapp:hover {
  box-shadow: 0 12px 35px rgba(37, 211, 102, 0.6);
}

.floating-button.whatsapp::after {
  border-color: rgba(37, 211, 102, 0.6);
}

.floating-button.whatsapp.pulse {
  animation: pulseWhatsapp 1.5s infinite;
}

@keyframes pulseWhatsapp {
  0% {
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
  }
  50% {
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.8),
                0 0 0 10px rgba(37, 211, 102, 0.1),
                0 0 0 20px rgba(37, 211, 102, 0.05);
  }
  100% {
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .floating-button {
    width: 60px;
    height: 60px;
    bottom: 20px;
    right: 20px;
  }
  
  .floating-button-icon {
    font-size: 20px;
  }
  
  .floating-button-tooltip {
    display: none;
  }
}

/* Efecto para múltiples botones */
.floating-buttons-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
}

.floating-buttons-container .floating-button {
  position: relative;
  bottom: auto;
  right: auto;
  margin-bottom: 15px;
  display: block;
}

.floating-buttons-container .floating-button:last-child {
  margin-bottom: 0;
}