/* WhatsApp Widget Styles */
.whatsapp-widget {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
  animation: fadeInUp 0.5s ease-in-out;
}

.whatsapp-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: #25d366;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  transition: all 0.3s ease;
  text-decoration: none;
  position: relative;
  animation: pulse 2s infinite;
}

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

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

.whatsapp-icon {
  width: 32px;
  height: 32px;
  color: white;
}

.whatsapp-tooltip {
  position: absolute;
  right: 70px;
  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;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.whatsapp-tooltip::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 100%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-left-color: #333;
}

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

/* Pulse animation */
@keyframes pulse {
  0% {
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  }
  50% {
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4),
      0 0 0 10px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  }
}

/* Fade in animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .whatsapp-widget {
    bottom: 20px;
    right: 20px;
  }

  .whatsapp-button {
    width: 56px;
    height: 56px;
  }

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

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

  /* Adjust position if demo banner is present */
  body.demo-mode .whatsapp-widget {
    bottom: 80px;
  }
}

/* Extra adjustment for very small screens */
@media (max-width: 480px) {
  .whatsapp-widget {
    bottom: 15px;
    right: 15px;
  }

  .whatsapp-button {
    width: 50px;
    height: 50px;
  }

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

  body.demo-mode .whatsapp-widget {
    bottom: 85px;
  }
}

/* Accessibility - Focus state */
.whatsapp-button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.5),
    0 6px 20px rgba(37, 211, 102, 0.6);
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  .whatsapp-button {
    animation: none;
  }

  .whatsapp-widget {
    animation: none;
  }
}

