/* Sabdesign – pulsante WhatsApp (discreto, compare dopo l'inizio dello scroll) */
.sab-wa {
  position: fixed; z-index: 99995;
  right: max(20px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; gap: 0;
  padding: 6px; min-height: 56px; box-sizing: border-box;
  background: rgba(23, 22, 20, .92); color: #F3EEE6; text-decoration: none;
  border: 1px solid rgba(243, 238, 230, .14); border-radius: 999px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .28);
  font-family: var(--font-testo, "Instrument Sans"), system-ui, sans-serif;
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity .5s ease, transform .5s cubic-bezier(.2,.7,.2,1), border-color .3s ease, background-color .3s ease, padding .5s cubic-bezier(.2,.7,.2,1), gap .5s cubic-bezier(.2,.7,.2,1);
}
.sab-wa.is-on { opacity: 1; transform: none; pointer-events: auto; }
.sab-wa:hover, .sab-wa:focus-visible { border-color: rgba(217, 72, 43, .7); background: rgba(23, 22, 20, .98); color: #F3EEE6; }
.sab-wa:focus-visible { outline: 2px solid #D9482B; outline-offset: 3px; }
.sab-wa__icon {
  flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; background: #D9482B; color: #F3EEE6;
  transition: transform .4s cubic-bezier(.2,.7,.2,1);
}
.sab-wa:hover .sab-wa__icon { transform: rotate(-8deg) scale(1.04); }
.sab-wa__icon svg { width: 22px; height: 22px; display: block; fill: currentColor; }
.sab-wa__txt { display: flex; flex-direction: column; line-height: 1.2; white-space: nowrap; overflow: hidden; max-width: 0; opacity: 0; transition: max-width .55s cubic-bezier(.2,.7,.2,1), opacity .35s ease; }
/* Aperto: al passaggio del mouse, con la tastiera, e per qualche secondo la prima volta che compare */
.sab-wa:hover, .sab-wa:focus-visible, .sab-wa.is-aperto { gap: 12px; padding-right: 20px; }
.sab-wa:hover .sab-wa__txt, .sab-wa:focus-visible .sab-wa__txt, .sab-wa.is-aperto .sab-wa__txt { max-width: 220px; opacity: 1; transition-delay: 0s, .1s; }
.sab-wa__t1 { font-size: 14px; font-weight: 500; letter-spacing: -.005em; }
.sab-wa__t2 { font-family: var(--font-corsivo, "Instrument Serif"), Georgia, serif; font-style: italic; font-size: 14px; color: rgba(243, 238, 230, .6); }
@media (max-width: 767px) {
  .sab-wa, .sab-wa:hover, .sab-wa:focus-visible, .sab-wa.is-aperto { right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); padding: 4px; min-height: 0; gap: 0; }
  .sab-wa__icon { flex-basis: 48px; width: 48px; height: 48px; }
  .sab-wa__txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); }
}
html.sab-ov-lock .sab-wa { opacity: 1; transform: none; pointer-events: auto; }
@media (prefers-reduced-motion: reduce) { .sab-wa, .sab-wa__icon { transition: opacity .2s linear; transform: none !important; } }
@media print { .sab-wa { display: none; } }

/* Variante intestazione: icona fissa, la scritta compare a sinistra al passaggio del mouse */
.sab-wa.sab-wa--head {
  position: relative; right: auto; bottom: auto; z-index: auto;
  opacity: 1; transform: none; pointer-events: auto;
  min-height: 44px; padding: 2px; gap: 0;
  background: transparent; border-color: transparent; box-shadow: none;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.sab-wa.sab-wa--head .sab-wa__icon { flex-basis: 40px; width: 40px; height: 40px; }
.sab-wa.sab-wa--head .sab-wa__icon svg { width: 19px; height: 19px; }
.sab-wa.sab-wa--head .sab-wa__txt { text-align: right; }
.sab-wa.sab-wa--head:hover, .sab-wa.sab-wa--head:focus-visible { gap: 12px; padding: 2px 2px 2px 18px; background: rgba(23, 22, 20, .72); border-color: rgba(243, 238, 230, .14); }
@media (max-width: 767px) {
  .sab-wa.sab-wa--head, .sab-wa.sab-wa--head:hover, .sab-wa.sab-wa--head:focus-visible { padding: 2px; gap: 0; background: transparent; border-color: transparent; }
}
