.whatsapp-float {
  position: fixed;
  right: calc(18px + env(safe-area-inset-right, 0px));
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 55;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #4b8b57;
  color: #fff;
  box-shadow: 0 5px 20px #11161d30;
  isolation: isolate;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.whatsapp-float::before {
  content: '';
  position: absolute;
  inset: -3px;
  z-index: -1;
  border: 1px solid #4b8b5780;
  border-radius: inherit;
  background: #4b8b5726;
  pointer-events: none;
  animation: whatsapp-float-pulse 3.6s ease-out infinite;
}

.whatsapp-float img {
  display: block;
  width: 36px;
  height: 36px;
  pointer-events: none;
}

.whatsapp-float:hover { background: #41794c; }

.whatsapp-float:focus-visible {
  outline: 3px solid #18203b;
  outline-offset: 4px;
  box-shadow: 0 0 0 8px #fff;
}

body.menu-open .whatsapp-float,
body:has(dialog[open]) .whatsapp-float,
body:has(#brief-form:focus-within, #investor-request-form:focus-within, #project-guide-form:focus-within, #guide-result:focus-within, #cost-calculator-form:focus-within) .whatsapp-float {
  visibility: hidden;
  pointer-events: none;
}

@keyframes whatsapp-float-pulse {
  0% { transform: scale(1); opacity: .65; }
  65%, 100% { transform: scale(1.45); opacity: 0; }
}

@media (max-width: 760px) {
  .whatsapp-float {
    bottom: calc(6px + env(safe-area-inset-bottom, 0px));
    z-index: 61;
    width: 52px;
    height: 52px;
  }

  .whatsapp-float img { width: 32px; height: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  .whatsapp-float::before { animation: none; opacity: 0; }
}
