/* ==========================================================================
   AllTax V2 — Guida assistita (puntatore rosso + voce + sottotitoli)
   Capability "stile Apple": l'assistente INDIRIZZA l'utente sull'interfaccia.
   Isolato e gated: gli stili agiscono solo quando #taxai-guide-root è presente
   (montato solo se la guida è abilitata). Zero impatto sull'app normale.
   ========================================================================== */

/* puntatore: FRECCIA-MOUSE rossa (cursore vero). Il movimento è gestito in JS
   con requestAnimationFrame (traiettoria ad arco + easing) → naturale, non a scatti. */
#taxai-guide-pointer{
  position:fixed; z-index:99999; width:40px; height:40px; left:-100px; top:-100px;
  pointer-events:none; opacity:0; transition:opacity .25s; will-change:left,top;
  filter:drop-shadow(0 3px 5px rgba(0,0,0,.4));
}
#taxai-guide-pointer .gp-cursor{ width:40px; height:40px; display:block; color:#e11d2a; }
/* anello di "click" che pulsa quando l'assistente indica/clicca un elemento */
#taxai-guide-pointer .gp-click{
  position:absolute; left:7px; top:5px; width:14px; height:14px; border-radius:50%;
  border:3px solid #e11d2a; opacity:0; transform:translate(-50%,-50%) scale(.4);
}
#taxai-guide-pointer.clicking .gp-click{ animation:tg-click .55s ease-out; }
@keyframes tg-click{
  0%{opacity:.9; transform:translate(-50%,-50%) scale(.4)}
  100%{opacity:0; transform:translate(-50%,-50%) scale(2.6)}
}

/* evidenziazione elemento puntato */
.taxai-guide-hl{
  outline:3px solid #e11d2a !important; outline-offset:3px; border-radius:10px;
  box-shadow:0 0 0 6px rgba(225,29,42,.15) !important; transition:box-shadow .3s;
}

/* avatar + fumetto sottotitoli */
#taxai-guide-bar{
  position:fixed; z-index:99998; left:16px; bottom:16px; display:flex; align-items:flex-end; gap:10px;
  font-family:-apple-system,Segoe UI,Roboto,Arial,sans-serif;
}
#taxai-guide-bar .tg-face{
  width:58px; height:58px; border-radius:50%; flex:0 0 auto;
  background:radial-gradient(circle at 35% 30%,#7db9ff,#0A4D8C); color:#fff;
  display:flex; align-items:center; justify-content:center; font-size:24px;
  border:3px solid #fff; box-shadow:0 8px 22px rgba(10,77,140,.4);
}
#taxai-guide-bar .tg-face.speaking{ animation:tg-talk .5s infinite alternate; }
@keyframes tg-talk{from{transform:scale(1)}to{transform:scale(1.07)}}
#taxai-guide-bar .tg-bubble{
  max-width:340px; background:#fff; border:1px solid #d9e3ec; border-radius:14px 14px 14px 4px;
  padding:10px 14px; font-size:14px; line-height:1.4; color:#13212e; box-shadow:0 8px 24px rgba(0,0,0,.14);
  display:none;
}
#taxai-guide-bar.on .tg-bubble{ display:block; }
#taxai-guide-bar .tg-bubble .tg-stop{
  margin-top:8px; display:inline-block; background:#eef2f6; border:1px solid #cdd9e4; color:#0A4D8C;
  border-radius:8px; padding:4px 10px; font-size:12px; cursor:pointer;
}

/* launcher "Guidami" */
#taxai-guide-fab{
  position:fixed; z-index:99997; left:16px; bottom:16px; background:#0A4D8C; color:#fff;
  border:none; border-radius:24px; padding:11px 16px; font-size:14px; font-weight:600; cursor:pointer;
  box-shadow:0 8px 22px rgba(10,77,140,.4); display:flex; align-items:center; gap:8px;
  font-family:-apple-system,Segoe UI,Roboto,Arial,sans-serif;
}
#taxai-guide-menu{
  position:fixed; z-index:99997; left:16px; bottom:64px; background:#fff; border:1px solid #d9e3ec;
  border-radius:12px; box-shadow:0 12px 30px rgba(0,0,0,.18); padding:8px; min-width:240px; display:none;
  font-family:-apple-system,Segoe UI,Roboto,Arial,sans-serif;
}
#taxai-guide-menu.open{ display:block; }
#taxai-guide-menu h4{ margin:6px 8px 8px; font-size:13px; color:#64788a; font-weight:600; }
#taxai-guide-menu button.tg-item{
  display:block; width:100%; text-align:left; background:#fff; border:none; border-radius:8px;
  padding:9px 10px; font-size:14px; color:#13212e; cursor:pointer;
}
#taxai-guide-menu button.tg-item:hover{ background:#eef4fb; }

@media (prefers-reduced-motion: reduce){
  #taxai-guide-pointer{ transition:none; }
  #taxai-guide-pointer .gp-ring::after{ animation:none; }
}
