/* Botón flotante de WhatsApp */
.whatsapp-float {
  position: fixed;
  bottom: 80px; /* Posicionado por debajo del banner de cookies */
  right: 25px; /* Un poco más a la izquierda */
  z-index: 9998; /* Por debajo del banner de cookies (9999) */
  font-family: 'Roboto', sans-serif;
}

.whatsapp-button {
  width: 60px;
  height: 60px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  position: relative;
  overflow: hidden;
}

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

.whatsapp-button i {
  color: white;
  font-size: 28px;
  transition: transform 0.3s ease;
}

.whatsapp-button:hover i {
  transform: rotate(10deg);
}

/* Menú desplegable */
.whatsapp-menu {
  position: absolute;
  bottom: 70px;
  right: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  padding: 8px 0;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  border: 1px solid #e0e0e0;
}

.whatsapp-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.whatsapp-menu-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  text-decoration: none;
  color: #333;
  transition: background-color 0.2s ease;
  border: none;
  background: none;
  width: 100%;
  cursor: pointer;
  font-size: 14px;
}

.whatsapp-menu-item:hover {
  background-color: #f5f5f5;
}

.whatsapp-menu-item i {
  margin-right: 12px;
  font-size: 18px;
  width: 20px;
  text-align: center;
}

.whatsapp-menu-item.group i {
  color: #25D366;
}

.whatsapp-menu-item.chat i {
  color: #128C7E;
}

.whatsapp-menu-item .text {
  flex: 1;
}

.whatsapp-menu-item .subtitle {
  font-size: 12px;
  color: #666;
  margin-top: 2px;
}

/* Separador */
.whatsapp-separator {
  height: 1px;
  background: #e0e0e0;
  margin: 4px 0;
}

/* Animación de pulso */
@keyframes whatsapp-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

.whatsapp-button.pulse {
  animation: whatsapp-pulse 2s infinite;
}

/* Responsive */
@media (max-width: 768px) {
  .whatsapp-float {
    bottom: 40px; /* Más alto en móviles */
    right: 15px; /* Más a la izquierda */
  }
  
  .whatsapp-button {
    width: 55px;
    height: 55px;
  }
  
  .whatsapp-button i {
    font-size: 24px;
  }
  
  .whatsapp-menu {
    min-width: 180px;
    bottom: 65px;
  }
  
  .whatsapp-menu-item {
    padding: 10px 14px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .whatsapp-float {
    bottom: 40px; /* Más alto en móviles pequeños */
    right: 15px; /* Más a la izquierda */
  }
  
  .whatsapp-button {
    width: 50px;
    height: 50px;
  }
  
  .whatsapp-button i {
    font-size: 22px;
  }
  
  .whatsapp-menu {
    min-width: 160px;
    bottom: 60px;
  }
}

/* Accesibilidad */
.whatsapp-button:focus {
  outline: 2px solid #25D366;
  outline-offset: 2px;
}

.whatsapp-menu-item:focus {
  outline: 2px solid #25D366;
  outline-offset: -2px;
}

/* Modo oscuro (si se implementa en el futuro) */
@media (prefers-color-scheme: dark) {
  .whatsapp-menu {
    background: #2d2d2d;
    border-color: #404040;
  }
  
  .whatsapp-menu-item {
    color: #e0e0e0;
  }
  
  .whatsapp-menu-item:hover {
    background-color: #404040;
  }
  
  .whatsapp-menu-item .subtitle {
    color: #999;
  }
  
  .whatsapp-separator {
    background: #404040;
  }
}
