/* Floating WhatsApp enquiry link. Served from /css/whatsapp-float.css on every page.
   Self-contained and namespaced (.su-wa*) so it cannot clash with the legacy style.css or the Tailwind site.css.
   No inline styles, scripts, fonts or external requests (DG pages run under style-src 'self'). */
.su-wa {
  position: fixed;
  right: 16px;
  bottom: 16px;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 30; /* below both sticky headers (z 40 / 1000) and above page content; modal dialogs use the top layer */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  box-sizing: border-box;
  min-width: 52px;
  height: 52px;
  padding: 0 12px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #128c7e; /* white glyph = 4.0:1, above the 3:1 non-text minimum */
  color: #fff;
  font: 600 14px/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(11, 35, 65, 0.28), 0 1px 3px rgba(11, 35, 65, 0.18);
  -webkit-tap-highlight-color: transparent;
}
.su-wa__icon { display: block; width: 28px; height: 28px; flex: none; }
.su-wa__label { display: none; max-width: 0; overflow: hidden; white-space: nowrap; opacity: 0; }

.su-wa:hover { background: #0e7266; }
.su-wa:focus-visible { outline: 3px solid #0b2341; outline-offset: 3px; }
.su-wa:active { background: #0b5f55; }

@media (min-width: 1024px) {
  .su-wa { min-width: 56px; height: 56px; padding: 0 13px; }
  .su-wa__label { display: block; }
  .su-wa:hover .su-wa__label,
  .su-wa:focus-visible .su-wa__label { max-width: 160px; margin-left: 10px; opacity: 1; }
}

@media (prefers-reduced-motion: no-preference) {
  .su-wa { transition: background-color .15s ease, box-shadow .15s ease, transform .15s ease; }
  .su-wa:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(11, 35, 65, 0.32), 0 2px 4px rgba(11, 35, 65, 0.18); }
  .su-wa__label { transition: max-width .2s ease, opacity .2s ease, margin-left .2s ease; }
}

/* Keep the page's own controls clear of the icon. */
/* 1. Room under the footer so the last line of text is never covered when scrolled to the end. */
@media (max-width: 1023.98px) {
  body > footer::after { content: ""; display: block; height: calc(84px + env(safe-area-inset-bottom)); }
}
/* 2a. Narrow screens: whatsapp-float.js adds .su-wa--away while any form is on screen, so the link never covers a field or select arrow. */
@media (max-width: 1023.98px) { .su-wa--away { opacity: 0; pointer-events: none; visibility: hidden; } }
/* 2b. Step aside while someone is typing in a form (mobile keyboard / submit button) or the mobile menu is open. */
body:has(input:focus, select:focus, textarea:focus) .su-wa,
body:has(#mobile-menu:not([hidden])) .su-wa { opacity: 0; pointer-events: none; visibility: hidden; }

@media (forced-colors: active) { .su-wa { border-color: ButtonText; forced-color-adjust: auto; } }
@media print { .su-wa { display: none; } }
