/**
 * WhatsApp Floating Action Button Styles
 * Animated FAB with tooltip
 */

.whatsapp-fab-container {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 9998;
  opacity: 0;
  transform: translate(-120px, 120px) scale(0.5);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.whatsapp-fab-container.whatsapp-fab-enter {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}

/* FAB Button */
.whatsapp-fab-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: white;
  border-radius: 50%;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  position: relative;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  gap: 0;
}

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

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

/* FAB Icon (Font Awesome WhatsApp brand icon) */
.whatsapp-fab-icon {
  font-size: 32px;
  line-height: 1;
  color: white;
}

/* FAB Badge */
.whatsapp-fab-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ef4444;
  color: white;
  border-radius: 12px;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  border: 2px solid white;
  animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
  }
}

/* Tooltip */
.whatsapp-fab-tooltip {
  position: absolute;
  bottom: 80px;
  left: 0;
  background: white;
  border-radius: 12px;
  padding: 16px;
  width: 280px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  border: 1px solid #f0f0f0;
  z-index: -1;
}

.whatsapp-fab-container.whatsapp-fab-show-tooltip .whatsapp-fab-tooltip {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  z-index: 1;
}

/* Tooltip Title */
.whatsapp-fab-title {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 700;
  color: #25d366;
  line-height: 1.3;
}

/* Tooltip Description */
.whatsapp-fab-description {
  margin: 0 0 12px 0;
  font-size: 13px;
  color: #666;
  line-height: 1.4;
}

/* Tooltip CTA Button */
.whatsapp-fab-cta {
  display: block;
  text-align: center;
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: white;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.whatsapp-fab-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

.whatsapp-fab-cta:active {
  transform: translateY(0);
}

/* Tooltip Arrow */
.whatsapp-fab-tooltip::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 16px;
  width: 0;
  height: 0;
  border-left: 0 solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid white;
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .whatsapp-fab-button {
    width: 56px;
    height: 56px;
  }

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

  .whatsapp-fab-tooltip {
    width: 260px;
    bottom: 75px;
  }

  .whatsapp-fab-container {
    bottom: 16px;
    left: 16px;
  }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .whatsapp-fab-container {
    bottom: 10px;
    left: 10px;
  }

  .whatsapp-fab-button {
    width: 48px;
    height: 48px;
  }

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

  .whatsapp-fab-tooltip {
    display: none;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .whatsapp-fab-tooltip {
    background: #1f1f1f;
    border-color: #333;
  }

  .whatsapp-fab-tooltip::after {
    border-top-color: #1f1f1f;
  }

  .whatsapp-fab-description {
    color: #999;
  }
}

/* Accessibility */
.whatsapp-fab-button:focus {
  outline: 2px solid #25d366;
  outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .whatsapp-fab-container,
  .whatsapp-fab-button,
  .whatsapp-fab-tooltip,
  .whatsapp-fab-cta {
    transition: none;
    animation: none;
  }

  .whatsapp-fab-container {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
}

/* Avoid clash with back-to-top buttons (typically bottom-right) */
.back-to-top,
#back-to-top,
.scroll-to-top {
  /* Reserve space for back-to-top on the right */
}

