.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;
  overflow: visible;
  isolation: isolate;
}

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

.fab-pulse {
  position: absolute;
  inset: 10px;
  z-index: 0;
  border-radius: 999px;
  background: #22c55e;
  pointer-events: none;
  animation: finance-whatsapp-pulse 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
  will-change: transform, opacity;
}

.fab-surface {
  position: relative;
  z-index: 1;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: #25d366;
  box-shadow: 0 18px 34px rgba(4, 37, 24, 0.28);
  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 {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 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-pulse {
  0% { transform: scale(0.92); opacity: 0.72; }
  75%, 100% { transform: scale(1.75); opacity: 0; }
}

@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-pulse {
    animation: none;
    opacity: 0;
  }

  .fab-surface {
    transition: none;
  }

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