/* ═══════════════════════════════════════════════════════════════════════════
   Preventivo Ristrutturazione — wizard.css
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── CSS Variables ──────────────────────────────────────────────────────── */
.pr-wrap {
    --pr-stone:        #e8f5ef;
    --pr-cream:        #fbfefc;
    --pr-ink:          #1a1612;
    --pr-muted:        #7a6f62;
    --pr-accent:       #1e8935;
    --pr-accent-light: #a5d2b5;
    --pr-premium:      #2d3436;
    --pr-border:       #e0e0e0;
    --pr-success:      #2e7d32;
    --pr-error-color:  #c0392b;
    --pr-radius:       4px;
    --pr-bar-w:        20%;

    font-family: "Barlow", Sans-serif;
    font-size: 16px;
    color: var(--pr-ink);
    background: var(--pr-cream);
    border: 1px solid var(--pr-border);
    border-radius: 12px;
    max-width: 680px;
    margin: 2rem auto;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 4px 40px rgba(26, 22, 18, 0.10);
    position: relative;
}

/* ── Progress ────────────────────────────────────────────────────────────── */
.pr-progress {
    background: var(--pr-stone);
    padding: 1.5rem 2.5rem 1rem;
    border-bottom: 1px solid var(--pr-border);
}

.pr-progress-bar {
    height: 2px;
    background: var(--pr-border);
    border-radius: 2px;
    margin-bottom: 1rem;
    position: relative;
}

.pr-progress-bar::before {
    content: '';
    position: absolute;
    top: 0; left: 0; height: 100%;
    background: var(--pr-accent);
    border-radius: 2px;
    width: var(--pr-bar-w);
    transition: width .5s cubic-bezier(.4, 0, .2, 1);
}

.pr-steps-dots {
    display: flex;
    gap: .6rem;
}

.pr-dot {
    width: 26px; height: 26px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 500; letter-spacing: .03em;
    background: var(--pr-border);
    color: var(--pr-muted);
    transition: all .3s;
}

.pr-dot.active {
    background: var(--pr-accent);
    color: #fff;
    box-shadow: 0 2px 12px rgba(196, 136, 58, .35);
}

.pr-dot.done {
    background: var(--pr-ink);
    color: #fff;
}

/* ── Steps ───────────────────────────────────────────────────────────────── */
.pr-step {
    display: none;
    padding: 2.5rem;
    animation: prFadeIn .4s ease;
}

.pr-step.active { display: block; }

@keyframes prFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.pr-step-label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .15em;
    color: var(--pr-accent);
    text-transform: uppercase;
    margin-bottom: .75rem;
}

.pr-title {
    font-family: "Bebas Neue", Sans-serif;
    font-size: 2.6rem;
    font-weight: 400;
    line-height: 1.15;
    margin: 0 0 .6rem;
}

.pr-title em {
    font-style: italic;
    color: var(--pr-accent);
}

.pr-subtitle {
    font-size: .95rem;
    color: var(--pr-muted);
    margin: 0 0 2rem;
    font-weight: 300;
}

/* ── Fields ──────────────────────────────────────────────────────────────── */
.pr-fields { display: flex; flex-direction: column; gap: 1.4rem; margin-bottom: 2rem; }

.pr-field-row { display: flex; gap: 1.5rem; }
.pr-field-row .pr-field { flex: 1; min-width: 0; }

.pr-field label {
    display: block;
    font-size: .78rem;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--pr-muted);
    margin-bottom: .5rem;
}

.pr-req { color: var(--pr-accent); }

.pr-field input[type="text"],
.pr-field input[type="email"],
.pr-field input[type="tel"] {
    width: 100%;
    padding: .85rem 1rem;
    border: 1px solid var(--pr-border);
    border-radius: var(--pr-radius);
    background: #fff;
    font-family: "Barlow", Sans-serif;
    font-size: .95rem;
    color: var(--pr-ink);
    transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box;
    outline: none;
    -webkit-appearance: none;
}

.pr-field input:focus {
    border-color: var(--pr-accent);
    box-shadow: 0 0 0 3px var(--pr-accent-light);
}

/* ── Radio ───────────────────────────────────────────────────────────────── */
.pr-radio-group { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; row-gap: 1.5rem; }

.pr-radio { display: flex; align-items: center; cursor: pointer; }
.pr-radio input { display: none; }

