/* ─────────────────────────────────────────────────────────────
   فرم مرحله‌ای برآورد قیمت — فقط در /request-customer بارگذاری می‌شود.
   توکن‌های رنگ در custom.css تعریف شده‌اند. «لبه‌ی تخته» (--ply-layers)
   عمداً اینجا به کار نرفته — جایش فقط همان سه جای تعریف‌شده است.
   ───────────────────────────────────────────────────────────── */

.rq-intro {
    max-width: 760px;
}

.rq-intro .lead {
    margin-bottom: 34px;
}

.rq-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 28px;
    align-items: start;
}

/* ── کارت فرم ──
   overflow نمی‌گیرد: hidden کارت را ظرف اسکرول می‌کند و نوار دکمه‌های
   چسبان پایین از کار می‌افتد. */
.rq-card {
    position: relative;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.rq-head {
    padding: 22px 28px 0;
}

.rq-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 13.5px;
}

.rq-count {
    font-weight: bold;
    color: var(--ink-2);
}

.rq-saved {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--ink-3);
}

.rq-saved.is-saved {
    color: #1F7A4D;
}

.rq-saved.is-saved::before {
    content: '✓';
    font-weight: bold;
}

.rq-saved.is-saving::before {
    content: '';
    width: 11px;
    height: 11px;
    border: 2px solid var(--brand-tint);
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: rq-spin .8s linear infinite;
}

.rq-progress {
    height: 6px;
    overflow: hidden;
    border-radius: 99px;
    background: var(--ground);
}

.rq-progress span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(to left, var(--brand), #A24FD6);
    transition: width .45s cubic-bezier(.2, .7, .2, 1);
}

.rq-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 16px;
    margin: 18px 28px 0;
    padding: 11px 16px;
    background: var(--brand-soft);
    border: 1px solid var(--brand-tint);
    border-radius: var(--radius-sm);
    font-size: 14px;
    line-height: 1.9;
    color: var(--ink);
}

.rq-banner button {
    padding: 0;
    border: 0;
    background: none;
    font-weight: bold;
    color: var(--brand);
    text-decoration: underline;
    text-underline-offset: 5px;
}

.rq-banner.is-warn {
    background: #FFF7EB;
    border-color: #F2D6A2;
}

.rq-body {
    min-height: 380px;
    padding: 30px 28px 10px;
}

.rq-title {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 900;
    line-height: 1.7;
    color: var(--ink);
}

.rq-title:focus {
    outline: none;
}

.rq-hint {
    margin: 0 0 22px;
    font-size: 14.5px;
    line-height: 2;
    color: var(--ink-3);
}

/* ── گزینه‌ها: کارت‌های قابل انتخاب ── */
.rq-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.rq-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 66px;
    margin: 0;
    padding: 14px 16px;
    background: #fff;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    cursor: pointer;
    user-select: none;
    transition: border-color .2s, background-color .2s, box-shadow .2s, transform .2s;
}

.rq-option:hover {
    border-color: var(--brand-tint);
    box-shadow: 0 6px 16px rgba(30, 15, 43, .06);
    transform: translateY(-1px);
}

/* ورودی واقعی می‌ماند (کیبورد و صفحه‌خوان)، فقط دیده نمی‌شود */
.rq-option input,
.rq-chip input,
.rq-file {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}

.rq-mark {
    position: relative;
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    background: #fff;
    border: 2px solid #CFC6D8;
    border-radius: 50%;
    transition: background-color .2s, border-color .2s;
}

.rq-option input[type="checkbox"] + .rq-mark {
    border-radius: 7px;
}

.rq-mark::after {
    content: '';
    position: absolute;
    inset: 0;
    width: 10px;
    height: 6px;
    margin: auto;
    border-bottom: 2.2px solid #fff;
    border-left: 2.2px solid #fff;
    opacity: 0;
    transform: translateY(-1px) rotate(-45deg) scale(.4);
    transition: opacity .2s, transform .2s;
}

.rq-option.is-checked {
    background: var(--brand-soft);
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(117, 0, 171, .08);
}

.rq-option.is-checked .rq-mark {
    background: var(--brand);
    border-color: var(--brand);
}

.rq-option.is-checked .rq-mark::after {
    opacity: 1;
    transform: translateY(-1px) rotate(-45deg) scale(1);
}

