/* ==========================================================
Reversing Accident Advisor Wizard — Theme Integration
سازگار با متغیرها و استانداردهای blog.css
========================================================== */

.wiz-wrap {
    width: 100%;
    max-width: 100%;
    margin: 0 0 32px 0;
    padding: 0;
    font-family: var(--font-sans, "Estedad", Tahoma, sans-serif);
    color: var(--color-ink, #1e293b);
}

/* هدر و معرفی */
.wiz-hero {
    margin-bottom: 24px;
}
.wiz-hero-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    font-size: 24px;
    background-color: color-mix(in oklab, var(--color-accent, #ff4b1f) 8%, white);
    border: 1px solid var(--color-soft, #ffb8a6);
    border-radius: 12px;
    margin-bottom: 12px;
}
.wiz-hero h1 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-ink, #1e293b);
    margin: 0 0 10px 0;
    line-height: 1.4;
}
@media (min-width: 640px) {
    .wiz-hero h1 {
        font-size: 1.75rem;
    }
}
.wiz-hero p {
    font-size: 14px;
    line-height: 1.8;
    color: var(--color-muted, #475569);
    max-width: 720px;
    margin: 0 auto; /* متن توضیحات در مرکز خوانا بماند */
}

/* کادر اصلی ویزارد */
.wiz-card, #resultBox {
    width: 100%;
    background: #ffffff;
    border: 1px solid var(--color-line, #ede8e3);
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(30, 41, 59, 0.04);
    overflow: hidden;
}

/* نوار پیشرفت بالا */
.wiz-progress-track {
    height: 4px;
    background-color: var(--color-line, #ede8e3);
    width: 100%;
    overflow: hidden;
}
.wiz-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(to left, var(--color-accent, #ff4b1f), #fca311);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* نوار اطلاعات بالای فرم */
.wiz-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid var(--color-line, #ede8e3);
    background: var(--color-bgTheme, #fffff7);
}
.wiz-step-badge {
    font-size: 11.5px;
    font-weight: 800;
    color: var(--color-accent, #ff4b1f);
    background: color-mix(in oklab, var(--color-accent, #ff4b1f) 10%, white);
    padding: 3px 9px;
    border-radius: 6px;
}

/* بدنه سوالات */
.wiz-step-inner {
    padding: 24px 20px;
}
@media (min-width: 640px) {
    .wiz-step-inner {
        padding: 32px 28px;
    }
}

.wiz-hint {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--color-accent, #ff4b1f);
    margin-bottom: 8px;
}
.wiz-q {
    font-size: 16.5px;
    font-weight: 800;
    line-height: 1.6;
    color: var(--color-ink, #1e293b);
    margin: 0 0 20px 0;
}
@media (min-width: 640px) {
    .wiz-q { font-size: 18px; }
}

/* لیست گزینه‌ها */
.wiz-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.wiz-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    background: #ffffff;
    border: 1px solid var(--color-line, #ede8e3);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    user-select: none;
    position: relative;
}
.wiz-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.wiz-option:hover {
    border-color: var(--color-soft, #ffb8a6);
    background-color: var(--color-bgTheme, #fffff7);
}
.wiz-option.selected,
.wiz-option:has(input[type="radio"]:checked) {
    border-color: var(--color-accent, #ff4b1f);
    background-color: color-mix(in oklab, var(--color-accent, #ff4b1f) 4%, white);
    box-shadow: 0 0 0 1px var(--color-accent, #ff4b1f);
}

/* دایره رادیوباتن سفارشی */
.wiz-radio-circle {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all 0.2s ease;
    background: #ffffff;
}
.wiz-radio-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-accent, #ff4b1f);
    transform: scale(0);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.wiz-option.selected .wiz-radio-circle,
.wiz-option:has(input[type="radio"]:checked) .wiz-radio-circle {
    border-color: var(--color-accent, #ff4b1f);
}
.wiz-option.selected .wiz-radio-dot,
.wiz-option:has(input[type="radio"]:checked) .wiz-radio-dot {
    transform: scale(1);
}

/* متن گزینه‌ها */
.wiz-otext {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.wiz-olabel {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--color-ink, #1e293b);
    line-height: 1.5;
}
.wiz-odesc {
    font-size: 12px;
    color: var(--color-muted, #475569);
    line-height: 1.6;
}

/* ورودی عددی/مبلغ */
.wiz-numwrap input {
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--color-line, #ede8e3);
    background-color: #ffffff;
    padding: 10px 14px;
    font-size: 15px;
    text-align: left;
    direction: ltr;
    outline: none;
    font-variant-numeric: tabular-nums;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.wiz-numwrap input:focus {
    border-color: var(--color-accent, #ff4b1f);
    box-shadow: 0 0 0 3px color-mix(in oklab, var(--color-soft, #ffb8a6) 60%, transparent);
}
.wiz-skip-note {
    font-size: 11.5px;
    color: var(--color-hint, #a39e9d);
    margin-top: 8px;
    margin-bottom: 0;
}

/* نوار دکمه‌های ناوبری پایین */
.wiz-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px;
    border-top: 1px solid var(--color-line, #ede8e3);
    background-color: var(--color-bgTheme, #fffff7);
}
.wiz-nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* دکمه‌ها منطبق با blog.css */
.wiz-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 16px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.wiz-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed !important;
}
.wiz-btn-primary {
    background-color: var(--color-accent, #ff4b1f);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(255, 75, 31, 0.2);
}
.wiz-btn-primary:hover:not(:disabled) {
    background-color: color-mix(in oklab, var(--color-accent, #ff4b1f) 88%, black);
}
.wiz-btn-ghost {
    background-color: transparent;
    color: var(--color-muted, #475569);
}
.wiz-btn-ghost:hover:not(:disabled) {
    color: var(--color-ink, #1e293b);
    background-color: rgba(0, 0, 0, 0.04);
}

/* خطاها و پیام‌ها */
.step.has-error .wiz-step-inner {
    border-right: 3px solid #ef4444;
}
.q-error {
    font-size: 12px;
    font-weight: 600;
    color: #b91c1c;
    background-color: #fef2f2;
    border: 1px solid #fee2e2;
    padding: 8px 12px;
    border-radius: 6px;
    margin: 0 0 14px 0;
}
.error-banner {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 12.5px;
    margin: 14px;
}

/* باکس نتایج لود شده از سرور */
#resultBox {
    padding: 24px 20px;
}
@media (min-width: 640px) {
    #resultBox { padding: 32px 28px; }
}

/* ==========================================================
Wizard Result & Error Styles — Theme Integration
========================================================== */

.wizard-result {
    display: flex;
    flex-direction: column;
    gap: 20px;
    font-family: var(--font-sans, "Estedad", Tahoma, sans-serif);
    color: var(--color-ink, #1e293b);
}

/* ----------------- باکس خلاصه حکم (Verdict) ----------------- */
.verdict {
    display: flex;
    gap: 16px;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--color-line, #ede8e3);
    border-right-width: 5px;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(30, 41, 59, 0.04);
}

/* وضعیت: مقصر (Bad) */
.verdict.bad {
    border-right-color: var(--color-accent, #ff4b1f);
    background: color-mix(in oklab, var(--color-accent, #ff4b1f) 3%, white);
}
.verdict.bad .v-icon {
    background: color-mix(in oklab, var(--color-accent, #ff4b1f) 12%, white);
    color: var(--color-accent, #ff4b1f);
    border: 1px solid color-mix(in oklab, var(--color-accent, #ff4b1f) 25%, white);
}

/* وضعیت: غیرمقصر (Good) */
.verdict.good {
    border-right-color: #059669;
    background: color-mix(in oklab, #059669 3%, white);
}
.verdict.good .v-icon {
    background: #d1fae5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.v-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    font-size: 24px;
    border-radius: 10px;
    flex-shrink: 0;
}

.v-main {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
.v-title {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.5;
    color: var(--color-ink, #1e293b);
}
@media (min-width: 640px) {
    .v-title { font-size: 18px; }
}
.v-sub {
    font-size: 13px;
    line-height: 1.7;
    color: var(--color-muted, #475569);
}
.v-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}
.vtag {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    background: #ffffff;
    border: 1px solid var(--color-line, #ede8e3);
    color: var(--color-ink, #1e293b);
}
.verdict.bad .vtag {
    border-color: color-mix(in oklab, var(--color-accent, #ff4b1f) 25%, white);
    color: var(--color-accent, #ff4b1f);
}
.verdict.good .vtag {
    border-color: #a7f3d0;
    color: #059669;
}

/* ----------------- خلاصه پاسخ‌های کاربر (Recap) ----------------- */
.recap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--color-bgTheme, #fffff7);
    border: 1px dashed var(--color-line, #ede8e3);
    border-radius: 8px;
    font-size: 12px;
}
.recap-title {
    font-weight: 700;
    color: var(--color-muted, #475569);
}
.chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    background: #ffffff;
    border: 1px solid #d6d3d1;
    border-radius: 6px;
    color: var(--color-ink, #1e293b);
    font-size: 11.5px;
    font-weight: 600;
}

/* ----------------- کارت‌های تفصیلی نتیجه (RCard) ----------------- */
.rcard {
    background: #ffffff;
    border: 1px solid var(--color-line, #ede8e3);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.rcard h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15.5px;
    font-weight: 800;
    color: var(--color-ink, #1e293b);
    margin: 0 0 14px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-line, #ede8e3);
}
.rcard h3 .ric {
    font-size: 18px;
}

.rbody {
    font-size: 13.5px;
    line-height: 1.9;
    color: var(--color-ink, #1e293b);
}
.rbody p {
    margin: 0 0 12px 0;
}
.rbody p:last-child {
    margin-bottom: 0;
}
.rbody ol, .rbody ul {
    margin: 10px 0 14px 0;
    padding-right: 20px;
}
.rbody li {
    margin-bottom: 6px;
    line-height: 1.8;
}

/* هایلایت شبیه update-box تم */
.rbody .hl {
    position: relative;
    margin: 14px 0;
    padding: 12px 16px;
    border: 1px solid color-mix(in oklab, var(--color-accent, #ff4b1f) 20%, transparent);
    border-right: 4px solid var(--color-accent, #ff4b1f);
    background: color-mix(in oklab, var(--color-accent, #ff4b1f) 5%, white);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-ink, #1e293b);
}

/* یادداشت فرعی شبیه blockquote تم */
.rbody .note {
    margin: 14px 0;
    padding: 10px 14px;
    border-right: 3px solid var(--color-muted, #475569);
    background: rgba(0, 0, 0, 0.02);
    border-radius: 0 6px 6px 0;
    font-size: 12.5px;
    color: var(--color-muted, #475569);
}

/* جدول داخل نتایج (مطابق با جداول blog.css) */
.rcard .tbl {
    width: 100%;
    margin: 16px 0;
    border-collapse: collapse;
    font-size: 12.5px;
    border: 1px solid var(--color-line, #ede8e3);
    border-radius: 6px;
    overflow: hidden;
}
@media (min-width: 640px) {
    .rcard .tbl { font-size: 13.5px; }
}
.rcard .tbl thead {
    background: rgba(0, 0, 0, 0.03);
    border-bottom: 2px solid var(--color-accent, #ff4b1f);
}
.rcard .tbl th {
    padding: 10px 12px;
    font-weight: 700;
    color: var(--color-ink, #1e293b);
    border: 1px solid var(--color-line, #ede8e3);
    text-align: right;
}
.rcard .tbl td {
    padding: 10px 12px;
    border: 1px solid var(--color-line, #ede8e3);
    color: var(--color-muted, #475569);
    line-height: 1.6;
}
.rcard .tbl tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.015);
}
.rcard .tbl tr.pay {
    background: color-mix(in oklab, var(--color-accent, #ff4b1f) 8%, white);
    font-weight: 700;
    color: var(--color-ink, #1e293b);
}

/* ----------------- دکمه‌های اقدام نهایی ----------------- */
.result-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding-top: 16px;
    border-top: 1px solid var(--color-line, #ede8e3);
}
.result-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 40px;
    padding: 0 16px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}
.result-actions .btn.primary {
    background-color: var(--color-accent, #ff4b1f);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(255, 75, 31, 0.2);
}
.result-actions .btn.primary:hover {
    background-color: color-mix(in oklab, var(--color-accent, #ff4b1f) 88%, black);
}
.result-actions .btn.ghost {
    background-color: rgba(0, 0, 0, 0.04);
    color: var(--color-muted, #475569);
}
.result-actions .btn.ghost:hover {
    background-color: rgba(0, 0, 0, 0.08);
    color: var(--color-ink, #1e293b);
}

/* سلب مسئولیت */
.wizard-result .disclaimer {
    font-size: 11.5px;
    line-height: 1.8;
    color: var(--color-hint, #a39e9d);
    margin: 10px 0 0 0;
    padding-top: 12px;
    border-top: 1px dashed var(--color-line, #ede8e3);
}

/* لیست خطاهای داخل بنر ارور */
.error-banner ul {
    margin: 8px 0 0 0;
    padding-right: 20px;
    font-size: 12.5px;
}
.error-banner li {
    margin-bottom: 4px;
}

/* استایل پرینت اختصاصی */
@media print {
    .result-actions, .wiz-nav, .wiz-progress-track {
        display: none !important;
    }
    .wiz-card, #resultBox, .rcard, .verdict {
        border: 1px solid #ccc !important;
        box-shadow: none !important;
    }
}

/* ----------------------- */
/* ==========================================================
باکس معرفی و سلب مسئولیت بالای ابزار (مشابه محاسبه‌گر افت قیمت)
========================================================== */

.wiz-info-banner {
    width: 100%;
    margin-bottom: 24px;
    padding: 16px;
    background: #f8fafc; /* پس‌زمینه بسیار روشن و خنک */
    border: 1px solid var(--color-line, #ede8e3);
    border-radius: 12px;
    text-align: right;
    box-sizing: border-box;
}

@media (min-width: 640px) {
    .wiz-info-banner {
        padding: 20px 22px;
    }
}

/* بخش متن معرفی و آیکون */
.wiz-info-main {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
}

.wiz-info-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    margin-top: 2px;
    color: #0284c7; /* آبی خنک مشابه آیکون تصویر دوم */
}

.wiz-info-icon svg {
    width: 100%;
    height: 100%;
}

.wiz-info-text {
    margin: 0;
    font-size: 13px;
    line-height: 1.8;
    color: var(--color-ink, #1e293b);
}

@media (min-width: 640px) {
    .wiz-info-text {
        font-size: 13.5px;
    }
}

/* کادر درونی سلب مسئولیت با پس‌زمینه گرم و هشدار ملایم */
.wiz-disclaimer-box {
    background: #fffdfa; /* پس‌زمینه کرم/عسلی خیلی ملایم */
    border: 1px solid #fed7aa; /* بوردر ملایم متمایل به رنگ شاخص سایت */
    border-radius: 8px;
    padding: 12px 16px;
}

.wiz-disclaimer-box p {
    margin: 0;
    font-size: 12px;
    line-height: 1.85;
    color: #78350f;
    text-align: justify;
    max-width: 100% !important;
    width: 100%;
}

@media (min-width: 640px) {
    .wiz-disclaimer-box p {
        font-size: 12.5px;
    }
}

.wiz-disclaimer-box strong {
    color: #9a3412; /* تاکید با رنگ قرمز/آجری تیره‌تر */
    font-weight: 800;
}

#inp_damage_amount:focus::placeholder {
    color: transparent;
}