/* ==========================================================================
   Tutorial AsterID – richiede dist/css/pages/aster-base.css
   ========================================================================== */

#card-wizard {
    max-width: 440px;
}
#card-wizard .card-inner { padding: 26px 22px 22px; }

/* ===== Testata ===== */
.wz-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}
.wz-logo img {
    width: 118px;
    filter: drop-shadow(0 4px 18px rgba(2,117,216,.45));
}
.wz-skip {
    background: none;
    border: none;
    color: var(--text-sec);
    font-size: .78rem;
    letter-spacing: .4px;
    cursor: pointer;
    padding: 6px 2px;
    transition: color .25s;
    white-space: nowrap;
}
.wz-skip:hover { color: var(--text-pri); }

/* ===== Avanzamento ===== */
.wz-progress { margin-bottom: 20px; }
.wz-bar {
    height: 4px;
    border-radius: 4px;
    background: rgba(255,255,255,.09);
    overflow: hidden;
}
.wz-bar-fill {
    height: 100%;
    width: 0;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--c-primary), var(--c-accent));
    box-shadow: 0 0 12px rgba(0,212,255,.5);
    transition: width .45s var(--ease);
}
.wz-steps-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 9px;
    font-size: .72rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-sec);
}

/* ===== Step ===== */
.wz-step { display: none; }
.wz-step.is-active { display: block; animation: fadeIn .45s var(--ease) both; }

.wz-icon {
    width: 62px; height: 62px;
    margin: 0 auto 16px;
    border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--c-primary), var(--c-primary-dk));
    box-shadow: 0 6px 24px rgba(2,117,216,.45);
    color: #fff;
    font-size: 1.5rem;
}
.wz-icon.is-accent {
    background: linear-gradient(135deg, #0283f0, #00c4e8);
    box-shadow: 0 6px 24px rgba(0,180,220,.45);
}
.wz-icon.is-success {
    background: linear-gradient(135deg, #28c76f, #1a9c53);
    box-shadow: 0 6px 24px rgba(40,199,111,.45);
}

.wz-title {
    color: var(--text-pri);
    font-size: 1.28rem;
    font-weight: 700;
    text-align: center;
    letter-spacing: .2px;
    margin-bottom: 10px;
}
.wz-text {
    color: var(--text-sec);
    font-size: .89rem;
    line-height: 1.65;
    text-align: center;
}
.wz-text + .wz-text { margin-top: 10px; }
.wz-text strong { color: var(--text-pri); font-weight: 600; }

.wz-step .af-note { margin-top: 16px; }

/* ===== Mockup (finta schermata) ===== */
.wz-mock {
    background: rgba(255,255,255,.045);
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 16px;
    padding: 16px;
    margin-top: 18px;
}
.wz-mock-field {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 13px;
    background: rgba(255,255,255,.055);
    border: 1px solid rgba(255,255,255,.11);
    border-radius: var(--r-btn);
    color: rgba(255,255,255,.4);
    font-size: .85rem;
}
.wz-mock-field + .wz-mock-field { margin-top: 9px; }
.wz-mock-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    padding: 12px;
    border-radius: var(--r-btn);
    background: linear-gradient(135deg, #0283f0, #00c4e8);
    color: #fff;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: 1.1px;
    text-transform: uppercase;
    box-shadow: 0 5px 22px rgba(0,180,220,.42);
}

/* ===== Mirino QR animato ===== */
.wz-scanner {
    position: relative;
    width: 160px; height: 160px;
    margin: 18px auto 0;
    border-radius: 18px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.09);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.wz-scanner i {
    font-size: 4.6rem;
    color: rgba(255,255,255,.22);
}
.wz-scanner::before,
.wz-scanner::after {
    content: '';
    position: absolute;
    width: 30px; height: 30px;
    border: 3px solid var(--c-accent);
    border-radius: 4px;
}
.wz-scanner::before { top: 14px;    left: 14px;  border-right: none; border-bottom: none; }
.wz-scanner::after  { bottom: 14px; right: 14px; border-left: none;  border-top: none;    }
.wz-scanline {
    position: absolute;
    left: 10%; right: 10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--c-accent), transparent);
    box-shadow: 0 0 14px rgba(0,212,255,.85);
    animation: scanSweep 2.4s ease-in-out infinite;
}
@keyframes scanSweep {
    0%,100% { top: 18%; opacity: .35; }
    50%     { top: 82%; opacity: 1;   }
}