.rq-option input:focus-visible + .rq-mark {
    outline: 3px solid var(--brand-tint);
    outline-offset: 3px;
}

.rq-option-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    line-height: 1.75;
}

.rq-option-text strong {
    font-size: 15.5px;
    color: var(--ink);
}

.rq-option-text small {
    font-size: 13px;
    color: var(--ink-3);
}

.rq-other {
    margin-top: 12px;
}

/* ── فیلدها ── */
.rq-input {
    min-height: 52px;
    font-size: 15px;
}

textarea.rq-input {
    min-height: 112px;
    line-height: 2;
    resize: vertical;
}

.rq-ltr,
.rq-ltr::placeholder {
    direction: ltr;
    text-align: right;
    letter-spacing: .5px;
}

.rq-label {
    display: block;
    margin: 24px 0 8px;
    font-size: 14.5px;
    font-weight: bold;
    color: var(--ink);
}

.rq-label small {
    font-weight: normal;
    color: var(--ink-3);
}

.rq-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 14px;
}

.rq-fields .rq-label {
    margin-top: 0;
}

/* ── چیپ‌ها ── */
.rq-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.rq-chip {
    position: relative;
    margin: 0;
    cursor: pointer;
}

.rq-chip span {
    display: inline-flex;
    align-items: center;
    min-height: 46px;
    padding: 0 22px;
    background: #fff;
    border: 1.5px solid var(--line);
    border-radius: 99px;
    font-size: 15px;
    font-weight: bold;
    color: var(--ink-2);
    transition: background-color .2s, border-color .2s, color .2s;
}

.rq-chip:hover span {
    border-color: var(--brand-tint);
}

.rq-chip.is-checked span {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.rq-chip input:focus-visible + span {
    outline: 3px solid var(--brand-tint);
    outline-offset: 2px;
}

/* ── عکس ── */
.rq-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    margin: 0;
    padding: 28px 16px;
    background: var(--ground);
    border: 2px dashed #CFC6D8;
    border-radius: 14px;
    text-align: center;
    color: var(--ink-2);
    cursor: pointer;
    transition: background-color .2s, border-color .2s;
}

.rq-drop svg {
    margin-bottom: 6px;
    color: var(--brand);
}

.rq-drop strong {
    font-size: 15.5px;
    color: var(--ink);
}

.rq-drop span,
.rq-drop small {
    font-size: 13px;
    color: var(--ink-3);
}

.rq-drop:hover,
.rq-drop.is-over {
    background: var(--brand-soft);
    border-color: var(--brand);
}

.rq-drop.is-full {
    opacity: .5;
    pointer-events: none;
}

.rq-file:focus-visible + .rq-drop {
    outline: 3px solid var(--brand-tint);
    outline-offset: 3px;
}

.rq-note {
    margin: 10px 0 0;
    font-size: 13.5px;
    line-height: 1.9;
    color: #9A5B00;
}

.rq-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.rq-photos:empty {
    display: none;
}

.rq-photo {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--ground);
    border: 1px solid var(--line);
    border-radius: 10px;
}

.rq-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rq-photo.is-uploading img {
    opacity: .55;
}

.rq-photo-bar {
    position: absolute;
    right: 8px;
    bottom: 8px;
    left: 8px;
    height: 5px;
    overflow: hidden;
    border-radius: 99px;
    background: rgba(255, 255, 255, .8);
}

.rq-photo-bar i {
    display: block;
    width: 0;
    height: 100%;
    background: var(--brand);
    transition: width .2s;
}

.rq-photo-remove {
    position: absolute;
    top: 6px;
    left: 6px;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    padding: 0 0 3px;
    border: 0;
    border-radius: 50%;
    background: rgba(30, 15, 43, .72);
    font-size: 19px;
    line-height: 1;
    color: #fff;
}

.rq-photo-remove:hover {
    background: #B42318;
}

.rq-photo.is-failed {
    border-color: #F1B0A8;
}

.rq-photo.is-failed::after {
    content: 'ناموفق';
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 2px;
    background: rgba(180, 35, 24, .88);
    font-size: 12px;
    text-align: center;
    color: #fff;
}

/* ── خلاصه ── */
.rq-summary {
    margin-top: 28px;
    background: var(--ground);
    border: 1px solid var(--line);
    border-radius: 12px;
}

