.btn.fab {
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  gap: 0;
  padding: 0;
  color: #fff;
  background: transparent;
  border: 0;
  border-radius: 999px;
  box-shadow: none;
}

.btn.fab:hover,
.btn.fab:focus-visible {
  color: #fff;
  background: transparent;
}

.fab-surface {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  background: #25d366;
  box-shadow:
    0 0 0 10px rgba(7, 82, 45, 0.72),
    0 12px 0 10px rgba(37, 211, 102, 0.16),
    0 18px 34px rgba(4, 37, 24, 0.28);
  animation: finance-whatsapp-attention 6s ease-in-out infinite;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.fab-icon {
  width: 29px;
  height: 29px;
  display: block;
  filter: brightness(0) invert(1);
}

.btn.fab:hover .fab-surface,
.btn.fab:focus-visible .fab-surface {
  animation: none;
  transform: translateY(-3px) scale(1.03);
  box-shadow:
    0 0 0 10px rgba(7, 82, 45, 0.82),
    0 14px 0 10px rgba(37, 211, 102, 0.2),
    0 22px 38px rgba(4, 37, 24, 0.32);
}

.btn.fab:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

.menu-open .btn.fab {
  display: none;
}

@keyframes finance-whatsapp-attention {
  0%, 72%, 88%, 100% { transform: translate3d(0, 0, 0) rotate(0); }
  76% { transform: translate3d(0, -3px, 0) rotate(-2deg); }
  80% { transform: translate3d(0, 0, 0) rotate(0); }
  84% { transform: translate3d(0, -2px, 0) rotate(2deg); }
}

@media (max-width: 767px) {
  .btn.fab {
    right: max(0.75rem, env(safe-area-inset-right));
    bottom: max(0.75rem, env(safe-area-inset-bottom));
    width: 72px;
    height: 72px;
  }

  .fab-surface {
    width: 54px;
    height: 54px;
  }

  .fab-icon {
    width: 27px;
    height: 27px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fab-surface {
    animation: none;
    transition: none;
  }

  .btn.fab:hover .fab-surface,
  .btn.fab:focus-visible .fab-surface {
    transform: none;
  }
}
