/***

==================================================================
	WhatsApp Floating Button
==================================================================

***/
.wa-float {
  position: fixed;
  right: 30px;
  bottom: 30px;
  z-index: 9998;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2fe377 0%, #25d366 45%, #128c7e 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(18, 140, 126, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
}
.wa-float svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
  position: relative;
  z-index: 1;
}
.wa-float::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background-color: #25d366;
  z-index: 0;
  animation: wa-float-pulse 2.2s ease-out infinite;
}
.wa-float:hover,
.wa-float:focus-visible {
  color: #ffffff;
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 16px 32px rgba(18, 140, 126, 0.5);
}
.wa-float:focus-visible {
  outline: 3px solid rgba(37, 211, 102, 0.5);
  outline-offset: 4px;
}

/* Tooltip */
.wa-float-label {
  position: absolute;
  right: calc(100% + 14px);
  top: 50%;
  transform: translate(8px, -50%);
  background-color: #ffffff;
  color: #1f2c34;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(1, 20, 37, 0.18);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.3s ease;
}
.wa-float:hover .wa-float-label,
.wa-float:focus-visible .wa-float-label {
  opacity: 1;
  visibility: visible;
  transform: translate(0, -50%);
}

@keyframes wa-float-pulse {
  0% { transform: scale(1); opacity: 0.55; }
  80%, 100% { transform: scale(1.6); opacity: 0; }
}

/* Stack above the AI chat widget when present */
body:has(.ai-chat-widget) .wa-float {
  bottom: 108px;
}

/* Keep the scroll-to-top button above the WhatsApp button */
body:has(.wa-float) .scroll-to-top {
  right: 40px;
  bottom: 104px;
}
body:has(.wa-float):has(.ai-chat-widget) .scroll-to-top {
  bottom: 182px;
}

@media (max-width: 480px) {
  .wa-float {
    right: 16px;
    bottom: 16px;
    width: 54px;
    height: 54px;
  }
  .wa-float svg {
    width: 28px;
    height: 28px;
  }
  .wa-float-label {
    display: none;
  }
  body:has(.ai-chat-widget) .wa-float {
    bottom: 92px;
  }
  body:has(.wa-float) .scroll-to-top {
    right: 23px;
    bottom: 84px;
  }
  body:has(.wa-float):has(.ai-chat-widget) .scroll-to-top {
    bottom: 160px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wa-float::before {
    animation: none;
  }
  .wa-float,
  .wa-float-label {
    transition: none;
  }
}