.rq-summary-head {
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
    font-weight: bold;
    color: var(--ink-2);
}

.rq-summary dl {
    margin: 0;
    padding: 2px 16px;
}

.rq-sum-row {
    display: grid;
    grid-template-columns: minmax(0, 36%) minmax(0, 1fr) auto;
    grid-template-areas: "q a e";
    gap: 2px 12px;
    align-items: baseline;
    padding: 10px 0;
    border-bottom: 1px dashed var(--line);
    font-size: 14px;
    line-height: 1.9;
}

.rq-sum-row:last-child {
    border-bottom: 0;
}

.rq-sum-row dt {
    grid-area: q;
    font-weight: normal;
    color: var(--ink-3);
}

.rq-sum-row dd {
    grid-area: a;
    margin: 0;
    font-weight: bold;
    color: var(--ink);
    overflow-wrap: anywhere;
}

.rq-sum-row dd.is-empty {
    font-weight: normal;
    color: #B42318;
}

.rq-sum-edit {
    grid-area: e;
    padding: 0;
    border: 0;
    background: none;
    font-size: 13px;
    font-weight: bold;
    color: var(--brand);
}

.rq-sum-edit:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.rq-privacy {
    margin: 14px 0 0;
    font-size: 13px;
    color: var(--ink-3);
}

.rq-error {
    margin: 14px 0 0;
    padding: 10px 14px;
    background: #FEF3F2;
    border: 1px solid #FBD5D0;
    border-radius: var(--radius-sm);
    font-size: 14px;
    line-height: 1.9;
    color: #B42318;
    animation: rq-nudge .35s ease;
}

/* ── دکمه‌های پایین — روی موبایل هنگام اسکرول مرحله‌های بلند پایین می‌چسبد ── */
.rq-nav {
    position: sticky;
    bottom: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 28px;
    background: rgba(255, 255, 255, .96);
    border-top: 1px solid var(--line);
    border-radius: 0 0 17px 17px;
    backdrop-filter: blur(6px);
}

.rq-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 48px;
    padding: 0 12px;
    border: 0;
    border-radius: var(--radius-sm);
    background: none;
    font-size: 14.5px;
    font-weight: bold;
    color: var(--ink-2);
}

.rq-back:hover {
    background: var(--ground);
    color: var(--ink);
}

.rq-back.is-hidden {
    visibility: hidden;
}

.rq-next {
    gap: 8px;
    min-width: 190px;
}

.rq-next.is-busy {
    opacity: .85;
    pointer-events: none;
}

.rq-next.is-busy svg {
    display: none;
}

.rq-next.is-busy::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, .4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: rq-spin .8s linear infinite;
}

/* ── پس از ثبت ── */
.rq-done {
    padding: 52px 28px 48px;
    text-align: center;
}

.rq-done-icon {
    display: grid;
    place-items: center;
    width: 78px;
    height: 78px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: #E8F6EE;
    color: #1F7A4D;
    animation: rq-pop .5s cubic-bezier(.2, 1.4, .4, 1);
}

.rq-done p {
    max-width: 470px;
    margin: 0 auto 10px;
    line-height: 2.1;
    color: var(--ink-2);
}

.rq-ref strong {
    font-size: 19px;
    color: var(--ink);
}

.rq-done-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 26px;
}

