/* Wrapper: evita collisioni col tema */
.opz-wizard {
    --opz-bg: #ffffff;
    --opz-surface: #ffffff;
    --opz-text: #111111;
    --opz-muted: rgba(17, 17, 17, 0.65);
    --opz-border: rgba(17, 17, 17, 0.16);
    --opz-border-strong: rgba(17, 17, 17, 0.34);
    --opz-accent: #7a1f1f; /* richiama la "Z" (override facile) */
    --opz-radius: 18px;
    --opz-shadow: 0 10px 30px rgba(0,0,0,0.08);
  
    color: var(--opz-text);
    background: transparent;
    max-width: 980px;
    margin: 0 auto;
    padding: clamp(14px, 2vw, 28px);
  }
  
  /* Header */
  .opz-wizard__head {
    margin-bottom: 18px;
  }
  .opz-kicker {
    font-size: 12px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--opz-muted);
    margin-bottom: 10px;
  }
  .opz-title {
    font-size: clamp(26px, 3vw, 40px);
    line-height: 1.12;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 10px;
  }
  .opz-subtitle {
    margin: 0;
    color: var(--opz-muted);
    max-width: 70ch;
  }
  
  /* Stepper */
  .opz-stepper {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 18px 0 18px;
  }
  .opz-stepper__item {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--opz-border);
    border-radius: 999px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.6);
  }
  .opz-stepper__dot {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    border: 1px solid var(--opz-border-strong);
    font-weight: 700;
    font-size: 12px;
  }
  .opz-stepper__label {
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--opz-muted);
    white-space: nowrap;
  }
  .opz-stepper__item.is-active {
    border-color: rgba(122,31,31,0.35);
    background: rgba(122,31,31,0.06);
  }
  .opz-stepper__item.is-active .opz-stepper__dot {
    border-color: rgba(122,31,31,0.6);
    color: var(--opz-accent);
  }
  .opz-stepper__item.is-done {
    border-color: rgba(17,17,17,0.26);
    background: rgba(17,17,17,0.03);
  }
  
  /* Card */
  .opz-card {
    background: var(--opz-surface);
    border: 1px solid var(--opz-border);
    border-radius: var(--opz-radius);
    padding: clamp(16px, 2vw, 26px);
    box-shadow: var(--opz-shadow);
  }
  .opz-card + .opz-card { margin-top: 14px; }
  .opz-card__title {
    margin: 0 0 16px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 16px;
  }
  
  /* Layout grid */
  .opz-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .opz-span-2 { grid-column: span 2; }
  @media (max-width: 720px) {
    .opz-stepper { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .opz-grid { grid-template-columns: 1fr; }
    .opz-span-2 { grid-column: auto; }
  }
  
  /* Fields */
  .opz-field { display: flex; flex-direction: column; gap: 8px; }
  .opz-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--opz-muted);
  }
  .opz-legend {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--opz-muted);
    margin-bottom: 10px;
  }
  .opz-input,
  .opz-select,
  .opz-textarea {
    width: 100%;
    border: 1px solid var(--opz-border-strong);
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 16px;
    background: #fff;
    color: var(--opz-text);
    outline: none;
  }
  .opz-textarea { resize: vertical; min-height: 110px; }
  
  .opz-input:focus,
  .opz-select:focus,
  .opz-textarea:focus {
    border-color: rgba(122,31,31,0.65);
    box-shadow: 0 0 0 4px rgba(122,31,31,0.12);
  }
  
  .opz-help {
    min-height: 14px;
    font-size: 12px;
    color: rgba(180, 0, 0, 0.9);
  }
  
  /* Radio / Checkbox look */
  .opz-choice-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }
  .opz-choice {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--opz-border);
    border-radius: 999px;
    padding: 10px 12px;
    background: rgba(17,17,17,0.02);
    cursor: pointer;
    user-select: none;
  }
  .opz-choice input { accent-color: var(--opz-accent); }
  
  .opz-check {
    display: inline-flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    color: var(--opz-muted);
  }
  .opz-check input { margin-top: 2px; accent-color: var(--opz-accent); }
  
  .opz-mt { margin-top: 10px; }
  
  /* Blocks */
  .opz-stack { display: grid; gap: 12px; }
  .opz-block {
    border: 1px solid var(--opz-border);
    border-radius: 16px;
    padding: 14px;
    background: rgba(255,255,255,0.6);
  }
  .opz-block__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
  }
  .opz-block__title {
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 14px;
  }
  .opz-paragraph {
    margin: 0 0 10px;
    color: var(--opz-muted);
    line-height: 1.5;
  }
  
  /* Links */
  .opz-link-wrap {
    display: flex;
    flex-flow: column;
    gap: 8px;
  }
  .opz-link {
    color: var(--opz-accent);
    text-decoration: none;
    border-bottom: 1px solid rgba(122,31,31,0.35);
  }
  .opz-link:hover { border-bottom-color: rgba(122,31,31,0.8); }
  
  /* Actions + buttons */
  .opz-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 18px;
  }
  .opz-btn {
    border: 1px solid var(--opz-border-strong);
    background: #fff;
    color: var(--opz-text);
    padding: 12px 16px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 12px;
  }
  .opz-btn:hover {
    transform: translateY(-1px);
  }
  .opz-btn--primary {
    border-color: rgba(17,17,17,0.85);
    background: #111;
    color: #fff;
  }
  .opz-btn--primary:hover {
    box-shadow: 0 10px 18px rgba(0,0,0,0.18);
  }
  
  /* Steps visibility */
  .opz-step[hidden] { display: none !important; }
  .opz-step.is-active { display: block; }
  
  /* Summary + Pay */
  .opz-summary {
    border: 1px dashed var(--opz-border-strong);
    border-radius: 16px;
    padding: 14px;
    color: var(--opz-muted);
    background: rgba(17,17,17,0.02);
    margin-bottom: 14px;
  }
  
  .opz-paybox {
    border: 1px solid var(--opz-border);
    border-radius: 16px;
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: rgba(122,31,31,0.05);
  }
  .opz-paybox__label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--opz-muted);
  }
  .opz-paybox__amount {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 0.02em;
  }
  .opz-paybox__hint {
    color: var(--opz-muted);
    font-size: 13px;
  }
  .opz-error {
    margin: 10px 0 0;
    color: rgba(180,0,0,0.9);
    font-size: 13px;
  }

  /* viewport che anima l'altezza */
