/* Botón flotante de WhatsApp - Rockwell */

.whatsapp-float {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4), 0 2px 4px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  animation: whatsapp-pulse 2s ease-in-out infinite;
}

.whatsapp-float:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5), 0 4px 8px rgba(0, 0, 0, 0.3);
}

.whatsapp-float:active {
  transform: scale(0.95);
}

.whatsapp-float svg {
  width: 32px;
  height: 32px;
  fill: #ffffff;
  transition: transform 0.3s ease;
}

.whatsapp-float:hover svg {
  transform: scale(1.1);
}

/* Tooltip al hacer hover */
.whatsapp-float::before {
  content: "¿Necesitas ayuda? Escríbenos";
  position: absolute;
  right: 70px;
  background: #ffffff;
  color: #128c7e;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

.whatsapp-float::after {
  content: "";
  position: absolute;
  right: 60px;
  border: 6px solid transparent;
  border-left-color: #ffffff;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.whatsapp-float:hover::before,
.whatsapp-float:hover::after {
  opacity: 1;
  visibility: visible;
}

/* Animación de pulso sutil */
@keyframes whatsapp-pulse {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4), 0 2px 4px rgba(0, 0, 0, 0.2);
  }
  50% {
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4), 0 2px 4px rgba(0, 0, 0, 0.2), 0 0 0 10px rgba(37, 211, 102, 0.1);
  }
}

/* Badge de notificación (opcional - para mostrar "nuevo mensaje") */
.whatsapp-float .notification-badge {
  position: absolute;
  top: 0;
  right: 0;
  width: 20px;
  height: 20px;
  background: #ff3b30;
  border-radius: 50%;
  border: 2px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  animation: badge-bounce 0.5s ease;
}

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

/* Responsive */
@media (max-width: 768px) {
  .whatsapp-float {
    width: 56px;
    height: 56px;
    bottom: 20px;
    right: 20px;
  }

  .whatsapp-float svg {
    width: 28px;
    height: 28px;
  }

  /* En móvil, no mostrar el tooltip para evitar problemas de espacio */
  .whatsapp-float::before,
  .whatsapp-float::after {
    display: none;
  }
}

@media (max-width: 480px) {
  .whatsapp-float {
    width: 52px;
    height: 52px;
    bottom: 16px;
    right: 16px;
  }

  .whatsapp-float svg {
    width: 26px;
    height: 26px;
  }
}

/* Asegurar que el botón esté por encima de otros elementos */
.whatsapp-float {
  isolation: isolate;
}
