.topbar {
  position: sticky;
  top: 0;
  z-index: 110;
}

.site-header {
  top: 36px;
}

.whatsapp-float {
  position: fixed;
  right: 24px;
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 180;
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 19px 8px 9px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 999px;
  background: #20bd5a;
  color: white;
  box-shadow: 0 15px 38px rgba(5, 94, 45, .28);
  font-weight: 800;
  line-height: 1;
  isolation: isolate;
  transition: transform .22s ease, background .22s ease, box-shadow .22s ease, opacity .2s ease;
}

.whatsapp-float::before {
  content: "";
  position: absolute;
  inset: -5px;
  z-index: -1;
  border: 2px solid rgba(32, 189, 90, .26);
  border-radius: inherit;
  animation: whatsapp-float-pulse 2.8s ease-out infinite;
}

.whatsapp-float:hover {
  transform: translateY(-3px);
  background: #18a94e;
  box-shadow: 0 19px 44px rgba(5, 94, 45, .34);
}

.whatsapp-float:focus-visible {
  outline: 3px solid white;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(32, 189, 90, .35), 0 19px 44px rgba(5, 94, 45, .34);
}

.whatsapp-float-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
}

.whatsapp-float-icon svg {
  width: 25px;
  height: 25px;
}

.whatsapp-float-label {
  white-space: nowrap;
  font-size: 13px;
}

body.modal-open .whatsapp-float {
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
}

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

@media (max-width: 600px) {
  .site-header {
    top: 38px;
  }

  .whatsapp-float {
    right: 16px;
    bottom: max(16px, env(safe-area-inset-bottom));
    width: 58px;
    min-height: 58px;
    justify-content: center;
    padding: 8px;
  }

  .whatsapp-float-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
}

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