/* tutor.css — Tutor della pagina (js/tutor.js): fumetto di Driver.js ridisegnato con la mascotte «Pilo» e le sue animazioni
   (pose SVG animate di img/pilo-mascotte; qui l'entrata e lo specchio della posa «indica»). */

/* ---- fumetto ---- */
.driver-popover.tt-pop {
    font-family: var(--es-font);
    color: var(--es-ink);
    background: #fff;
    border-radius: 18px;
    padding: 18px 20px 16px 112px;
    min-width: 340px;
    max-width: 440px;
    min-height: 150px;
    box-shadow: 0 18px 50px rgba(11, 42, 91, .35), 0 0 0 1px rgba(11, 42, 91, .06);
    animation: tt-pop-in .35s cubic-bezier(.2, .9, .3, 1.3);
}
.driver-popover.tt-pop--grande { max-width: 520px; padding-left: 150px; min-height: 190px; }
.driver-popover.tt-pop .driver-popover-title { font-size: 17px; font-weight: 800; color: var(--es-navy); line-height: 1.3; padding-right: 22px; }
.driver-popover.tt-pop .driver-popover-description { font-size: 14px; line-height: 1.55; color: #33415a; margin-top: 6px; min-height: 44px; }
.driver-popover.tt-pop .driver-popover-description b { color: var(--es-navy); }
.driver-popover.tt-pop .tt-link { color: var(--es-blue); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.driver-popover.tt-pop .driver-popover-close-btn { color: #9aa6b8; font-size: 22px; top: 6px; right: 8px; }
.driver-popover.tt-pop .driver-popover-close-btn:hover { color: var(--es-navy); }
.driver-popover.tt-pop .driver-popover-footer { margin-top: 14px; gap: 10px; }
.driver-popover.tt-pop .driver-popover-progress-text { font-size: 12px; font-weight: 700; color: var(--es-muted); letter-spacing: .02em; }
.driver-popover.tt-pop .driver-popover-navigation-btns { gap: 8px; }
.driver-popover.tt-pop .driver-popover-footer-btn {
    font-family: var(--es-font);
    font-size: 13px;
    font-weight: 700;
    text-shadow: none;
    border-radius: 10px;
    padding: 7px 14px;
    border: 1px solid var(--es-line);
    color: var(--es-ink);
    background: #fff;
    transition: transform .15s, background .15s;
}
.driver-popover.tt-pop .driver-popover-footer-btn:hover { background: var(--es-hover); transform: translateY(-1px); }
.driver-popover.tt-pop .driver-popover-next-btn,
.driver-popover.tt-pop .driver-popover-done-btn { background: var(--es-blue); border-color: var(--es-blue); color: #fff; }
.driver-popover.tt-pop .driver-popover-next-btn:hover,
.driver-popover.tt-pop .driver-popover-done-btn:hover { background: var(--es-blue-dark); }
.driver-popover.tt-pop .driver-popover-arrow { border-width: 9px; }

/* ---- la mascotte: pose SVG di img/pilo-mascotte, con le loro animazioni interne ---- */
.tt-mascotte {
    position: absolute;
    left: 8px;
    bottom: 10px;
    width: 96px;
    animation: tt-entra .6s cubic-bezier(.2, .9, .3, 1.35) both;
}
.tt-pop--grande .tt-mascotte { width: 130px; left: 12px; }
.tt-pilo { display: block; width: 100%; height: auto; transition: transform .3s; }
.tt-specchio .tt-pilo { transform: scaleX(-1); }   /* «indica» punta a destra: girata verso un elemento a sinistra */

/* puntino sul pulsante: pagina di cui non si è ancora visto il tutor */
.icobtn--tutor .icobtn-punto { animation: tt-luce 1.8s ease-in-out infinite; }

@keyframes tt-pop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes tt-entra { 0% { opacity: 0; transform: translateY(40px) scale(.5) rotate(-12deg); } 70% { opacity: 1; transform: translateY(-6px) scale(1.05) rotate(3deg); } 100% { transform: none; } }
@keyframes tt-luce { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

@media (prefers-reduced-motion: reduce) {
    .driver-popover.tt-pop, .tt-mascotte, .tt-pilo { animation: none !important; transition: none !important; }
}
@media (max-width: 575.98px) {
    .driver-popover.tt-pop, .driver-popover.tt-pop--grande { min-width: 0; max-width: calc(100vw - 24px); padding-left: 20px; padding-top: 84px; }
    .tt-mascotte, .tt-pop--grande .tt-mascotte { width: 72px; top: -30px; bottom: auto; left: 16px; }
}

/* ---- finestra di benvenuto in tre passi (inc/modale_benvenuto.php) ----
   Palco navy con Pilo e la replica cliccabile della barra in alto; sotto, il pannello del passo. Scene e pannelli sono
   sovrapposti nella stessa cella della griglia: la finestra non cambia altezza. Movimento solo con transform e opacity. */
.bv {
    --bv-navy: #0b2a5b;
    --bv-notte: #071d42;
    --bv-ambra: #f2a71b;
    --bv-esce: cubic-bezier(.16, 1, .3, 1);
    border: 0;
    border-radius: 24px;
    overflow: hidden;
    font-family: var(--es-font);
    background: #fbfcfe;
    box-shadow: 0 40px 90px rgba(7, 29, 66, .45);
}
#modale-benvenuto.show .modal-dialog { animation: bv-entra .6s var(--bv-esce) both; }

/* palco */
.bv-palco { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); min-height: 268px; padding: 30px 34px 26px; background: var(--bv-notte); color: #f4f7fc; overflow: hidden; }
.bv-forme i { position: absolute; border-radius: 22%; opacity: .07; background: #f4f7fc; animation: bv-deriva 14s ease-in-out infinite alternate; }
.bv-forme i:nth-child(1) { width: 190px; height: 190px; right: -50px; top: -70px; }
.bv-forme i:nth-child(2) { width: 120px; height: 120px; right: 90px; top: 196px; background: var(--bv-ambra); opacity: .12; animation-duration: 18s; animation-delay: -4s; }
.bv-forme i:nth-child(3) { width: 90px; height: 90px; left: -30px; bottom: -34px; background: #5d9ce2; opacity: .14; animation-duration: 16s; animation-delay: -7s; }
.bv-forme i:nth-child(4) { width: 54px; height: 54px; left: 46%; top: -22px; animation-duration: 20s; animation-delay: -2s; }
.bv-avanzamento { position: absolute; left: 0; right: 0; top: 0; height: 4px; background: rgba(244, 247, 252, .12); }
.bv-avanzamento span { display: block; height: 100%; background: var(--bv-ambra); transform-origin: 0 50%; transform: scaleX(.3334); transition: transform .6s var(--bv-esce); }
.bv[data-passo="2"] .bv-avanzamento span { transform: scaleX(.6667); }
.bv[data-passo="3"] .bv-avanzamento span { transform: scaleX(1); }
.bv-chiudi {
    position: absolute; right: 14px; top: 16px; z-index: 3;
    width: 36px; height: 36px; border: 0; border-radius: 11px;
    display: grid; place-items: center;
    background: rgba(244, 247, 252, .1); color: #f4f7fc;
    transition: background .2s;
}
.bv-chiudi:hover { background: rgba(244, 247, 252, .22); }
.bv-chiudi:focus-visible, .bv-ib:focus-visible, .bv-punto:focus-visible { outline: 3px solid var(--bv-ambra); outline-offset: 2px; }

.bv-scena {
    grid-area: 1 / 1; position: relative; z-index: 1; min-width: 0;
    display: flex; align-items: center; gap: 26px;
    visibility: hidden; opacity: 0; transform: translateX(28px);
    transition: opacity .35s var(--bv-esce), transform .5s var(--bv-esce), visibility 0s .35s;
}
.bv-scena.is-on { visibility: visible; opacity: 1; transform: none; transition-delay: .08s, .08s, 0s; }
.bv-scena.is-fuori { transform: translateX(-28px); }
.bv-scena[data-scena="2"] { flex-direction: column; align-items: stretch; gap: 14px; justify-content: center; }
.bv-pilo { position: relative; display: block; flex: 0 0 auto; }
.bv-pilo img { position: relative; display: block; width: 100%; height: auto; }
/* alone chiaro dietro Pilo: il suo corpo navy si stacca dal fondo */
.bv-pilo::before { content: ""; position: absolute; left: 10%; right: 10%; top: 17%; aspect-ratio: 1; border-radius: 50%; background: #1b4a94; }
.bv-pilo--grande { width: 176px; }
.bv-pilo--piccolo { width: 84px; }
.bv-scena.is-on .bv-pilo { animation: bv-sale .7s var(--bv-esce) both; }
.bv-scena.is-on .bv-saluto > * { animation: bv-sale .6s var(--bv-esce) both; }
.bv-scena.is-on .bv-saluto > :nth-child(2) { animation-delay: .07s; }
.bv-scena.is-on .bv-saluto > :nth-child(3) { animation-delay: .14s; }
.bv-occhiello { margin: 0 0 6px; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--bv-ambra); }
.bv-h { margin: 0; font-size: 32px; line-height: 1.12; font-weight: 800; letter-spacing: -.01em; color: #f4f7fc; }
.bv-sotto { margin: 10px 0 0; max-width: 44ch; font-size: 15.5px; line-height: 1.55; color: rgba(244, 247, 252, .82); }

/* passo 2: replica della barra in alto */
.bv-riga { display: flex; align-items: center; gap: 12px; padding-right: 44px; }
.bv-invito { margin: 0; font-size: 15.5px; line-height: 1.5; color: rgba(244, 247, 252, .86); }
.bv-invito b { color: #f4f7fc; }
.bv-barra {
    display: flex; align-items: center; gap: 6px;
    padding: 9px 10px; border-radius: 16px;
    background: var(--bv-navy); border: 1px solid rgba(244, 247, 252, .16);
    box-shadow: 0 14px 30px rgba(0, 0, 0, .28);
}
.bv-marchio { display: flex; align-items: center; gap: 8px; margin-right: 4px; font-size: 14px; color: #f4f7fc; }
.bv-ib {
    position: relative; flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    min-width: 40px; height: 40px; padding: 0 9px;
    border: 0; border-radius: 12px; background: transparent; color: rgba(244, 247, 252, .86);
    font: inherit; font-size: 13px; cursor: pointer;
    transition: background .18s, color .18s, transform .3s var(--bv-esce);
}
.bv-ib:hover { background: rgba(244, 247, 252, .14); color: #f4f7fc; }
.bv-ib--cerca { flex: 1 1 auto; justify-content: flex-start; min-width: 0; background: rgba(244, 247, 252, .1); }
.bv-ib--cerca .bv-ib-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bv-ib--cerca kbd { margin-left: auto; flex: 0 0 auto; white-space: nowrap; font-family: var(--es-mono); font-size: 11px; padding: 1px 6px; border-radius: 5px; background: rgba(244, 247, 252, .16); color: inherit; }
.bv-ib--azienda { background: rgba(244, 247, 252, .1); font-weight: 700; }
.bv-ib-iniziali { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--bv-ambra); color: var(--bv-notte); font-size: 11.5px; font-weight: 800; }
.bv-ib[aria-selected="true"] { background: #f4f7fc; color: var(--bv-navy); transform: translateY(-3px); box-shadow: 0 0 0 3px var(--bv-ambra), 0 10px 20px rgba(0, 0, 0, .3); }
.bv-ib[aria-selected="true"] kbd { background: rgba(11, 42, 91, .12); }
/* puntino sulle icone non ancora provate */
.bv-ib::after { content: ""; position: absolute; right: 4px; top: 4px; width: 7px; height: 7px; border-radius: 50%; background: var(--bv-ambra); animation: tt-luce 1.8s ease-in-out infinite; }
.bv-ib.is-vista::after { display: none; }
/* freccia del pannello: sul bordo fra palco e pannello, sotto l'icona scelta (solo al passo 2) */
.bv-freccia {
    position: absolute; z-index: 2; left: 0; bottom: -11px; width: 22px; height: 22px; margin-left: -11px;
    background: #fbfcfe; border-radius: 4px; opacity: 0; transform: translateX(var(--bv-x, 80px)) rotate(45deg);
    transition: transform .5s var(--bv-esce), opacity .3s;
}
.bv[data-passo="2"] .bv-freccia { opacity: 1; }

/* pannello sotto il palco */
.bv-corpo { display: grid; grid-template-columns: minmax(0, 1fr); padding: 24px 34px 6px; min-height: 172px; }
.bv-pannello { grid-area: 1 / 1; visibility: hidden; opacity: 0; transform: translateY(10px); transition: opacity .3s var(--bv-esce), transform .45s var(--bv-esce), visibility 0s .3s; }
.bv-pannello.is-on { visibility: visible; opacity: 1; transform: none; transition-delay: .12s, .12s, 0s; }
.bv-tappe, .bv-aiuti { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.bv-tappe li, .bv-aiuti li { display: flex; gap: 14px; align-items: flex-start; font-size: 14.5px; line-height: 1.5; color: #3b4860; }
.bv-tappe b, .bv-aiuti b { display: block; font-size: 15.5px; color: var(--es-ink); }
.bv-tempo { margin: 18px 0 0; font-size: 13px; color: var(--es-muted); }
.bv-vai { display: inline-block; margin-left: 6px; font-weight: 700; color: var(--es-blue); text-decoration: underline; text-underline-offset: 3px; }
.bv-vai:hover { color: var(--es-navy); }
.bv-tappa-n { flex: 0 0 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--bv-navy); color: #f4f7fc; font-weight: 800; font-size: 15px; }
.bv-det { display: flex; align-items: flex-start; gap: 16px; }
.bv-det.is-cambia .bv-det-ico, .bv-det.is-cambia .bv-det-t { animation: bv-sale .45s var(--bv-esce) both; }
.bv-det-ico { flex: 0 0 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: var(--bv-navy); color: #f4f7fc; }
.bv-det-ico svg { width: 26px; height: 26px; }
.bv-det-ico .bv-ib-iniziali { width: 34px; height: 34px; font-size: 13px; }
.bv-det-t { flex: 1 1 auto; min-height: 96px; }
.bv-det-t h3 { margin: 2px 0 4px; font-size: 19px; font-weight: 800; color: var(--es-ink); }
.bv-det-t p { margin: 0; max-width: 60ch; font-size: 15px; line-height: 1.55; color: #3b4860; }
.bv-det-tasto { align-self: center; font-family: var(--es-mono); font-size: 13px; padding: 4px 10px; border-radius: 8px; border: 1px solid var(--es-line); border-bottom-width: 3px; background: #fff; color: var(--es-ink); white-space: nowrap; }
.bv-conta { display: flex; align-items: center; gap: 10px; margin: 6px 0 0; font-size: 12.5px; font-weight: 700; color: var(--es-muted); }
.bv-conta-barra { flex: 0 0 120px; height: 6px; border-radius: 999px; background: var(--es-line-soft); overflow: hidden; }
.bv-conta-barra i { display: block; height: 100%; border-radius: inherit; background: var(--bv-ambra); transform-origin: 0 50%; transform: scaleX(var(--bv-fatto, .11)); transition: transform .5s var(--bv-esce); }
.bv-aiuto-ico { position: relative; flex: 0 0 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--bv-navy); color: #f4f7fc; box-shadow: 0 0 0 3px rgba(242, 167, 27, .45); }
.bv-aiuto-ico--menu { align-content: center; gap: 0; background: var(--bv-notte); }
.bv-aiuto-ico--menu svg { width: 18px; height: 18px; }
.bv-aiuto-ico--menu em { font-style: normal; font-size: 8.5px; font-weight: 800; line-height: 1; }
.bv-pannello.is-on .bv-aiuti li, .bv-pannello.is-on .bv-tappe li { animation: bv-sale .5s var(--bv-esce) both; }
.bv-pannello.is-on li:nth-child(2) { animation-delay: .07s; }
.bv-pannello.is-on li:nth-child(3) { animation-delay: .14s; }

/* piede */
.bv-piede { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 14px 34px 22px; }
.bv-flag { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; color: #3b4860; cursor: pointer; }
.bv-flag input { width: 17px; height: 17px; accent-color: var(--es-blue); }
.bv-punti { display: flex; gap: 8px; }
.bv-punto { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 999px; background: var(--es-line); transition: width .4s var(--bv-esce), background .2s; }
.bv-punto.is-on { width: 28px; background: var(--es-blue); }
.bv-azioni { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.bv-azioni .es-btn { min-height: 38px; }

@keyframes bv-entra { from { opacity: 0; transform: translateY(26px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes bv-sale { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes bv-deriva { from { transform: translate(0, 0) rotate(0deg); } to { transform: translate(18px, 14px) rotate(14deg); } }

@media (max-width: 767.98px) {
    .bv-palco { padding: 26px 18px 22px; min-height: 0; }
    .bv-scena { gap: 14px; }
    .bv-pilo--grande { width: 104px; }
    .bv-h { font-size: 23px; }
    .bv-sotto { font-size: 14.5px; }
    .bv-barra { flex-wrap: wrap; }
    .bv-marchio b, .bv-ib--cerca kbd { display: none; }
    .bv-ib--cerca { flex: 1 1 100%; order: 9; }
    .bv-freccia { display: none; }
    .bv-corpo { padding: 20px 18px 4px; }
    .bv-piede { grid-template-columns: 1fr; justify-items: center; padding: 12px 18px 18px; }
    .bv-azioni { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
    #modale-benvenuto .modal-dialog, .bv *, .bv *::after { animation: none !important; transition: none !important; }
}

/* ---- riquadro «Lasciami la tua email» dell'azienda DEMO (inc/demo_contatto.php, js/democontatto.js) ---- */
.dc {
    position: fixed; right: 22px; bottom: 54px; z-index: 1040;
    width: 372px; max-width: calc(100vw - 24px);
    padding: 20px 20px 18px;
    border-radius: 20px;
    background: #fbfcfe;
    box-shadow: 0 24px 60px rgba(7, 29, 66, .28), 0 0 0 1px rgba(11, 42, 91, .08);
    font-family: var(--es-font);
    opacity: 0; transform: translateY(24px);
    transition: opacity .4s cubic-bezier(.16, 1, .3, 1), transform .5s cubic-bezier(.16, 1, .3, 1);
}
.dc.is-on { opacity: 1; transform: none; }
.dc-chiudi { position: absolute; right: 10px; top: 10px; width: 32px; height: 32px; border: 0; border-radius: 10px; display: grid; place-items: center; background: transparent; color: var(--es-muted); }
.dc-chiudi:hover { background: var(--es-hover); color: var(--es-ink); }
.dc-testa { display: flex; align-items: center; gap: 12px; padding-right: 26px; margin-bottom: 14px; }
.dc-pilo { flex: 0 0 78px; width: 78px; height: auto; }
.dc-h { margin: 0 0 4px; font-size: 18px; line-height: 1.25; font-weight: 800; color: var(--es-navy); }
.dc-p { margin: 0; font-size: 14px; line-height: 1.5; color: #3b4860; }
.dc-p b { color: var(--es-ink); }
.dc-form { display: grid; gap: 10px; }
.dc-campo { display: grid; gap: 4px; font-size: 13px; font-weight: 700; color: var(--es-ink); }
.dc-campo em { font-style: normal; font-weight: 500; color: var(--es-muted); }
.dc-trappola { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.dc-consenso { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; line-height: 1.45; color: #3b4860; cursor: pointer; }
.dc-consenso input { flex: 0 0 auto; margin-top: 2px; }
.dc-consenso a { color: var(--es-blue); font-weight: 700; }
.dc-errore { margin: 0; font-size: 13px; font-weight: 700; color: var(--es-danger); }
.dc-invia { width: 100%; justify-content: center; min-height: 42px; }
.dc-grazie { text-align: center; padding: 6px 6px 2px; }
.dc-pilo--festa { display: block; width: 120px; margin: 0 auto 6px; }
@media (max-width: 575.98px) { .dc { right: 12px; bottom: 12px; } }
@media (prefers-reduced-motion: reduce) { .dc { transition: none; } }