.pr-radio span {
    padding: .55rem 1rem;
    border: 1px solid var(--pr-border);
    border-radius: 30px;
    font-size: .875rem;
    color: var(--pr-muted);
    transition: all .2s;
    background: #fff;
    user-select: none;
}

.pr-radio input:checked + span {
    background: var(--pr-ink);
    color: #fff;
    border-color: var(--pr-ink);
}

/* ── Counters ────────────────────────────────────────────────────────────── */
.pr-counter {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--pr-border);
    border-radius: var(--pr-radius);
    background: #fff;
    overflow: hidden;
}

.pr-counter-btn {
    background: none;
    border: none;
    width: 44px; height: 44px;
    font-size: 1.3rem;
    color: var(--pr-muted);
    cursor: pointer;
    transition: background .15s, color .15s;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.pr-counter-btn:hover { background: var(--pr-stone); color: var(--pr-ink); }

.pr-counter-val {
    min-width: 60px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--pr-ink);
    padding: 0 .25rem;
    border-left: 1px solid var(--pr-border);
    border-right: 1px solid var(--pr-border);
    line-height: 44px;
}

.pr-range-hint {
    font-size: .75rem;
    color: var(--pr-muted);
    margin-top: .4rem;
}

/* ── Checkboxes ──────────────────────────────────────────────────────────── */
.pr-checkboxes { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 2rem; }

.pr-check {
    display: flex; align-items: flex-start; gap: .9rem;
    cursor: pointer;
    padding: .75rem 1rem;
    border: 1px solid var(--pr-border);
    border-radius: var(--pr-radius);
    background: #fff;
    transition: border-color .2s, background .2s;
}

.pr-check:hover { border-color: var(--pr-accent-light); background: var(--pr-stone); }

.pr-check input { display: none; }

.pr-check-box {
    width: 20px; height: 20px; min-width: 20px;
    border: 2px solid var(--pr-border);
    border-radius: 3px;
    margin-top: 2px;
    transition: all .2s;
    position: relative;
    background: #fff;
    flex-shrink: 0;
}

.pr-check input:checked ~ .pr-check-box {
    background: var(--pr-accent);
    border-color: var(--pr-accent);
}

.pr-check input:checked ~ .pr-check-box::after {
    content: '';
    position: absolute;
    top: 2px; left: 5px;
    width: 5px; height: 9px;
    border: 2px solid #fff;
    border-top: none; border-left: none;
    transform: rotate(45deg);
}

.pr-check-label strong { display: block; font-size: .9rem; font-weight: 500; }
.pr-check-label small  { font-size: .78rem; color: var(--pr-muted); }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.pr-nav { display: flex; justify-content: flex-end; gap: 1rem; margin-top: 1.5rem; }
.pr-nav-two { justify-content: space-between; }

.pr-btn-next {
    background: var(--pr-ink);
    color: #fff;
    border: none;
    padding: .85rem 2rem;
    border-radius: 30px;
    font-family: "Barlow", Sans-serif;
    font-size: .9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background .2s, transform .15s, box-shadow .2s;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    line-height: 1;
}

.pr-btn-next:hover,
.pr-btn-next:focus {
    background: var(--pr-accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(196, 136, 58, .35);
}

.pr-btn-next:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
}

.pr-btn-back {
    background: none;
    color: var(--pr-muted);
    border: 1px solid var(--pr-border);
    padding: .85rem 1.5rem;
    border-radius: 30px;
    font-family: "Barlow", Sans-serif;
    font-size: .9rem;
    cursor: pointer;
    transition: all .2s;
    line-height: 1;
}

.pr-btn-back:hover { border-color: var(--pr-ink); color: var(--pr-ink); }

/* ── Error ───────────────────────────────────────────────────────────────── */
.pr-error {
    font-size: .82rem;
    color: var(--pr-error-color);
    margin-top: .75rem;
    min-height: 1.2em;
    font-weight: 400;
}

/* ── Results (step 4) ────────────────────────────────────────────────────── */
.pr-results {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0 1rem;
}

.pr-result-card {
    border-radius: 8px;
    padding: 1.5rem;
}

.pr-card-standard {
    background: var(--pr-stone);
    border: 1px solid var(--pr-border);
}

.pr-card-premium {
    background: var(--pr-premium);
    color: #fff;
}

