/* Botón flotante de WhatsApp */
.whatsapp-float {
  position: fixed;
  bottom: 110px;
  right: 38px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 15px;
  animation: slideIn 0.5s ease-out;
  font-family: 'Poppins', sans-serif;
}

@keyframes slideIn {
  from {
    transform: translateX(100px);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Botón circular de WhatsApp */
.whatsapp-button {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 32px;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  text-decoration: none;
}

.whatsapp-button:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
  color: white;
}

/* Efecto de pulso */
.whatsapp-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.4);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }

  100% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0;
  }
}

/* Mensaje emergente */
.whatsapp-message {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  padding: 16px 24px;
  border-radius: 20px;
  box-shadow:
    0 5px 14px rgba(0, 0, 0, 0.14),
    0 10px 24px rgba(0, 0, 0, 0.08);
  max-width: 280px;
  position: relative;
  animation: bounceIn 0.6s ease-out;
  border: 2px solid rgba(37, 211, 102, 0.2);
}

@keyframes bounceIn {
  0% {
    transform: scale(0.3) translateX(20px);
    opacity: 0;
  }

  50% {
    transform: scale(1.05) translateX(0);
  }

  100% {
    transform: scale(1) translateX(0);
    opacity: 1;
  }
}

.whatsapp-message::after {
  content: '';
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 10px solid #ffffff;
}

.whatsapp-message-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  color: #6c757d;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  line-height: 1;
  transition: color 0.2s;
}

.whatsapp-message-close:hover {
  color: #343a40;
}

.whatsapp-message-title {
  font-weight: 700;
  color: #128C7E;
  font-size: 16px;
  margin-bottom: 6px;
  padding-right: 20px;
}

.whatsapp-message-text {
  color: #495057;
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

.whatsapp-message-cta {
  color: #25D366;
  font-weight: 600;
  font-size: 13px;
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.whatsapp-message.hidden {
  display: none;
}

/* Animación de aparición del mensaje */
.whatsapp-message.show {
  animation: bounceIn 0.6s ease-out;
}

/* Responsivo */
@media (max-width: 768px) {
  .whatsapp-float {
    bottom: 110px;
    right: 38px;
  }

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

  .whatsapp-message {
    max-width: 220px;
    padding: 14px 20px;
    font-size: 13px;
  }

  .whatsapp-message-title {
    font-size: 14px;
  }

  .whatsapp-message-text {
    font-size: 12px;
  }
}