/* WhatsApp Floating Button */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  left: 30px;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  transform: translateY(100px) scale(0.8);
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  pointer-events: none;
}

.whatsapp-float.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

.whatsapp-button {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: white;
  padding: 0.75rem 1.25rem;
  border-radius: 50px;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.whatsapp-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.whatsapp-button:hover::before {
  width: 300px;
  height: 300px;
}

.whatsapp-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
}

.whatsapp-icon-wrapper {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse-ring 2s ease-out infinite;
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.95);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(0.95);
  }
}

.whatsapp-icon {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.whatsapp-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  position: relative;
  z-index: 1;
}

.whatsapp-chat-text {
  font-size: 0.85rem;
  font-weight: 400;
  opacity: 0.95;
}

.whatsapp-office {
  font-size: 1rem;
  font-weight: 600;
}

.whatsapp-close {
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.85rem;
  backdrop-filter: blur(10px);
}

.whatsapp-close:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: rotate(90deg);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .whatsapp-float {
    bottom: 20px;
    left: 20px;
  }
  
  .whatsapp-button {
    padding: 0.65rem 1rem;
  }
  
  .whatsapp-text {
    display: none;
  }
  
  .whatsapp-icon-wrapper {
    width: 40px;
    height: 40px;
  }
  
  .whatsapp-icon {
    width: 32px;
    height: 32px;
  }
  
  .whatsapp-close {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
  }
}

/* Small mobile screens */
@media (max-width: 480px) {
  .whatsapp-float {
    bottom: 15px;
    left: 15px;
  }
  
  .whatsapp-button {
    padding: 0.6rem 0.8rem;
  }
}

/* Avoid overlap with other floating elements */
body.chatbot-open .whatsapp-float {
  bottom: 90px;
}

/* Print - hide WhatsApp button */
@media print {
  .whatsapp-float {
    display: none !important;
  }
}

/* Accessibility - high contrast mode */
@media (prefers-contrast: high) {
  .whatsapp-button {
    border: 2px solid white;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .whatsapp-float,
  .whatsapp-button,
  .whatsapp-icon-wrapper,
  .whatsapp-close {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}

