/* ============================================
   AllBest — Formular de Comandă (wizard)
   Se încarcă DUPĂ style.css. Folosește exclusiv
   variabilele definite acolo.
   ============================================ */

/* ===== LAYOUT ===== */
.wizard-grid {
    display: grid;
    grid-template-columns: 1.7fr 1fr;
    gap: 3.5rem;
    align-items: start;
    max-width: 1400px;
    margin: 0 auto;
}
.wizard-main { min-width: 0; }

/* ===== INDICATOR PAȘI ===== */
.wizard-progress { margin-bottom: 2.5rem; }
.wizard-progress-head {
    display: flex; justify-content: space-between; align-items: baseline;
    margin-bottom: 0.9rem;
}
.wizard-progress-count {
    font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em;
    font-weight: 700; color: var(--accent);
}
.wizard-progress-name { font-size: 0.85rem; color: var(--warm-gray); }
.wizard-bar { height: 4px; background: var(--light-border); border-radius: 99px; overflow: hidden; }
.wizard-bar-fill {
    height: 100%; width: 0; border-radius: 99px;
    background: var(--accent);
    transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.wizard-dots { display: flex; gap: 0.5rem; margin-top: 1.2rem; }
.wizard-dot {
    flex: 1; display: flex; flex-direction: column; align-items: stretch; gap: 0.5rem;
    font-size: 0.72rem; color: var(--warm-gray);
    text-align: left; letter-spacing: 0.03em;
    /* Resetul de buton — <button> nu moștenește fontul de la pagină. */
    background: none; border: 0; padding: 0;
    font-family: inherit; cursor: pointer;
}
.wizard-dot:hover { color: var(--ink); }
.wizard-dot:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
.wizard-dot::before {
    content: ''; display: block; height: 3px; border-radius: 99px;
    background: var(--light-border); transition: background 0.35s;
}
.wizard-dot.is-done::before { background: var(--olive); }
.wizard-dot.is-done { color: var(--olive); }
.wizard-dot.is-current::before { background: var(--accent); }
.wizard-dot.is-current { color: var(--ink); font-weight: 600; }

/* ===== PAȘI ===== */
.wizard-step { display: none; animation: fadeSlideUp 0.45s ease both; }
.wizard-step.is-active { display: block; }
.wizard-step > h2 {
    font-family: var(--serif); font-size: clamp(1.6rem, 3vw, 2.1rem);
    letter-spacing: -0.02em; margin-bottom: 0.5rem;
}
.wizard-step > h2 em { font-style: italic; color: var(--accent); }
.wizard-step > .step-hint {
    color: var(--warm-gray); font-size: 0.98rem; line-height: 1.65;
    margin-bottom: 2rem; max-width: 52ch;
}

.field-block { margin-bottom: 2.5rem; }
.field-block:last-child { margin-bottom: 0; }
.field-legend {
    display: block; font-family: var(--sans); font-weight: 600;
    font-size: 0.9rem; margin-bottom: 0.25rem; color: var(--ink);
}
.field-note {
    display: block; font-size: 0.85rem; color: var(--warm-gray);
    margin-bottom: 1rem; line-height: 1.55;
}
fieldset.field-block { border: 0; padding: 0; margin-inline: 0; }

/* ===== CARDURI OPȚIUNE (radio) ===== */
.option-grid { display: grid; gap: 0.85rem; }
.option-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.option-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.option-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.option { display: block; position: relative; }
.option-input {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.option-card {
    display: flex; flex-direction: column; gap: 0.3rem; height: 100%;
    padding: 1.15rem 1.25rem;
    background: var(--paper);
    border: 2px solid var(--light-border);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.25s, background 0.25s, box-shadow 0.25s, transform 0.25s;
}
.option-card:hover { border-color: var(--warm-gray); transform: translateY(-2px); }
.option-title { font-weight: 600; font-size: 0.98rem; line-height: 1.3; }
.option-note { font-size: 0.82rem; color: var(--warm-gray); line-height: 1.5; }
.option-icon { font-size: 1.4rem; margin-bottom: 0.15rem; }

.option-input:checked + .option-card {
    border-color: var(--accent);
    background: rgba(200, 55, 45, 0.045);
    box-shadow: 0 8px 24px rgba(200, 55, 45, 0.13);
}
.option-input:checked + .option-card .option-title { color: var(--accent-dark); }
.option-input:focus-visible + .option-card {
    outline: 3px solid rgba(200, 55, 45, 0.35);
    outline-offset: 3px;
}

/* Variantă compactă pentru dimensiuni */
.option-card.is-size .option-title { font-size: 0.92rem; }
.option-card.is-size .option-dims {
    font-family: var(--serif); font-size: 1.35rem; color: var(--ink);
    letter-spacing: -0.01em; line-height: 1;
}
.option-input:checked + .option-card.is-size .option-dims { color: var(--accent); }

.size-category {
    font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.11em;
    font-weight: 700; color: var(--warm-gray);
    margin: 1.6rem 0 0.75rem;
}
.size-category:first-of-type { margin-top: 0; }

/* Dimensiuni personalizate */
.custom-size {
    display: none; gap: 0.9rem; align-items: flex-end;
    margin-top: 1rem; padding: 1.2rem;
    background: var(--cream); border-radius: 12px;
}
.custom-size.is-open { display: flex; flex-wrap: wrap; }
.custom-size .form-group { margin-bottom: 0; }
.custom-size label { font-size: 0.8rem; }
.custom-size input { width: 110px; }
.custom-size .sep {
    font-family: var(--serif); font-size: 1.4rem;
    color: var(--warm-gray); padding-bottom: 0.6rem;
}

/* ===== NAVIGARE ===== */
.wizard-nav {
    display: flex; justify-content: space-between; align-items: center; gap: 1rem;
    margin-top: 2.75rem; padding-top: 1.75rem;
    border-top: 1px solid var(--light-border);
}
.wizard-nav .btn-back {
    background: none; border: none; cursor: pointer;
    font-family: var(--sans); font-size: 0.92rem; font-weight: 600;
    color: var(--warm-gray); padding: 0.7rem 0.2rem;
    transition: color 0.25s;
}
.wizard-nav .btn-back:hover { color: var(--ink); }
/* Pe primul pas butonul „Înapoi" dispare, dar își păstrează locul, ca să nu
   sară „Continuă" dintr-o parte în alta. `!important` e necesar de când
   `[hidden]` e forțat global în style.css. */
.wizard-nav .btn-back[hidden] { visibility: hidden; display: block !important; }

/* ===== EROARE VALIDARE ===== */
.step-error {
    display: none; align-items: center; gap: 0.6rem;
    margin-top: 1.5rem; padding: 0.9rem 1.1rem;
    background: rgba(200, 55, 45, 0.07);
    border-left: 3px solid var(--accent);
    border-radius: 8px;
    color: var(--accent-dark); font-size: 0.9rem; font-weight: 500;
}
.step-error.is-shown { display: flex; }
/* Semnul de avertizare e desenat din CSS, nu pus în text: JS-ul scrie mesajul
   cu textContent, deci orice glifă din șir ar fi ajuns și în cititorul de
   ecran, citită ca „triunghi de avertizare". */
.step-error.is-shown::before {
    content: ''; flex-shrink: 0; width: 18px; height: 18px; background: currentColor;
    -webkit-mask: var(--i-alert) center / contain no-repeat;
            mask: var(--i-alert) center / contain no-repeat;
}

/* ===== REZUMAT ===== */
.wizard-aside { position: sticky; top: 6.5rem; }
.summary-card {
    background: var(--cream);
    border-radius: 16px;
    padding: 1.9rem;
    border: 1px solid var(--light-border);
}
.summary-card h3 {
    font-family: var(--serif); font-size: 1.3rem;
    margin-bottom: 0.35rem; letter-spacing: -0.01em;
}
/* Indiciu vizibil mereu, nu doar la hover: pe telefon rezumatul e singura
   cale de întoarcere, iar acolo nu există hover. */
.summary-hint {
    font-size: 0.8rem; color: var(--warm-gray);
    line-height: 1.5; margin: 0 0 1.1rem;
}
.summary-list { list-style: none; margin: 0; padding: 0; }
.summary-list li { border-bottom: 1px solid var(--light-border); }
.summary-list li:last-child { border-bottom: none; }
/* Rândul e un buton pe toată lățimea; marginea negativă lasă fundalul de
   hover să depășească puțin textul, fără să miște bordura de jos. */
.summary-row {
    display: flex; justify-content: space-between; gap: 1rem; align-items: baseline;
    width: calc(100% + 1rem); margin-inline: -0.5rem;
    padding: 0.75rem 0.5rem;
    background: none; border: 0; border-radius: 8px;
    font: inherit; font-size: 0.9rem; color: inherit; text-align: left;
    cursor: pointer; transition: background 0.2s;
}
.summary-row:hover { background: rgba(10, 10, 10, 0.05); }
.summary-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.summary-list .k { color: var(--warm-gray); flex-shrink: 0; }
.summary-list .v { font-weight: 600; text-align: right; }
.summary-list .v.is-empty { color: var(--warm-gray); font-weight: 400; font-style: italic; }
.summary-foot {
    margin-top: 1.4rem; padding-top: 1.2rem;
    border-top: 1px solid var(--light-border);
    font-size: 0.85rem; color: var(--warm-gray); line-height: 1.6;
}
.summary-foot strong { color: var(--olive); font-weight: 600; }

/* ===== BLOC „CUM TRIMIȚI DESIGNUL" ===== */
.design-note {
    display: none; align-items: center; gap: 1.3rem;
    margin-top: 1.2rem; padding: 1.4rem 1.6rem;
    background: var(--ink); color: #fff; border-radius: 14px;
}
.design-note.is-open { display: flex; flex-wrap: wrap; }
.design-note p { font-size: 0.9rem; line-height: 1.6; color: rgba(255,255,255,0.65); margin: 0; flex: 1; min-width: 220px; }
.design-note strong { color: #fff; display: block; margin-bottom: 0.2rem; font-size: 0.98rem; }
.design-note a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }

/* ===== CONSIMȚĂMÂNT GDPR ===== */
/* Sub butonul de trimitere, nu deasupra: e o informare, nu o piedică. Nu are
   bifă — temeiul e interesul legitim de a răspunde la o cerere de ofertă, iar
   o casetă obligatorie ar fi doar o frecare în plus. */
.form-consent {
    margin-top: 1.25rem;
    font-size: 0.82rem; line-height: 1.6; color: var(--warm-gray);
}
.form-consent a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .wizard-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .wizard-aside { position: static; }
    /* Rezumatul apare doar pe ultimul pas pe ecrane mici */
    .wizard-aside { display: none; }
    .wizard-grid.on-last-step .wizard-aside { display: block; }
}
@media (max-width: 768px) {
    .option-grid.cols-3, .option-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
    .wizard-dots { display: none; }
    .custom-size { flex-direction: column; align-items: stretch; }
    .custom-size input { width: 100%; }
    .custom-size .sep { display: none; }
    .wizard-nav { flex-direction: column-reverse; align-items: stretch; }
    .wizard-nav .btn-primary { width: 100%; justify-content: center; }
    /* Pe telefon butoanele sunt stivuite, deci nu mai e nimic de aliniat:
       „Înapoi" chiar dispare. `!important` ca să bată regula de mai sus. */
    .wizard-nav .btn-back[hidden] { display: none !important; }
}
@media (max-width: 420px) {
    .option-grid.cols-2, .option-grid.cols-3, .option-grid.cols-4 { grid-template-columns: 1fr; }
}
