/**
 * WhatsApp Floating Button - Cyber Byte Perú
 * Botón flotante de WhatsApp para contacto rápido
 */

/* ============================================
   BOTÓN FLOTANTE WHATSAPP
   ============================================ */

.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 15px;
}

.whatsapp-button {
  width: 60px;
  height: 60px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  text-decoration: none;
  color: white;
  position: relative;
  overflow: hidden;
}

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

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

.whatsapp-button i {
  font-size: 32px;
  z-index: 2;
  position: relative;
}

/* Efecto de pulso */
.whatsapp-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  background: #25D366;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0.8;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0.8;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 0.4;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0;
  }
}

/* Tooltip */
.whatsapp-tooltip {
  position: absolute;
  right: 75px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 10px 15px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-out;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.whatsapp-tooltip::after {
  content: '';
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: 8px solid transparent;
  border-left-color: rgba(0, 0, 0, 0.9);
}

.whatsapp-button:hover .whatsapp-tooltip {
  opacity: 1;
}

/* Badge de notificación (opcional) */
.whatsapp-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 20px;
  height: 20px;
  background: #FF4444;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: white;
  border: 2px solid white;
  box-shadow: 0 2px 8px rgba(255, 68, 68, 0.4);
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1023px) {
  /* Tablet */
  .whatsapp-float {
    bottom: 20px;
    right: 20px;
  }
  
  .whatsapp-button {
    width: 64px;
    height: 64px;
    box-shadow: 
      0 6px 25px rgba(37, 211, 102, 0.5),
      0 0 30px rgba(37, 211, 102, 0.3),
      0 0 0 3px rgba(255, 255, 255, 0.2);
  }
  
  .whatsapp-button i {
    font-size: 34px;
  }
  
  .whatsapp-button::before {
    animation: pulse 2s infinite;
  }
  
  .whatsapp-tooltip {
    display: block;
    right: 80px;
    font-size: 13px;
    padding: 8px 12px;
  }
}

@media (max-width: 767px) {
  /* Mobile */
  .whatsapp-float {
    bottom: 20px;
    right: 20px;
  }
  
  .whatsapp-button {
    width: 64px;
    height: 64px;
    background: #25D366;
    box-shadow: 
      0 8px 30px rgba(37, 211, 102, 0.6),
      0 0 40px rgba(37, 211, 102, 0.4),
      0 0 0 4px rgba(255, 255, 255, 0.3),
      inset 0 2px 10px rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
  }
  
  .whatsapp-button:hover {
    transform: scale(1.15);
    box-shadow: 
      0 10px 40px rgba(37, 211, 102, 0.7),
      0 0 50px rgba(37, 211, 102, 0.5),
      0 0 0 5px rgba(255, 255, 255, 0.4);
  }
  
  .whatsapp-button i {
    font-size: 32px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  }
  
  .whatsapp-button::before {
    animation: pulse 2s infinite;
    background: #25D366;
  }
  
  .whatsapp-tooltip {
    display: none;
  }
  
  .whatsapp-badge {
    width: 22px;
    height: 22px;
    font-size: 11px;
    top: -3px;
    right: -3px;
    border: 3px solid white;
    box-shadow: 0 3px 10px rgba(255, 68, 68, 0.5);
  }
}

@media (max-width: 479px) {
  /* Small Mobile */
  .whatsapp-float {
    bottom: 18px;
    right: 18px;
  }
  
  .whatsapp-button {
    width: 60px;
    height: 60px;
    box-shadow: 
      0 6px 25px rgba(37, 211, 102, 0.6),
      0 0 35px rgba(37, 211, 102, 0.4),
      0 0 0 3px rgba(255, 255, 255, 0.25),
      inset 0 2px 8px rgba(255, 255, 255, 0.15);
  }
  
  .whatsapp-button i {
    font-size: 30px;
  }
  
  .whatsapp-badge {
    width: 20px;
    height: 20px;
    font-size: 10px;
  }
}

/* ============================================
   ANIMACIÓN DE ENTRADA
   ============================================ */

.whatsapp-float {
  animation: slideInUp 0.5s ease-out;
}

@keyframes slideInUp {
  from {
    transform: translateY(100px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Ocultar en impresión */
@media print {
  .whatsapp-float {
    display: none;
  }
}
