/* Floating WhatsApp button, shared by every page.
   Physical bottom-right on purpose (site is RTL; the a11y toggle on the homepage owns bottom-left).
   --cookie-h is set by /assets/wa-button.js while the cookie banner is showing. */
.whatsapp-float {
  --wa-shadow: 0 4px 12px rgba(16, 24, 40, 0.18), 0 1px 3px rgba(16, 24, 40, 0.12);
  position: fixed;
  right: 16px;
  right: calc(16px + env(safe-area-inset-right, 0px));
  left: auto;
  top: auto;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px) + var(--cookie-h, 0px));
  z-index: var(--z-float, 9000);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-sizing: border-box;
  width: auto;
  height: 56px;
  min-width: 56px;
  padding: 0 22px 0 18px;
  margin: 0;
  border-radius: 999px;
  background: #25D366;
  color: #fff;
  font-family: 'Heebo', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: var(--wa-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  animation: none;
  -webkit-tap-highlight-color: transparent;
}

.whatsapp-float svg {
  flex: none;
  width: 28px;
  height: 28px;
}

.whatsapp-float .wa-label { color: #073b1c; }

.whatsapp-float:hover {
  background: #22c35e;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(16, 24, 40, 0.22), 0 2px 6px rgba(16, 24, 40, 0.14);
}

.whatsapp-float:active { transform: translateY(0) scale(0.97); }

.whatsapp-float:focus-visible {
  outline: 3px solid #1a0e2e;
  outline-offset: 3px;
  box-shadow: var(--wa-shadow), 0 0 0 3px #fff;
}

/* keep the homepage a11y panel (full width on mobile) unobstructed */
body:has(.a11y-panel.open) .whatsapp-float { visibility: hidden; }

/* room at the very end of the page so the button never sits on the last footer line */
footer::after {
  content: "";
  display: block;
  height: calc(72px + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 767px) {
  .whatsapp-float { width: 56px; padding: 0; }
  .whatsapp-float .wa-label { display: none; }
}

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

@media print {
  .whatsapp-float { display: none !important; }
  footer::after { display: none; }
}