/* ── ستون کناری ── */
.rq-aside {
    position: sticky;
    top: 96px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rq-box {
    margin: 0;
    padding: 20px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.rq-aside-title {
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: bold;
    color: var(--ink-3);
}

.rq-stepper {
    margin: 0;
    padding: 0;
    list-style: none;
}

.rq-stepper li {
    position: relative;
}

/* خط رابط میان شماره‌ها */
.rq-stepper li:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 40px;
    right: 22px;
    bottom: -6px;
    width: 2px;
    background: var(--line);
}

.rq-stepper li.is-done:not(:last-child)::after {
    background: var(--brand-tint);
}

.rq-stepper button {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    padding: 8px;
    border: 0;
    border-radius: 10px;
    background: none;
    text-align: right;
    color: var(--ink-3);
}

.rq-stepper button:not(:disabled):hover {
    background: var(--ground);
}

.rq-stepper button:disabled {
    cursor: default;
}

.rq-num {
    position: relative;
    z-index: 1;
    display: grid;
    flex: 0 0 30px;
    place-items: center;
    width: 30px;
    height: 30px;
    background: #fff;
    border: 1.5px solid var(--line);
    border-radius: 50%;
    font-size: 13px;
    font-weight: bold;
}

.rq-stepper .is-current .rq-num {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    box-shadow: 0 0 0 4px var(--brand-soft);
}

.rq-stepper .is-done .rq-num {
    background: var(--brand-soft);
    border-color: var(--brand-tint);
    color: var(--brand);
}

.rq-step-txt {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding-top: 3px;
    line-height: 1.7;
}

.rq-step-txt b {
    display: -webkit-box;
    overflow: hidden;
    font-size: 13.5px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.rq-stepper .is-current b,
.rq-stepper .is-done b {
    color: var(--ink);
}

.rq-step-txt small {
    overflow: hidden;
    font-size: 12.5px;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--ink-3);
}

.rq-terms {
    display: flex;
    flex-direction: column;
    gap: 14px;
    list-style: none;
}

.rq-terms li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.rq-terms svg {
    flex: 0 0 auto;
    margin-top: 4px;
    color: var(--brand);
}

.rq-terms div {
    display: flex;
    flex-direction: column;
    line-height: 1.8;
}

.rq-terms strong {
    font-size: 14px;
    color: var(--ink);
}

.rq-terms span {
    font-size: 13px;
    color: var(--ink-3);
}

.rq-call {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: var(--brand-soft);
    border-color: var(--brand-tint);
    text-align: center;
}

.rq-call span {
    font-size: 14px;
    color: var(--ink-2);
}

.rq-call a {
    font-size: 21px;
    font-weight: 900;
    letter-spacing: .5px;
    color: var(--brand);
}

.rq-call small {
    font-size: 12.5px;
    color: var(--ink-3);
}

.rq-page .hub-body {
    margin-top: 72px;
}

/* ── حرکت میان مرحله‌ها — در راست‌به‌چپ «جلو» یعنی به سمت چپ ──
   prefers-reduced-motion در custom.css همه‌ی این‌ها را خاموش می‌کند. */
.rq-step.is-fwd {
    animation: rq-in-fwd .32s ease both;
}

.rq-step.is-back {
    animation: rq-in-back .32s ease both;
}

@keyframes rq-in-fwd {
    from { opacity: 0; transform: translateX(-18px); }
    to { opacity: 1; transform: none; }
}

@keyframes rq-in-back {
    from { opacity: 0; transform: translateX(18px); }
    to { opacity: 1; transform: none; }
}

@keyframes rq-nudge {
    0%, 100% { transform: none; }
    30% { transform: translateX(-5px); }
    60% { transform: translateX(4px); }
}

@keyframes rq-spin {
    to { transform: rotate(360deg); }
}

@keyframes rq-pop {
    from { opacity: 0; transform: scale(.6); }
}

/* ── تبلت ── */
@media (max-width: 991px) {
    .rq-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    /* نوار پیشرفت بالای کارت کار مراحل را می‌کند */
    .rq-stepper-box {
        display: none;
    }

    .rq-aside {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (hover: none) {
    .rq-drop-desktop {
        display: none;
    }
}

/* دکمه‌ی شناور واتساپ روی نوار چسبان «ادامه» نیفتد (این فایل فقط در همین صفحه بارگذاری می‌شود) */
@media (max-width: 768px) {
    .messanger-whatsapp {
        bottom: 96px;
    }
}

/* ── موبایل ── */
@media (max-width: 575px) {
    .rq-card {
        border-radius: 14px;
    }

    .rq-head {
        padding: 18px 18px 0;
    }

    .rq-banner {
        margin: 14px 18px 0;
    }

    .rq-body {
        min-height: 0;
        padding: 24px 18px 8px;
    }

    .rq-title {
        font-size: 19px;
    }

    .rq-options,
    .rq-fields,
    .rq-aside {
        grid-template-columns: minmax(0, 1fr);
    }

    .rq-option {
        min-height: 58px;
    }

    .rq-option:hover {
        transform: none;
    }

    .rq-sum-row {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas: "q e" "a a";
    }

    .rq-nav {
        padding: 12px 18px;
        border-radius: 0 0 13px 13px;
    }

    .rq-next {
        flex: 1;
        min-width: 0;
    }

    .rq-done {
        padding: 40px 18px 36px;
    }
}
