/* The centered mobile button overlaps the white contact bar, as in the reference. */
.whatsapp-float {
  position: fixed;
  z-index: 181;
  right: max(24px, env(safe-area-inset-right));
  bottom: calc(24px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #2cc6b5;
  color: #fff;
  text-decoration: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .2s ease;
}

.whatsapp-float svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.whatsapp-float:focus-visible {
  outline: 3px solid #1a2d42;
  outline-offset: 4px;
  border-radius: 50%;
}

.menu-open .whatsapp-float,
.lightbox-open .whatsapp-float,
.is-form-editing .whatsapp-float {
  visibility: hidden;
  pointer-events: none;
}

/* Leave room for the floating control at the end of every page. */
html { scroll-padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
body { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }

@media (max-width: 700px) {
  .whatsapp-float {
    right: auto;
    left: 50%;
    margin-left: -28px;
  }
}

@media (hover: hover) {
  .whatsapp-float:hover { background: #23b3a3; }
}

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

@media print {
  .whatsapp-float, .mobile-actions { display: none !important; }
  body { padding-bottom: 0; }
}
