/**
 * Floating WhatsApp Button
 * ========================
 * 
 * CUSTOMIZATION:
 * - Change phone number in site_footer.php
 * - Adjust position with bottom/right values
 * - Change colors with --wa-green variable
 */

:root {
  --wa-green: #25D366;
  --wa-dark: #128C7E;
  --wa-light: #DCF8C6;
}

/* Main floating button */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9990;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

/* The button itself */
.whatsapp-float-btn {
  width: 60px;
  height: 60px;
  background: var(--wa-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 4px 12px rgba(37, 211, 102, 0.4),
    0 2px 4px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-decoration: none;
  border: none;
  outline: none;
}

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

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

/* WhatsApp icon */
.whatsapp-float-btn svg {
  width: 32px;
  height: 32px;
  fill: white;
}

/* Pulse animation */
.whatsapp-float-btn::before {
  content: '';
  position: absolute;
  width: 60px;
  height: 60px;
  background: var(--wa-green);
  border-radius: 50%;
  animation: waPulse 2s ease-out infinite;
  z-index: -1;
}

@keyframes waPulse {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

/* Tooltip / Label */
.whatsapp-float-label {
  background: #1a1a1a;
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateX(20px);
  transition: all 0.3s ease;
  pointer-events: none;
}

.whatsapp-float:hover .whatsapp-float-label {
  opacity: 1;
  transform: translateX(0);
}

/* Mobile adjustments */
@media (max-width: 640px) {
  .whatsapp-float {
    bottom: 16px;
    right: 16px;
  }
  
  .whatsapp-float-btn {
    width: 54px;
    height: 54px;
  }
  
  .whatsapp-float-btn::before {
    width: 54px;
    height: 54px;
  }
  
  .whatsapp-float-btn svg {
    width: 28px;
    height: 28px;
  }
  
  .whatsapp-float-label {
    display: none;
  }
}

/* Hide when scrolled to top (optional) */
.whatsapp-float.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
}