/* ===== Lista dati acquisiti ===== */
.wz-list { margin-top: 18px; }
.wz-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 13px;
    background: rgba(255,255,255,.045);
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 12px;
    animation: fadeIn .5s var(--ease) both;
}
.wz-list-item + .wz-list-item { margin-top: 8px; }
.wz-list-item:nth-child(1) { animation-delay: .05s; }
.wz-list-item:nth-child(2) { animation-delay: .12s; }
.wz-list-item:nth-child(3) { animation-delay: .19s; }
.wz-list-item:nth-child(4) { animation-delay: .26s; }
.wz-list-item:nth-child(5) { animation-delay: .33s; }
.wz-list-item:nth-child(6) { animation-delay: .40s; }
.wz-list-item:nth-child(7) { animation-delay: .47s; }
.wz-list-ico {
    width: 32px; height: 32px; flex-shrink: 0;
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--c-primary), var(--c-primary-dk));
    box-shadow: 0 4px 14px rgba(2,117,216,.35);
    color: #fff;
    font-size: .82rem;
}
.wz-list-body { min-width: 0; }
.wz-list-name {
    color: var(--text-pri);
    font-size: .9rem;
    font-weight: 600;
}
.wz-list-desc {
    color: var(--text-sec);
    font-size: .76rem;
    line-height: 1.5;
    margin-top: 1px;
}
.wz-list-item.is-optional .wz-list-ico {
    background: linear-gradient(135deg, #28c76f, #1a9c53);
    box-shadow: 0 4px 14px rgba(40,199,111,.35);
}

/* Griglia a 2 colonne: tessere compatte con la sola etichetta del campo,
   mentre una voce con .is-full occupa l'intera riga (es. Note). */
.wz-list.is-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
.wz-list.is-grid .wz-list-item {
    margin-top: 0;
    padding: 10px 11px;
    gap: 9px;
}
.wz-list.is-grid .wz-list-ico {
    width: 28px; height: 28px;
    border-radius: 8px;
    font-size: .74rem;
}
.wz-list.is-grid .wz-list-name {
    font-size: .82rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wz-list-item.is-full {
    grid-column: 1 / -1;
}
.wz-list.is-grid .is-full .wz-list-name {
    white-space: normal;
}

.wz-badge-opt {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 20px;
    background: rgba(40,199,111,.16);
    border: 1px solid rgba(40,199,111,.4);
    color: #4ade8b;
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .6px;
    text-transform: uppercase;
    vertical-align: middle;
}

/* ===== Toggle ASTERNotes (dimostrativo) ===== */
.wz-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
    padding: 14px 15px;
    background: rgba(255,255,255,.045);
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 14px;
}
.wz-toggle-left { display: flex; align-items: center; gap: 11px; }
.wz-toggle-ico {
    width: 36px; height: 36px; flex-shrink: 0;
    background: linear-gradient(135deg, var(--c-primary), var(--c-primary-dk));
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 14px rgba(2,117,216,.42);
    color: #fff;
    font-size: .85rem;
}
.wz-toggle-label { color: var(--text-pri); font-size: .97rem; font-weight: 700; }
.wz-switch {
    position: relative;
    width: 48px; height: 27px;
    flex-shrink: 0;
    border-radius: 27px;
    background: var(--c-success);
}
.wz-switch::before {
    content: '';
    position: absolute;
    height: 21px; width: 21px;
    top: 3px; left: 3px;
    transform: translateX(21px);
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,.28);
    animation: switchPulse 3s ease-in-out infinite;
}
@keyframes switchPulse {
    0%,100% { transform: translateX(21px) scale(1);    }
    50%     { transform: translateX(21px) scale(1.08); }
}

/* ===== Navigazione ===== */
.wz-foot { margin-top: 22px; }

.wz-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-bottom: 16px;
}
.wz-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,.2);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: width .35s var(--ease), background .35s var(--ease);
}
.wz-dot.is-active {
    width: 22px;
    border-radius: 7px;
    background: linear-gradient(90deg, var(--c-primary), var(--c-accent));
}

.wz-nav { display: flex; align-items: center; gap: 10px; }
.wz-nav .af-btn-ghost {
    width: auto;
    flex-shrink: 0;
    padding: 14px 18px;
}

/* ===== Checkbox "Non mostrare più" ===== */
.wz-optout {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    margin-bottom: 0;
    cursor: pointer;
    user-select: none;
}
.wz-optout input { position: absolute; opacity: 0; width: 0; height: 0; }
.wz-optout-box {
    width: 20px; height: 20px;
    flex-shrink: 0;
    border-radius: 6px;
    background: rgba(255,255,255,.055);
    border: 1px solid rgba(255,255,255,.2);
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-size: .68rem;
    transition: background .25s, border-color .25s;
}
.wz-optout-box i { opacity: 0; transform: scale(.6); transition: opacity .2s, transform .2s; }
.wz-optout input:checked + .wz-optout-box {
    background: linear-gradient(135deg, var(--c-primary), var(--c-primary-dk));
    border-color: transparent;
}
.wz-optout input:checked + .wz-optout-box i { opacity: 1; transform: scale(1); }
.wz-optout input:focus-visible + .wz-optout-box { box-shadow: 0 0 0 3px rgba(2,117,216,.35); }
.wz-optout-text { color: var(--text-sec); font-size: .82rem; line-height: 1.5; }

/* ===== Responsive ===== */
@media (max-width: 380px) {
    #card-wizard .card-inner { padding: 22px 16px 18px; }
    .wz-title    { font-size: 1.15rem; }
    .wz-logo img { width: 100px; }
}