.pr-card-badge {
    font-size: .7rem;
    font-weight: 500;
    letter-spacing: .15em;
    text-transform: uppercase;
    margin-bottom: .75rem;
}

.pr-card-standard .pr-card-badge { color: var(--pr-muted); }
.pr-card-premium  .pr-card-badge { color: var(--pr-accent); }

.pr-card-from {
    font-size: .72rem;
    font-weight: 300;
    margin-bottom: .15rem;
    opacity: .7;
}

.pr-card-price {
    font-family: "Bebas Neue", Sans-serif;
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.pr-card-standard .pr-card-price { color: var(--pr-ink); }
.pr-card-premium  .pr-card-price { color: #fff; }

.pr-card-features {
    list-style: none;
    padding: 0; margin: 0;
    display: flex; flex-direction: column; gap: .35rem;
}

.pr-card-features li {
    font-size: .78rem;
    font-weight: 300;
    opacity: .8;
    padding-left: 1rem;
    position: relative;
}

.pr-card-features li::before {
    content: '—';
    position: absolute;
    left: 0;
    opacity: .5;
}

.pr-disclaimer {
    font-size: .75rem;
    color: var(--pr-muted);
    text-align: center;
    line-height: 1.5;
    margin: 0;
}

/* ── CTA box (step 4) ─────────────────────────────────────────────────────── */
.pr-cta-box {
    margin-top: 1.75rem;
    padding: 1.5rem;
    background: var(--pr-stone);
    border: 1px solid var(--pr-border);
    border-radius: 8px;
    text-align: center;
}

.pr-cta-title {
    font-family: "Bebas Neue", Sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0 0 .4rem;
    color: var(--pr-ink);
}

.pr-cta-sub {
    font-size: .88rem;
    color: var(--pr-muted);
    margin: 0 0 1.25rem;
}

/* ── Privacy note ─────────────────────────────────────────────────────────── */
.pr-privacy-note {
    font-size: .75rem;
    color: var(--pr-muted);
    margin: -.5rem 0 1rem;
    line-height: 1.5;
}

/* ── Success (step 6) ────────────────────────────────────────────────────── */
.pr-success-wrap { text-align: center; padding: 1rem 0 .5rem; }

.pr-success-icon {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: var(--pr-ink);
    color: #fff;
    font-size: 2rem;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 4px 20px rgba(26, 22, 18, .2);
    animation: prPopIn .5s cubic-bezier(.34, 1.56, .64, 1);
}

@keyframes prPopIn {
    from { transform: scale(.4); opacity: 0; }
    to   { transform: scale(1);  opacity: 1; }
}

/* ── Loader ──────────────────────────────────────────────────────────────── */
.pr-loader {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(250, 248, 244, .92);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    z-index: 10;
    backdrop-filter: blur(4px);
}

.pr-loader.active { display: flex; }
.pr-loader p { font-size: .9rem; color: var(--pr-muted); margin: 0; }

.pr-loader-ring {
    width: 44px; height: 44px;
    border: 3px solid var(--pr-border);
    border-top-color: var(--pr-accent);
    border-radius: 50%;
    animation: prSpin .8s linear infinite;
}

@keyframes prSpin { to { transform: rotate(360deg); } }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 520px) {
    .pr-step     { padding: 1.75rem 1.25rem; }
    .pr-progress { padding: 1.25rem 1.25rem .75rem; }
    .pr-title    { font-size: 2rem; }
    .pr-results  { grid-template-columns: 1fr; }
    .pr-field-row { flex-direction: column; }
    .pr-nav-two  { flex-direction: column-reverse; gap: .75rem; }
    .pr-btn-next,
    .pr-btn-back { width: 100%; justify-content: center; }
}

/* ── Input numerico diretto dentro il counter (solo mq) ─────────────────── */
.pr-counter-input {
    width: 72px;
    height: 44px;
    border: none;
    border-left: 1px solid var(--pr-border);
    border-right: 1px solid var(--pr-border);
    text-align: center;
    font-family: "Barlow", Sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--pr-ink);
    background: #fff;
    outline: none;
    padding: 0;
    -moz-appearance: textfield; /* nasconde frecce Firefox */
}

.pr-counter-input::-webkit-inner-spin-button,
.pr-counter-input::-webkit-outer-spin-button {
    -webkit-appearance: none; /* nasconde frecce Chrome/Safari */
    margin: 0;
}

.pr-counter-input:focus {
    background: var(--pr-accent-light);
}