/* WhatsApp Floating Button Styles */

.whatsapp-button {
  position: fixed;
  right: 30px;
  bottom: 30px; /* Standard bottom-right corner position */
  width: 55px;
  height: 55px;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.8) translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: visible;
}

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

.whatsapp-button:hover {
  background: linear-gradient(135deg, #128C7E 0%, #25D366 100%);
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

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

/* WhatsApp Icon */
.whatsapp-icon {
  color: white;
  width: 28px;
  height: 28px;
  z-index: 2;
  position: relative;
}

/* Tooltip */
.whatsapp-tooltip {
  position: absolute;
  right: 70px;
  top: 50%;
  transform: translateY(-50%);
  background: #333;
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

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

.whatsapp-button:hover .whatsapp-tooltip {
  opacity: 1;
  visibility: visible;
  right: 75px;
}

/* Pulse Animation */
.pulse-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid #25D366;
  opacity: 0;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  pointer-events: none;
}

.pulse-ring:nth-child(3) {
  animation-delay: 0.5s;
}

.pulse-ring:nth-child(4) {
  animation-delay: 1s;
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
  .whatsapp-button {
    right: 15px;
    bottom: 20px;
    width: 50px;
    height: 50px;
  }

  .whatsapp-icon {
    width: 24px;
    height: 24px;
  }

  .whatsapp-tooltip {
    display: none; /* Hide tooltip on mobile */
  }

  .pulse-ring {
    animation: none; /* Disable pulse on mobile for performance */
  }
}

/* Dark mode support */
body.dark .whatsapp-button {
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.5);
}

body.dark .whatsapp-button:hover {
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.6);
}

/* Accessibility - Focus styles */
.whatsapp-button:focus {
  outline: 2px solid #25D366;
  outline-offset: 3px;
}

.whatsapp-button:focus:not(:focus-visible) {
  outline: none;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .whatsapp-button {
    transition: opacity 0.3s ease;
  }

  .whatsapp-button:hover {
    transform: scale(1);
  }

  .pulse-ring {
    animation: none;
  }
}

/* Print styles - hide button when printing */
@media print {
  .whatsapp-button {
    display: none;
  }
}