﻿.whatsapp-fab {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 20;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: #ffffff;
  box-shadow: 0 0 0 1px var(--border-subtle);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease,
    visibility 0.2s;
}

.whatsapp-fab:focus-visible {
  outline: 2px solid var(--content-primary);
  outline-offset: 3px;
}

.whatsapp-fab:active {
  transform: scale(0.94);
}

.whatsapp-fab-icon {
  display: block;
  width: 22px;
  height: 22px;
}

/* On pages with a hero, stay hidden until the hero has scrolled out of view. */
body:has(.hero) .whatsapp-fab:not(.is-visible) {
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
  .whatsapp-fab:hover {
    transform: scale(1.06);
  }
}

@media (min-width: 768px) {
  .whatsapp-fab {
    right: 24px;
    bottom: 24px;
  }
}

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