.whatsapp-entry {
  position:fixed;
  inset-inline-end:max(22px,env(safe-area-inset-right));
  bottom:calc(22px + env(safe-area-inset-bottom,0px));
  z-index:19;
  display:flex;
  align-items:center;
  justify-content:center;
  width:58px;
  height:58px;
  border-radius:50%;
  background:#25d366;
  color:#fff;
  box-shadow:0 14px 30px -8px rgba(37,211,102,.65);
  text-decoration:none;
  transition:transform .2s ease,box-shadow .2s ease;
}
.whatsapp-entry:hover { transform:scale(1.08); box-shadow:0 18px 36px -8px rgba(37,211,102,.75); }
.whatsapp-entry:focus-visible {
  outline:3px solid #fff;
  outline-offset:3px;
  box-shadow:0 0 0 9px #172c49;
}
/* The tap is answered at once (a phone shows no cursor): the wait for the code and for WhatsApp is visible. */
.whatsapp-entry.is-pressed, .whatsapp-entry[aria-busy="true"] { opacity:.7; transform:scale(.92); }
.whatsapp-entry[aria-busy="true"] { cursor:progress; }
.whatsapp-entry svg { flex:none; }
/* A tap before the script binds would open WhatsApp without a code and leave no record: hold it until the script is ready,
   and give the button back after 4 s even if the script never comes (blocked, no JavaScript). */
.whatsapp-entry[data-whatsapp-wait] { pointer-events:none; animation:whatsapp-entry-ready 0s linear 4s forwards; }
@keyframes whatsapp-entry-ready { to { pointer-events:auto; } }
body:has(.whatsapp-entry) { padding-bottom:calc(88px + env(safe-area-inset-bottom,0px)); }
body:has(.mobile-menu[open]) .whatsapp-entry { visibility:hidden; }
@media(max-width:767px) {
  .whatsapp-entry { inset-inline-end:max(16px,env(safe-area-inset-right)); bottom:calc(16px + env(safe-area-inset-bottom,0px)); width:56px; height:56px; }
  /* Share the sticky action row instead of covering the short-screen hero. */
  body.landing-page .whatsapp-entry { bottom:calc(var(--drc-height,0px) + 10px + env(safe-area-inset-bottom,0px)); width:48px; height:48px; z-index:31; }
  .meta-in-app body.landing-page .whatsapp-entry { bottom:calc(var(--drc-height,0px) + max(24px, calc(10px + env(safe-area-inset-bottom,0px)))); }
  body.landing-page .landing-sticky { padding-inline-end:calc(60px + max(16px,env(safe-area-inset-right,0px))); }
}
@media(prefers-reduced-motion:reduce) { .whatsapp-entry { transition:none; } .whatsapp-entry:hover { transform:none; } }
@media print { .whatsapp-entry { display:none; } }
/* Keep the assessment's bottom action row usable; no new input is introduced. */
body:has([data-assessment]) .whatsapp-entry { bottom:calc(96px + env(safe-area-inset-bottom,0px)); }
