/**
 * Floating WhatsApp chat button — fixed bottom-right, always visible.
 */
.nx-wa-float {
  --nx-wa-green: #25d366;
  --nx-wa-green-dark: #128c7e;
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 350;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(145deg, var(--nx-wa-green) 0%, var(--nx-wa-green-dark) 100%);
  border: 2px solid rgba(255, 255, 255, 0.92);
  box-shadow:
    0 10px 28px rgba(18, 140, 126, 0.42),
    0 4px 12px rgba(15, 23, 42, 0.14);
  transition:
    transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1),
    box-shadow 0.28s ease;
  animation: nxWaBob 3.2s ease-in-out infinite;
  -webkit-tap-highlight-color: transparent;
}

.nx-wa-float::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(37, 211, 102, 0.45);
  opacity: 0;
  animation: nxWaRing 2.4s ease-out infinite;
  pointer-events: none;
}

.nx-wa-float svg {
  width: 30px;
  height: 30px;
  display: block;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.12));
}

.nx-wa-float:hover {
  transform: translateY(-6px) scale(1.06);
  box-shadow:
    0 16px 36px rgba(18, 140, 126, 0.52),
    0 8px 20px rgba(15, 23, 42, 0.16);
  animation-play-state: paused;
}

.nx-wa-float:focus-visible {
  outline: 3px solid rgba(37, 211, 102, 0.55);
  outline-offset: 4px;
}

@keyframes nxWaBob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-7px);
  }
}

@keyframes nxWaRing {
  0% {
    transform: scale(0.92);
    opacity: 0.65;
  }
  70%,
  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

@media (max-width: 680px) {
  .nx-wa-float {
    width: 54px;
    height: 54px;
    right: max(16px, env(safe-area-inset-right));
    bottom: max(18px, env(safe-area-inset-bottom));
  }

  .nx-wa-float svg {
    width: 28px;
    height: 28px;
  }
}

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

  .nx-wa-float:hover {
    transform: scale(1.04);
  }
}