.opz-steps-viewport{
    position: relative;
    overflow: hidden;
    transition: height .28s ease;
    will-change: height;
  }
  
  /* step animabili */
  .opz-step{
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity .22s ease, transform .22s ease;
  }
  
  /* step attivo */
  .opz-step.is-active{
    position: relative;      /* diventa parte del flow così misura altezza corretta */
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  
  /* evita "jump" quando cambia focus */
  .opz-wizard{
    scroll-margin-top: 90px; /* se hai admin bar / header sticky */
  }
  
  .opz-steps-viewport{ min-height: 420px; }

  #opz-pay {
    position: relative;
    overflow: hidden; /* necessario per l’overlay */
  }
  
  /* mantieni larghezza stabile tra "Paga con PayPal" e "Attendere..." */
  #opz-pay .opz-btn__label {
    position: relative;
    z-index: 2;
    display: inline-block;
    min-width: 150px;
    text-align: center;
  }
  
  /* stato disabled come vuoi tu */
  #opz-pay.disabled,
  #opz-pay:disabled {
    background-color: #6e1a1117;
    color: #6e1a11;
    cursor: not-allowed;
    opacity: 1;
  }
  
  /* overlay “loading” */
  #opz-pay.is-loading::after {
    content: "";
    position: absolute;
    inset: -2px;              
    pointer-events: none;
    z-index: 1;
  
    /* 1) velo scuro + 2) banda chiara che scorre */
    background:
      linear-gradient(rgba(0,0,0,.18), rgba(0,0,0,.18)),
      linear-gradient(
        90deg,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,.55) 45%,
        rgba(255,255,255,0) 100%
      );
  
    background-size: 100% 100%, 240px 100%;
    background-repeat: no-repeat, no-repeat;
    background-position: 0 0, -240px 0;
    animation: opzBtnSweep 1s ease-in-out infinite;
    pointer-events: none;
    mix-blend-mode: screen; /* effetto carino su bottoni scuri */
  }
  
  @keyframes opzBtnSweep {
    to { background-position: 0 0, calc(100% + 240px) 0; }
  }
  
  /* opzionale: leggero “ammorbidimento” del testo */
  #opz-pay.is-loading .opz-btn__label {
    opacity: 0.95;
  }
  

  @media (max-width: 720px) {
    .opz-paybox { flex-direction: column; align-items: stretch; }
    .opz-actions { justify-content: stretch; }
    .opz-btn { width: 100%; }
  }
  
  /* Footer note */
  .opz-wizard__foot {
    margin-top: 14px;
  }
  .opz-footnote {
    margin: 0;
    color: var(--opz-muted);
    font-size: 13px;
  }
  @media (max-width:720px){ .opz-steps-viewport{ min-height: 520px; } }