/* Floating WhatsApp CTA — Pine & Gold tokens only (WhatsApp green is not a brand colour). */
.wa-fab {
    position: fixed;
    right: max(16px, env(safe-area-inset-right, 0px));
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    z-index: 30; /* above sticky bars (24), below nav (40), assessment modal (45), overlay (80), drawer (90) */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--anihra-space-2);
    min-width: 52px;
    min-height: 52px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--anihra-pine-deep);
    color: var(--anihra-gold-soft);
    border: 2px solid var(--anihra-gold);
    box-shadow: var(--anihra-shadow-md);
    font-family: var(--anihra-font-body);
    font-weight: 700;
    font-size: var(--anihra-text-sm);
    line-height: 1;
    text-decoration: none;
    transition: transform var(--anihra-motion-base) var(--anihra-ease-out), background-color var(--anihra-motion-fast) ease;
}
.wa-fab:hover { background: var(--anihra-pine); color: var(--anihra-cream); transform: translateY(-2px); }
.wa-fab:focus-visible { outline: 3px solid var(--anihra-gold); outline-offset: 3px; }
.wa-fab__icon { flex: none; display: block; }
.wa-fab__text { display: none; color: var(--anihra-cream); white-space: nowrap; }

@media (min-width: 641px) {
    .wa-fab { padding: 0 20px 0 16px; }
    .wa-fab__text { display: inline; }
}

/* Product pages on phones: lift above the sticky add-to-cart bar (~70px + its safe-area padding). */
@media (max-width: 640px) {
    .wa-fab--product { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
    /* The sticky assessment bar slides up on scroll; keep the button above it. */
    body:has(.mbar.show) .wa-fab { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
}

/* Hide while a dialog or the cart drawer owns the screen. */
html.amodal-open .wa-fab,
html.anihra-drawer-open .wa-fab { display: none; }

@media print { .wa-fab { display: none; } }

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