/* WhatsApp del tema (functions/whatsapp-button.php): pillola scura come la barra contatti mobile. */
.ac-wa {
 --wa-ease:cubic-bezier(.22,1,.36,1);
 position:fixed; right:24px; bottom:calc(24px + env(safe-area-inset-bottom, 0px)); z-index:9990; box-sizing:border-box;
 display:inline-flex; align-items:center; gap:12px; min-height:52px; padding:6px 22px 6px 6px;
 border-radius:999px; background:rgb(52 46 41 / 95%); color:#fbf8f3!important;
 box-shadow:0 18px 40px rgb(52 46 41 / 30%), inset 0 0 0 1px rgb(255 255 255 / 8%);
 -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px);
 font:600 14.5px/1.2 'Open Sans',Arial,sans-serif; letter-spacing:.01em; text-decoration:none!important; white-space:nowrap;
 animation:ac-wa-in .8s var(--wa-ease) .6s both;
 transition:transform .35s var(--wa-ease), box-shadow .35s var(--wa-ease), bottom .4s var(--wa-ease);
}
.ac-wa__icon { display:inline-flex; align-items:center; justify-content:center; flex:none; width:40px; height:40px; border-radius:50%; background:#fbf8f3; color:#342e29; transition:transform .45s var(--wa-ease); }
.ac-wa__icon svg { display:block; width:21px; height:21px; }
@media (hover:hover) and (pointer:fine) {
 .ac-wa:hover { transform:translateY(-3px); box-shadow:0 24px 48px rgb(52 46 41 / 34%), inset 0 0 0 1px rgb(255 255 255 / 10%); }
 .ac-wa:hover .ac-wa__icon { transform:rotate(-10deg) scale(1.06); }
}
.ac-wa:focus-visible { outline:2px solid #715545; outline-offset:4px; }
@keyframes ac-wa-in { from { opacity:0; transform:translateY(18px) scale(.96); } }

/* La bolla del vecchio plugin, finché resta attivo (online prima del passo 49), non compare. */
.wa__btn_popup,.wa__popup_chat_box { display:none!important; }

/* "Torna su" del tema sta sopra la pillola. */
@media (min-width:761px) {
 body.ac-has-wa #back_to_top { bottom:92px!important; }
}

@media (max-width:760px) {
 /* Con la barra contatti WhatsApp è già lì. */
 body.ac-has-dock .ac-wa { display:none; }
 /* Senza barra (schede trattamento, carrello, cassa, account): solo il pulsante rotondo. */
 .ac-wa { right:16px; bottom:calc(16px + env(safe-area-inset-bottom, 0px)); gap:0; min-height:0; padding:5px; }
 .ac-wa__icon { width:44px; height:44px; }
 .ac-wa__label { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); clip-path:inset(50%); white-space:nowrap; }
 body.ac-tx.ac-tx-bar-on .ac-wa { bottom:calc(84px + env(safe-area-inset-bottom, 0px)); }
 body.ac-has-wa:not(.ac-has-dock) #back_to_top { bottom:calc(76px + env(safe-area-inset-bottom, 0px))!important; }
 body.ac-tx.ac-tx-bar-on.ac-has-wa #back_to_top { bottom:calc(144px + env(safe-area-inset-bottom, 0px))!important; }
}
@media (prefers-reduced-motion:reduce) {
 .ac-wa,.ac-wa__icon { animation:none; transition:none; }
}
