/* Floating WhatsApp (includes/whatsapp-float.html via main.js) */
.wa-float {
  position: fixed;
  right: calc(20px + env(safe-area-inset-right));
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 981;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s, opacity 0.2s;
  text-decoration: none;
}
.wa-float,
.wa-float:hover,
.wa-float:focus-visible,
.wa-float:visited {
  color: #fff !important;
  text-decoration: none !important;
}
.wa-float:hover,
.wa-float:focus-visible {
  background: #1ebe5b;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
}
.wa-float:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}
.wa-float::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #25d366;
  opacity: 0.45;
  z-index: -1;
  animation: wa-pulse 2.4s ease-out infinite;
}
@keyframes wa-pulse {
  0% {
    transform: scale(1);
    opacity: 0.45;
  }
  70%,
  100% {
    transform: scale(1.55);
    opacity: 0;
  }
}
.wa-float svg {
  display: block;
  fill: #fff !important;
}
.wa-tip {
  position: absolute;
  right: 70px;
  top: 50%;
  transform: translateY(-50%);
  background: #1b2440;
  color: #fff !important;
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  padding: 8px 12px;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
.wa-float:hover .wa-tip,
.wa-float:focus-visible .wa-tip {
  opacity: 1;
}

/* Stack above n8n chat toggle (see css/chatbot.css) */
body.lb-site-chat .wa-float {
  bottom: calc(86px + env(safe-area-inset-bottom, 0px));
  right: calc(24px + env(safe-area-inset-right, 0px));
}
body.lb-site-chat.lb-sticky-cta-visible .wa-float,
body.lb-site-chat:has(main.tms-svc .sticky-cta.is-visible) .wa-float {
  bottom: calc(var(--lb-sticky-cta-offset, 72px) + 78px + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 768px) {
  body.lb-site-chat .wa-float {
    bottom: calc(74px + env(safe-area-inset-bottom, 0px));
    right: calc(16px + env(safe-area-inset-right, 0px));
  }
}

@media (max-width: 600px) {
  .wa-float {
    right: calc(14px + env(safe-area-inset-right));
    bottom: calc(14px + env(safe-area-inset-bottom));
    width: 54px;
    height: 54px;
  }
  .wa-tip {
    display: none;
  }
  body.lb-site-chat .wa-float {
    bottom: calc(70px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-height: 420px) {
  .wa-float {
    width: 46px;
    height: 46px;
  }
  .wa-float svg {
    width: 24px;
    height: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wa-float::before {
    animation: none;
    display: none;
  }
  .wa-float {
    transition: none;
  }
}

body:has(.mobile-menu.active) .wa-float,
body:has(.mobile-menu-overlay.active) .wa-float {
  opacity: 0;
  pointer-events: none;
}

@media print {
  .wa-float {
    display: none;
  }
}