/**
 * صفحه پاسخ همکاران (mpr/rs/{token}) — ریدیزاین به سبک اپ همکاران.
 *
 * مرجع طراحی: partner-pwa/src/modules/partner-request (tokens.css + DetailBody + ResponseCard)
 * نیم‌اسپیس: .rsx — بدون Bootstrap؛ فقط یک شیم کوچک برای پارشال‌های نظرسنجی (Feedback).
 */

@font-face {
    font-family: IRANSans;
    font-style: normal;
    font-weight: normal;
    src: url('/fonts/iransans/woff2/IRANSansWeb.woff2') format('woff2'),
         url('/fonts/iransans/woff/IRANSansWeb.woff') format('woff');
    font-display: swap;
}

/* ── Structured customer response flow ───────────────────────── */
.rsx-alert {
    display: flex; align-items: center; gap: 9px; margin: 0 0 12px;
    padding: 12px 14px; border-radius: 13px; font-size: 13px; font-weight: 750;
}
.rsx-alert--success { color: #06634c; background: #e8fbf4; border: 1px solid #b9ecd9; }
.rsx-resp.is-new { border-color: #a9d8ca; box-shadow: 0 10px 28px rgba(15, 118, 90, .09); }
.rsx-resp--clarification { border-color: #d4c98b; background: linear-gradient(180deg, #fffef9, #fff); }
.rsx-resp--clarification.is-answered { border-color: #a9d8ca; background: #fff; }
.rsx-clar__intro { margin: 12px 12px 0; padding: 12px 13px; border-radius: 12px; background: #fff8d8; color: #51451a; }
.rsx-clar__intro b { display: block; font-size: 14px; line-height: 1.7; }
.rsx-clar__intro p { margin: 5px 0 0; font-size: 12.5px; line-height: 1.8; color: #6b5b22; }
.rsx-clar__form { display: grid; gap: 12px; padding: 12px; }
.rsx-field { display: grid; gap: 7px; }
.rsx-field > label { color: #24364b; font-size: 12.5px; font-weight: 800; }
.rsx-field > label small { margin-right: 5px; color: #718096; font-size: 11px; font-weight: 600; }
.rsx-field > input[type=text],
.rsx-field > textarea {
    width: 100%; box-sizing: border-box; border: 1px solid #d8e0e9; border-radius: 12px;
    background: #fff; color: #15263a; font: inherit; font-size: 13px; line-height: 1.7;
    padding: 11px 12px; outline: none; transition: border-color .2s, box-shadow .2s;
}
.rsx-field > textarea { min-height: 86px; resize: vertical; }
.rsx-field > input:focus, .rsx-field > textarea:focus { border-color: #2b9276; box-shadow: 0 0 0 3px rgba(43, 146, 118, .11); }
.rsx-field.has-error > input, .rsx-field.has-error > textarea, .rsx-field.has-error .rsx-upload { border-color: #dc6a6a; }
.rsx-field__error { min-height: 0; color: #b42318; font-size: 11px; }
.rsx-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.rsx-choices label { cursor: pointer; }
.rsx-choices input { position: absolute; opacity: 0; pointer-events: none; }
.rsx-choices span {
    display: inline-flex; min-height: 37px; align-items: center; justify-content: center;
    padding: 0 15px; border: 1px solid #d8e0e9; border-radius: 999px; background: #fff;
    color: #46566a; font-size: 12px; font-weight: 750; transition: .18s ease;
}
.rsx-choices input:checked + span { color: #08705a; border-color: #53b99e; background: #e9f8f3; }
.rsx-upload {
    display: flex !important; min-height: 72px; align-items: center; justify-content: center; gap: 9px;
    border: 1px dashed #9db8b0; border-radius: 13px; color: #19755e !important;
    background: #f3fbf8; cursor: pointer; font-size: 12.5px !important;
}
.rsx-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.rsx-upload i { font-size: 19px; }
.rsx-upload__preview { display: flex; flex-wrap: wrap; gap: 7px; }
.rsx-upload__preview img { width: 58px; height: 58px; object-fit: cover; border-radius: 10px; border: 1px solid #d8e0e9; }
.rsx-clar__submit {
    display: flex; width: 100%; min-height: 46px; align-items: center; justify-content: center; gap: 8px;
    border: 0; border-radius: 13px; background: linear-gradient(135deg, #149477, #0d765f);
    color: #fff; font-family: inherit; font-size: 13.5px; font-weight: 850; cursor: pointer;
    box-shadow: 0 7px 18px rgba(13, 118, 95, .2);
}
.rsx-clar__submit:disabled { opacity: .65; cursor: wait; box-shadow: none; }
.rsx-clar__error { padding: 9px 11px; border-radius: 10px; background: #fff0f0; color: #a51d1d; font-size: 12px; }
.rsx-clar__done { display: flex; align-items: center; gap: 11px; margin: 12px; padding: 13px; border-radius: 12px; background: #eaf9f3; color: #08705a; }
.rsx-clar__done > i { font-size: 23px; }
.rsx-clar__done div { display: grid; gap: 2px; }
.rsx-clar__done b { font-size: 13.5px; }
.rsx-clar__done span { color: #426b60; font-size: 11.5px; }
.rsx-quote__coverage { margin: 10px 12px 0; padding: 9px 11px; border-radius: 10px; background: #eef5ff; color: #365b82; font-size: 11.5px; font-weight: 700; }
.rsx-quote__summary {
    display: flex; align-items: center; gap: 10px; margin: 9px 12px 0; padding: 10px 11px;
    border: 1px solid #d8e8e2; border-radius: 12px; background: #f1faf7; color: #08705a;
}
.rsx-quote__summary-icon {
    width: 32px; height: 32px; flex: 0 0 32px; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    background: #d9f4eb; color: #08705a; font-size: 14px;
}
.rsx-quote__summary-copy { display: grid; flex: 1; gap: 1px; min-width: 0; }
.rsx-quote__summary b { color: #075e4b; font-size: 12.5px; }
.rsx-quote__summary-copy span { color: #4b7067; font-size: 10.5px; }
.rsx-quote__summary-total {
    display: inline-flex; flex: 0 0 auto; align-items: baseline; gap: 4px;
    margin-inline-start: auto; color: #08705a; direction: rtl; white-space: nowrap;
    font-size: 18px; letter-spacing: -.2px;
}
.rsx-quote__summary-total > span { direction: ltr; }
.rsx-quote__summary-total small { font-size: 9.5px; font-weight: 700; }
.rsx-quote__summary--footer { margin: 0 12px 12px; }
.rsx-quote { display: grid; gap: 9px; margin: 9px 12px 12px; }
.rsx-quote__part {
    overflow: hidden; padding: 10px; border: 1px solid #e2e8f0; border-radius: 12px;
    background: #fff; box-shadow: 0 3px 12px rgba(15, 159, 117, .07);
}
.rsx-quote__part-title { margin-bottom: 7px; color: #1e293b; font-size: 12px; font-weight: 900; }
.rsx-quote__offers { display: grid; }
.rsx-offer { padding: 9px; border: 1px solid #dce5ec; border-radius: 10px; background: #f8fafc; }
.rsx-offer + .rsx-offer { margin-top: 6px; }
.rsx-offer__main { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 7px; direction: rtl; }
.rsx-offer__info { flex: 1 1 auto; min-width: 0; text-align: right; }
.rsx-offer__price { display: flex; flex: 0 0 auto; align-items: baseline; gap: 5px; color: #08705a; white-space: nowrap; }
.rsx-offer__price b { direction: ltr; font-size: 11.5px; letter-spacing: -.1px; }
.rsx-offer__price span { font-size: 10.5px; font-weight: 700; }
.rsx-offer__meta { overflow: hidden; color: #475569; font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.rsx-offer__meta span + span::before { margin: 0 4px; content: '·'; }
.rsx-offer p { margin: 8px 0 0; padding-top: 8px; border-top: 1px dashed #e2e8ef; color: #5b6877; font-size: 11.5px; line-height: 1.7; }
@font-face {
    font-family: IRANSans;
    font-style: normal;
    font-weight: bold;
    src: url('/fonts/iransans/woff2/IRANSansWeb_Bold.woff2') format('woff2'),
         url('/fonts/iransans/woff/IRANSansWeb_Bold.woff') format('woff');
    font-display: swap;
}

/* ── توکن‌های دیزاین (آینه‌ی tokens.css اپ همکاران) ── */
.rsx {
    --navy-900: #0d2847;
    --navy-800: #0f2d4a;
    --navy-700: #1a3a5c;

    --gold-500: #c9a227;
    --gold-600: #b08a1d;
    --gold-soft: #fef9e7;
    --gold-bright: #ffd86b;

    --blue-500: #3b82f6;
    --blue-600: #2563eb;
    --blue-50: #eff6ff;
    --blue-100: #dbeafe;

    --green-500: #10b981;
    --green-600: #059669;
    --green-50: #ecfdf5;
    --green-100: #d1fae5;
    --green-700: #065f46;

    --red-500: #ef4444;
    --red-600: #dc2626;
    --red-50: #fef2f2;
    --red-100: #fee2e2;
    --red-700: #991b1b;

    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-700: #92400e;

    --ink-900: #0f172a;
    --ink-700: #1e293b;
    --ink-600: #334155;
    --ink-500: #64748b;
    --ink-400: #94a3b8;
    --ink-300: #cbd5e1;
    --ink-200: #e2e8f0;

    --line: #e2e8f0;
    --line-soft: #eef2f7;

    --bg-app: #f1f5f9;
    --bg-surface: #ffffff;

    --sh-sm: 0 1px 2px rgba(15, 23, 42, .04);
    --sh-md: 0 4px 14px rgba(15, 23, 42, .06);
    --sh-lg: 0 12px 32px rgba(15, 23, 42, .08);

    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;
    --r-xl: 20px;
    --r-pill: 999px;

    --rsx-font: 'IRANSans', 'Vazirmatn', system-ui, sans-serif;
}

/* ── پایه صفحه ── */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
/* عناصر hidden همیشه مخفی بمانند — حتی وقتی استایل display دارند
   (بدون این، display:flex روی .rsx-chat__typing و امثالش بر hidden غلبه می‌کند) */
[hidden] { display: none !important; }
body.rsx {
    background: var(--bg-app);
    font-family: var(--rsx-font);
    color: var(--ink-900);
    direction: rtl;
    min-height: 100vh;
    -webkit-tap-highlight-color: transparent;
}
.rsx img { max-width: 100%; }
.rsx a { text-decoration: none; }
.rsx button { font-family: inherit; }

/* ── هدر سرمه‌ای ── */
.rsx-head {
    background: linear-gradient(170deg, var(--navy-900), var(--navy-800));
    color: #fff;
    padding: 22px 16px 30px;
    position: relative;
}
.rsx-head::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0; right: 0;
    height: 14px;
    background: var(--bg-app);
    border-radius: 16px 16px 0 0;
}
.rsx-head__inner {
    max-width: 680px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 14px;
}
.rsx-head__logo {
    height: 30px;
    width: auto;
    flex: 0 0 auto;
    padding-inline-end: 14px;
    border-inline-end: 1px solid rgba(255, 255, 255, .14);
}
.rsx-head__titles { flex: 1; min-width: 0; }
.rsx-head__title {
    margin: 0;
    font-size: 16.5px;
    font-weight: 800;
    letter-spacing: -.2px;
}
.rsx-head__sub {
    margin: 3px 0 0;
    font-size: 11.5px;
    color: rgba(255, 255, 255, .55);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── بدنه ── */
.rsx-wrap {
    max-width: 680px;
    margin: 0 auto;
    padding: 14px 14px 32px;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ── بنر نصب اپ (باریک، قابل‌بستن) ── */
.rsx-appbar {
    display: none; /* با JS و طبق frequency-cap نمایش داده می‌شود */
    align-items: center;
    gap: 10px;
    background: var(--bg-surface);
    border: 1px solid var(--blue-100);
    border-radius: var(--r-md);
    box-shadow: var(--sh-sm);
    padding: 9px 11px;
}
.rsx-appbar.on { display: flex; animation: rsx-drop .3s ease both; }
@keyframes rsx-drop {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: none; }
}
.rsx-appbar__icon {
    width: 34px; height: 34px;
    border-radius: 9px;
    flex: 0 0 auto;
    overflow: hidden;
}
.rsx-appbar__icon img { width: 100%; height: 100%; object-fit: cover; }
.rsx-appbar__txt { flex: 1; min-width: 0; font-size: 11.5px; color: var(--ink-600); line-height: 1.6; }
.rsx-appbar__txt b { color: var(--ink-900); font-size: 12px; display: block; }
.rsx-appbar__btn {
    flex: 0 0 auto;
    background: linear-gradient(180deg, #4f8cf7, var(--blue-600));
    color: #fff;
    border: none;
    border-radius: 9px;
    padding: 7px 13px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
}
.rsx-appbar__close {
    flex: 0 0 auto;
    width: 26px; height: 26px;
    border: none;
    background: transparent;
    color: var(--ink-400);
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── کارت خودرو / درخواست (آکاردئونی) ── */
.rsx-car {
    background: var(--bg-surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-sm);
    padding: 0;
    overflow: hidden;
}
.rsx-car__sum {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 13px 14px;
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: right;
    font-family: inherit;
    transition: background .15s;
}
.rsx-car__sum:active { background: var(--line-soft); }
.rsx-car__sumtxt {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.rsx-car__sumsub {
    font-size: 11px;
    color: var(--ink-400);
    display: flex;
    align-items: center;
    gap: 5px;
}
.rsx-car__sumsub bdi { font-family: 'SF Mono', ui-monospace, monospace; }
.rsx-car__chev {
    color: var(--ink-300);
    font-size: 12px;
    flex: 0 0 auto;
    transition: transform .2s ease;
}
.rsx-car.open .rsx-car__chev { transform: rotate(180deg); }
.rsx-car__details { padding: 0 14px 14px; }
.rsx-car__details .rsx-car__div { margin-top: 0; }
.rsx-car__details .rsx-car__meta { margin: 0 0 12px; }
.rsx-car__logo {
    width: 44px; height: 44px;
    border-radius: 12px;
    flex: 0 0 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 17px;
    background: linear-gradient(135deg, #64748b, #475569);
}
.rsx-car__logo.a1 { background: linear-gradient(135deg, #22c896, #18a87a); }
.rsx-car__logo.a2 { background: linear-gradient(135deg, #5a83ff, #2b58e6); }
.rsx-car__logo.a3 { background: linear-gradient(135deg, #9171f0, #6e47e0); }
.rsx-car__logo.a4 { background: linear-gradient(135deg, #f59e0b, #d97706); }
.rsx-car__name {
    margin: 0;
    min-width: 0;
    font-size: 14.5px;
    font-weight: 800;
    color: var(--ink-900);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rsx-car__name em { font-style: normal; color: var(--ink-500); font-weight: 500; font-size: 12px; }
.rsx-car__meta {
    font-size: 11px;
    color: var(--ink-400);
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}
.rsx-car__meta .m { display: inline-flex; align-items: center; gap: 4px; }
.rsx-car__meta .m i { font-size: 10px; }
.rsx-car__meta .sep { color: var(--ink-300); }
.rsx-car__meta .id { font-family: 'SF Mono', ui-monospace, monospace; }
.rsx-car__div { height: 1px; background: var(--line-soft); margin: 12px 0; }
.rsx-car__vin {
    font-size: 12px;
    color: var(--ink-500);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.rsx-car__vin i { color: var(--ink-400); }
.rsx-car__vin b { color: var(--ink-700); }
.rsx-car__plabel {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 700;
    color: var(--ink-600);
    margin-bottom: 9px;
}
.rsx-car__plabel i { color: var(--ink-400); font-size: 11px; }
.rsx-car__parts { display: flex; flex-wrap: wrap; gap: 6px; }
.rsx-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--blue-50);
    color: var(--blue-600);
    border: 1px solid var(--blue-100);
    border-radius: var(--r-pill);
    padding: 5px 11px;
    font-size: 12px;
    font-weight: 600;
}
.rsx-tag i { color: var(--blue-500); font-size: 10px; }
.rsx-car__note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 12px;
    padding: 11px;
    background: var(--bg-app);
    border-radius: var(--r-md);
    font-size: 12.5px;
    color: var(--ink-600);
    line-height: 1.7;
}
.rsx-car__note i { color: var(--ink-400); margin-top: 2px; }

/* ── بج وضعیت درخواست ── */
.rsx-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
    padding: 4px 10px;
    border-radius: var(--r-pill);
    font-size: 10.5px;
    font-weight: 700;
}
.rsx-badge i { font-size: 9px; }
.rsx-badge--sent { background: var(--blue-50); color: var(--blue-600); border: 1px solid var(--blue-100); }
.rsx-badge--pending { background: var(--amber-50); color: var(--amber-700); border: 1px solid var(--amber-100); }
.rsx-badge--completed { background: var(--green-50); color: var(--green-700); border: 1px solid var(--green-100); }
.rsx-badge--cancelled { background: var(--red-50); color: var(--red-700); border: 1px solid var(--red-100); }

/* ── هدر بخش پاسخ‌ها ── */
.rsx-rhead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-inline: 3px; }
.rsx-rhead__t {
    font-size: 14px;
    font-weight: 800;
    color: var(--ink-900);
    display: flex;
    align-items: center;
    gap: 7px;
}
.rsx-rhead__t .n {
    background: linear-gradient(135deg, var(--gold-500), var(--gold-bright));
    color: var(--navy-900);
    font-size: 11px;
    font-weight: 800;
    padding: 1px 8px;
    border-radius: var(--r-pill);
}
.rsx-sort {
    display: flex;
    gap: 5px;
    margin-inline-start: auto;
    overflow-x: auto;
    scrollbar-width: none;
}
.rsx-sort::-webkit-scrollbar { display: none; }
.rsx-sort__btn {
    flex: 0 0 auto;
    border: 1.5px solid var(--line);
    background: var(--bg-surface);
    color: var(--ink-500);
    font-size: 11.5px;
    font-weight: 700;
    padding: 6px 11px;
    border-radius: var(--r-pill);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all .14s;
}
.rsx-sort__btn i { font-size: 10px; }
.rsx-sort__btn.on {
    background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
    border-color: var(--navy-900);
    color: #fff;
}
.rsx-sort__btn:disabled { opacity: .4; cursor: not-allowed; }

/* ── لیست و کارت پاسخ ── */
.rsx-resps { display: flex; flex-direction: column; gap: 12px; padding-inline: 3px; }
.rsx-resp {
    background: var(--bg-surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--sh-sm);
    animation: rsx-pop .2s ease both;
}
@keyframes rsx-pop {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: none; }
}
.rsx-resp.best {
    border-color: var(--green-500);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, .12), 0 4px 14px rgba(16, 185, 129, .08);
}
.rsx-resp__strip {
    background: linear-gradient(90deg, var(--green-600), var(--green-500));
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    padding: 5px 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.rsx-resp__head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px 8px;
}
.rsx-resp__av {
    width: 38px; height: 38px;
    border-radius: 11px;
    flex: 0 0 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    overflow: hidden;
}
.rsx-resp__av img { width: 100%; height: 100%; object-fit: cover; }
.rsx-resp__av.photo { background: var(--bg-app); }
.rsx-resp__av.a1 { background: linear-gradient(135deg, #22c896, #18a87a); }
.rsx-resp__av.a2 { background: linear-gradient(135deg, #5a83ff, #2b58e6); }
.rsx-resp__av.a3 { background: linear-gradient(135deg, #9171f0, #6e47e0); }
.rsx-resp__av.a4 { background: linear-gradient(135deg, #f59e0b, #d97706); }
.rsx-resp__sup { flex: 1; min-width: 0; }
.rsx-resp__name {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--ink-900);
    display: flex;
    align-items: center;
    gap: 6px;
}
.rsx-resp__name .v { color: var(--blue-500); font-size: 12px; }
.rsx-resp__meta {
    font-size: 11px;
    color: var(--ink-400);
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.rsx-resp__meta i { font-size: 9.5px; margin-inline-end: 3px; }
.rsx-resp__time-top {
    display: inline-flex; align-items: center; gap: 3px;
    color: var(--ink-400); white-space: nowrap;
}
.rsx-resp__newdot {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--amber-600);
    font-weight: 700;
}
.rsx-resp__newdot::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--amber-500);
}
.rsx-resp__status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: var(--r-pill);
    font-size: 11px;
    font-weight: 700;
    flex: 0 0 auto;
}
.rsx-resp__status i { font-size: 10px; }
.rsx-resp__status.available { background: var(--green-50); color: var(--green-700); border: 1px solid var(--green-100); }
.rsx-resp__status.answered { background: var(--green-50); color: var(--green-700); border: 1px solid var(--green-100); }
.rsx-resp__status.unavailable { background: var(--red-50); color: var(--red-700); border: 1px solid var(--red-100); }
.rsx-resp__status.check { background: var(--amber-50); color: var(--amber-700); border: 1px solid var(--amber-100); }
.rsx-resp__msg {
    padding: 4px 14px 8px;
    font-size: 12.5px;
    color: var(--ink-700);
    line-height: 1.8;
    margin: 0;
    white-space: pre-line;
}
.rsx-resp__price {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px 10px;
    flex-wrap: wrap;
}
.rsx-resp__price .lbl { font-size: 11.5px; color: var(--ink-500); }
.rsx-resp__price .val {
    color: var(--green-600);
    font-weight: 800;
    background: var(--green-50);
    padding: 2px 9px;
    border-radius: 6px;
    direction: ltr;
    font-size: 13px;
}
.rsx-resp__delivery {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--ink-500);
    margin-inline-start: auto;
}
.rsx-resp__delivery i { font-size: 10px; color: var(--ink-400); }
.rsx-resp__foot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 14px;
    border-top: 1px solid var(--line-soft);
    background: linear-gradient(180deg, #fff, #fcfdfe);
}
.rsx-resp__fblink {
    border: none;
    background: transparent;
    color: var(--ink-400);
    font-size: 10.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 4px 6px;
    margin: 0;
    border-radius: 7px;
    transition: color .15s, background .15s;
}
.rsx-resp__fblink i { font-size: 10px; }
.rsx-resp__fblink:hover { color: var(--amber-600); background: var(--amber-50); }
.rsx-resp__actions {
    display: flex;
    flex: 1 1 100%;
    justify-content: center;
    width: 100%;
    max-width: 390px;
    gap: 10px;
    margin: 0 auto;
}
.rsx-btn {
    border: none;
    cursor: pointer;
    flex: 1 1 0;
    min-width: 0;
    font-weight: 800;
    font-size: 12.5px;
    border-radius: 11px;
    padding: 10px 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    line-height: 1.2;
    white-space: nowrap;
    text-decoration: none;
    transition: transform .12s, filter .15s;
}
.rsx-btn:active { transform: scale(.96); }
.rsx-btn--call {
    background: var(--bg-surface);
    color: var(--ink-600);
    border: 1.5px solid var(--line);
}
.rsx-btn--chat {
    background: #eef4f8;
    color: #3f5e73;
    border: 1px solid #d7e2ea;
    box-shadow: none;
}
.rsx-resp__fb { padding: 0 14px; }
/* تریگر خط‌چین پارشال نظرسنجی حذف؛ ورود فقط از لینک «ثبت نظر» در فوتر کارت.
   important چون feedback.js موقع close با style اینلاین دوباره block می‌کند. */
.rsx-resp__fb .feedback-trigger { display: none !important; }
.rsx-resp__fb .feedback-slider { margin-bottom: 12px; }

/* ── حالت خالی (هنوز پاسخی نیامده) ── */
.rsx-pending {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px 24px;
    color: var(--ink-400);
    background: var(--bg-surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-sm);
}
.rsx-pending .ring {
    width: 56px; height: 56px;
    border-radius: 50%;
    border: 3px solid var(--line);
    border-top-color: var(--gold-500);
    animation: rsx-spin 1.4s linear infinite;
    margin-bottom: 16px;
}
@keyframes rsx-spin { to { transform: rotate(360deg); } }
.rsx-pending b { font-size: 14px; font-weight: 800; color: var(--ink-700); margin-bottom: 6px; }
.rsx-pending span { font-size: 12px; line-height: 1.8; }
.rsx-pending__app {
    margin-top: 16px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--blue-50);
    border: 1px solid var(--blue-100);
    color: var(--blue-600);
    font-size: 12px;
    font-weight: 700;
    padding: 9px 15px;
    border-radius: var(--r-pill);
    transition: background .15s;
}
.rsx-pending__app:active { background: var(--blue-100); }
.rsx-pending__app i { font-size: 12px; }

/* ── کارت نصب اپ (انتهای لیست) ── */
.rsx-appcard {
    background: linear-gradient(150deg, var(--navy-900), var(--navy-700));
    border-radius: var(--r-lg);
    box-shadow: var(--sh-md);
    padding: 16px;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.rsx-appcard__top { display: flex; align-items: center; gap: 12px; }
.rsx-appcard__icon {
    width: 46px; height: 46px;
    border-radius: 12px;
    overflow: hidden;
    flex: 0 0 auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
}
.rsx-appcard__icon img { width: 100%; height: 100%; object-fit: cover; }
.rsx-appcard__t { margin: 0; font-size: 14px; font-weight: 800; }
.rsx-appcard__s { margin: 3px 0 0; font-size: 11.5px; color: rgba(255, 255, 255, .65); }
.rsx-appcard__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
    font-size: 12px;
    color: rgba(255, 255, 255, .85);
}
.rsx-appcard__list i { color: var(--gold-bright); margin-inline-end: 7px; font-size: 11px; }
.rsx-appcard__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--gold-500), var(--gold-bright));
    color: var(--navy-900);
    font-size: 13px;
    font-weight: 800;
    border-radius: var(--r-md);
    padding: 11px;
}
.rsx-appcard__btn:active { transform: scale(.98); }

/* ── اکشن‌های انتهای صفحه ── */
.rsx-foot {
    display: flex;
    gap: 8px;
    justify-content: center;
}
.rsx-foot__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: var(--r-md);
    border: 1.5px solid var(--line);
    background: var(--bg-surface);
    color: var(--ink-600);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}
.rsx-foot__btn:active { transform: scale(.97); }

/* ═══════════════════════════════════════════════════════════════
   گفتگوی آنلاین مشتری ↔ فروشگاه
   حباب «خودم» = طلایی راست، «فروشگاه» = سفید چپ (هماهنگ با اپ همکاران)
   ═══════════════════════════════════════════════════════════════ */
.rsx-btn--chat { position: relative; }
.rsx-btn__unread {
    position: absolute;
    top: -6px;
    inset-inline-start: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: var(--r-pill);
    background: var(--red-500);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(239, 68, 68, .45);
}

.rsx-chat-ov {
    position: fixed;
    inset: 0;
    background: rgba(13, 40, 71, .5);
    backdrop-filter: blur(2px);
    z-index: 70;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
}
.rsx-chat-ov.on { opacity: 1; pointer-events: auto; }

.rsx-chat {
    position: fixed;
    inset: 0;
    z-index: 72; /* بالاتر از شیت لیست گفتگوها */
    display: flex;
    flex-direction: column;
    background: #eef1f5;
    transform: translateY(105%);
    transition: transform .28s cubic-bezier(.32, .72, .25, 1);
    direction: rtl;
    font-family: var(--rsx-font, 'IRANSans', sans-serif);
    overflow: hidden;
}
.rsx-chat.on { transform: none; }

/* پس‌زمینه چت — همان الگوی اپ همکاران: تصویر محو خاکستری + پرده سفید نیمه‌شفاف */
.rsx-chat__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: url('/images/chat-back.jpg') center / cover no-repeat;
    filter: blur(1px) saturate(0%);
    transform: scale(1.06);
}
.rsx-chat__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(248, 250, 252, .38);
}
.rsx-chat__head, .rsx-chat__body, .rsx-chat__foot { position: relative; z-index: 1; }
@media (min-width: 640px) {
    .rsx-chat {
        inset: auto 0 0 0;
        margin: 0 auto;
        max-width: 480px;
        height: min(720px, 92vh);
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -10px 50px rgba(13, 40, 71, .3);
        overflow: hidden;
    }
}

/* هدر چت */
.rsx-chat__head {
    background: linear-gradient(170deg, var(--navy-900, #0d2847), var(--navy-800, #0f2d4a));
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    padding-top: calc(10px + env(safe-area-inset-top, 0px));
    flex: 0 0 auto;
}
.rsx-chat__hbtn {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    border: none;
    background: rgba(255, 255, 255, .10);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    cursor: pointer;
    flex: 0 0 auto;
    text-decoration: none;
    transition: background .15s;
}
.rsx-chat__hbtn:active { transform: scale(.94); }
.rsx-chat__hbtn--call { background: rgba(16, 185, 129, .25); }
.rsx-chat__av {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    overflow: hidden;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    background: linear-gradient(135deg, #5a83ff, #2b58e6);
}
.rsx-chat__av img { width: 100%; height: 100%; object-fit: cover; }
.rsx-chat__hinfo { flex: 1; min-width: 0; }
.rsx-chat__hname {
    font-size: 13.5px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rsx-chat__hsub { font-size: 10.5px; color: rgba(255, 255, 255, .6); margin-top: 2px; }
.rsx-chat__hsub.online { color: #34d399; }

/* ── نوار «نکات خرید امن و پیگیری» (باند ثابت زیر هدر) ── */
.rsx-chat__notice {
    flex: 0 0 auto;
    position: relative;
    z-index: 2;
    background: #fff8e6;
    border-bottom: 1px solid rgba(201, 162, 39, .28);
    box-shadow: 0 2px 8px rgba(13, 40, 71, .04);
}
.rsx-chat__notice-bar {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: right;
    font-family: inherit;
}
.rsx-chat__notice-bar > .bi-shield-check { color: var(--gold-600, #b08a1e); font-size: 16px; flex: 0 0 auto; }
.rsx-chat__notice-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
    font-size: 12px;
    font-weight: 700;
    color: var(--navy-900, #0d2847);
    line-height: 1.5;
}
.rsx-chat__notice-chev { color: var(--gold-600, #b08a1e); font-size: 12px; flex: 0 0 auto; transition: transform .2s; }
.rsx-chat__notice-details {
    display: grid;
    grid-template-rows: 1fr;
    opacity: 1;
    transition: grid-template-rows .22s ease, opacity .18s ease;
}
.rsx-chat__notice-content { min-height: 0; overflow: hidden; }
.rsx-chat__notice-content ul {
    list-style: none;
    margin: 0;
    padding: 0 28px 9px 12px;
    color: var(--ink-700, #1e293b);
    font-size: 11px;
    line-height: 1.85;
}
.rsx-chat__notice-content li { position: relative; }
.rsx-chat__notice-content li + li { margin-top: 4px; }
.rsx-chat__notice-content li::before {
    content: '';
    position: absolute;
    right: -12px;
    top: .75em;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--gold-600, #b08a1e);
}
.rsx-chat__notice.min .rsx-chat__notice-details { grid-template-rows: 0fr; opacity: 0; }
.rsx-chat__notice.is-request-pin { background: #f0f7fa; border-bottom-color: #d5e3eb; }
.rsx-chat__notice-bar > .bi-pin-angle { color: #0d6474; font-size: 15px; }
.rsx-chat__notice-title.is-changing { animation: chat-notice-label .2s ease; }
@keyframes chat-notice-label {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}
.rsx-chat__request-card {
    width: 100%;
    min-width: 0;
    flex: 0 0 auto;
    justify-content: center;
    padding: 0 6px;
    box-sizing: border-box;
}
.rsx-chat__request-card > .rsx-chat-request {
    width: 100%;
    max-width: 380px;
    min-width: 0;
    margin: 0;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .05);
    overflow-wrap: anywhere;
    overflow: hidden;
    font-family: inherit;
}
.rsx-chat-request__head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #f8fafc;
    border-bottom: 1px solid #edf1f4;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.7;
}
.rsx-chat-request__head i { color: #64748b; }
.rsx-chat-request__more {
    display: flex; align-items: center; justify-content: center; gap: 7px;
    width: 100%; min-height: 36px; margin: 0 0 10px; border: 0; border-radius: 8px;
    background: #f1f5f9; color: #475569; font: inherit; font-size: 11px; cursor: pointer;
}
.rsx-chat-request__notice {
    margin: 0 12px 12px; padding: 9px 10px; border: 1px solid #f0e5cf; border-radius: 8px;
    background: #fbf7ee; color: #80663c; font-size: 11px; font-weight: 500; line-height: 1.8; text-align: center;
}
.rsx-chat-request__content { padding: 0 12px; }
.rsx-chat-request__item { display: flex; flex-direction: column; gap: 6px; padding: 11px 0; }
.rsx-chat-request__item[hidden] { display: none; }
.rsx-chat-request__item + .rsx-chat-request__item { border-top: 1px solid #edf1f4; }
.rsx-chat-request__part { margin: 0; color: #243747; font-size: 12px; font-weight: 700; line-height: 1.9; overflow-wrap: anywhere; }
.rsx-chat-request__specs { color: #64748b; font-size: 11px; font-weight: 400; }
.rsx-chat-request__price {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px 10px;
    color: #155b49;
    font-size: 11px;
    line-height: 1.7;
}
.rsx-chat-request__price strong { color: inherit; font-size: 14px; font-variant-numeric: tabular-nums; }
.rsx-chat-request__price small { font-size: 10px; font-weight: 500; }
.rsx-chat-request__note { margin: 0; color: #475569; font-size: 11px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.rsx-chat-request__total { margin: 0 12px; padding: 10px 0; border-top: 1px solid #edf1f4; }
.rsx-chat-request__foot { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #edf1f4; }
.rsx-chat-request__foot > .rsx-chat-request__action {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 8px 4px;
    gap: 6px;
    border: 1px solid #dce5ee;
    border-radius: 9px;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.7;
    text-decoration: none;
    cursor: pointer;
    box-shadow: none;
}
.rsx-chat-request__foot > .rsx-chat-request__buy { background: #155b49; border-color: #155b49; color: #fff; }
.rsx-chat-request__foot > .rsx-chat-request__buy:active { background: #104838; border-color: #104838; }
.rsx-chat-request__foot > .rsx-chat-request__view { background: #f8fafc; color: #334155; border-color: #dce5ee; }
.rsx-chat-request__foot > .rsx-chat-request__view:active { background: #eaf0f5; }
.rsx-chat-request__action > i { font-size: 11px; line-height: 1; }
.rsx-chat-request__action:focus-visible, .rsx-chat-request__more:focus-visible { outline: 2px solid #155b49; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
    .rsx-chat__notice-details, .rsx-chat__notice-chev { transition: none; }
    .rsx-chat__notice-title.is-changing { animation: none; }
}

/* بدنه پیام‌ها */
.rsx-chat__body {
    overscroll-behavior-y: contain;
    overflow-anchor: none;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 14px 12px 8px;
    display: flex;
    flex-direction: column;
}
.rsx-chat__loading {
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--ink-500, #64748b);
    font-size: 12px;
}
.rsx-chat__loading .ring {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 3px solid #d7dfe9;
    border-top-color: var(--gold-500, #c9a227);
    animation: rsx-spin 1s linear infinite;
}
.rsx-chat__msgs { flex: 0 0 auto; display: flex; flex-direction: column; gap: 6px; }

/* ردیف و حباب پیام */
.rcm { display: flex; }
.rcm--me { justify-content: flex-start; }   /* RTL: سمت راست */
.rcm--them { justify-content: flex-end; }   /* RTL: سمت چپ */
.rcm__bubble {
    max-width: 80%;
    padding: 9px 12px 6px;
    border-radius: 15px;
    font-size: 13.5px;
    line-height: 1.9;
    word-break: break-word;
    white-space: pre-wrap;
    animation: rsx-pop .18s ease both;
}
.rcm--me .rcm__bubble {
    background: linear-gradient(135deg, #1d4377 0%, #0d2847 100%);
    color: #fff;
    border: 1px solid #0d2847;
    border-bottom-right-radius: 5px;
    box-shadow: 0 2px 6px rgba(13, 40, 71, .20);
}
.rcm--them .rcm__bubble {
    background: #fff;
    color: #1a2a44;
    border: 1px solid #e4e8f0;
    border-bottom-left-radius: 5px;
    box-shadow: 0 1px 3px rgba(10, 31, 56, .08);
}

/* حالت خالی — دعوت به شروع گفتگو */
.rsx-chat__empty {
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    background: rgba(255, 255, 255, .8);
    backdrop-filter: blur(3px);
    border: 1px solid rgba(15, 23, 42, .06);
    border-radius: 16px;
    padding: 22px 26px;
    color: var(--ink-500, #64748b);
    font-size: 12.5px;
    line-height: 1.9;
    box-shadow: 0 4px 18px rgba(13, 40, 71, .07);
}
.rsx-chat__empty i { font-size: 26px; color: var(--gold-500, #c9a227); }
.rsx-chat__empty b { color: var(--ink-700, #1e293b); font-size: 13.5px; }
.rcm__meta {
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: flex-end;
    font-size: 9.5px;
    margin-top: 3px;
    opacity: .65;
    direction: ltr;
}
.rcm__meta .ed { font-size: 9px; }
.rcm__ticks i { font-size: 11px; }
.rcm__ticks.read i { color: #2563eb; }
.rcm--me .rcm__ticks.read i { color: #7c5e00; }
.rcm__bubble.failed { opacity: .55; border-color: var(--red-500, #ef4444); cursor: pointer; }
.rcm__failnote { font-size: 9.5px; color: var(--red-600, #dc2626); margin-top: 2px; }
.rcm__bubble.deleted {
    font-style: italic;
    opacity: .6;
    background: var(--bg-app, #f1f5f9);
    color: var(--ink-400, #94a3b8);
}

/* پیام سیستمی */
.rcm--system { justify-content: center; }
.rcm--system .rcm__sys {
    background: rgba(13, 40, 71, .08);
    color: var(--ink-500, #64748b);
    font-size: 10.5px;
    padding: 4px 12px;
    border-radius: var(--r-pill, 999px);
}

/* کارت موضوع درخواست */
.rcm--ctx { justify-content: center; margin: 2px 0 6px; }
.rsx-request-registered {
    width: min(100%, 410px);
    overflow: hidden;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    box-shadow: 0 10px 28px rgba(13,40,71,.10);
    color: #1e293b;
}
.rsx-request-registered__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    background: linear-gradient(135deg, #f0fdf7 0%, #f7fffb 100%);
    border-bottom: 1px solid #e8f4ed;
}
.rsx-request-registered__success {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}
.rsx-request-registered__check {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #22a566;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}
.rsx-request-registered__title {
    display: block;
    color: #11834f;
    font-size: 11.5px;
    font-weight: 800;
    white-space: nowrap;
}
.rsx-request-registered__subtitle {
    display: block;
    margin-top: 1px;
    color: #7b8798;
    font-size: 8.5px;
    line-height: 1.3;
}
.rsx-request-registered__codebox {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    padding: 5px 7px;
    background: rgba(255,255,255,.88);
    border: 1px solid #dbe7f4;
    border-radius: 8px;
    direction: ltr;
}
.rsx-request-registered__codebox .rsx-request-registered__label { display: none; }
.rsx-request-registered__label {
    display: block;
    color: #7b8798;
    font-size: 9.5px;
}
.rsx-request-registered__code {
    display: block;
    margin-top: 1px;
    direction: ltr;
    text-align: left;
    color: #0d2847;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .2px;
}
.rsx-request-registered__copy {
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #174a7c;
    cursor: pointer;
    font-size: 11px;
}
.rsx-request-registered__info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 14px;
    padding: 12px 0;
    border-bottom: 1px solid #edf1f5;
}
.rsx-request-registered__icon {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #eef5fc;
    color: #174a7c;
    font-size: 16px;
}
.rsx-request-registered__info-body { min-width: 0; }
.rsx-request-registered__value {
    display: block;
    margin-top: 2px;
    color: #152b49;
    font-size: 11.5px;
    font-weight: 800;
    line-height: 1.7;
}
.rsx-request-registered__meta {
    display: block;
    margin-top: 1px;
    color: #64748b;
    font-size: 10px;
}
.rsx-request-registered__guide { margin: 10px 14px 0; border: 1px solid #e2e8f0; border-radius: 11px; background: #f8fafc; }
.rsx-request-registered__guide summary { padding: 10px 11px; cursor: pointer; color: #17365e; font-size: 11px; font-weight: 800; list-style: none; }
.rsx-request-registered__guide summary::-webkit-details-marker { display: none; }
.rsx-request-registered__guide summary::after { content: '⌄'; float: left; color: #64748b; }
.rsx-request-registered__guide[open] summary::after { transform: rotate(180deg); }
.rsx-request-registered__guide p { margin: 0; padding: 0 11px 8px; color: #64748b; font-size: 10.5px; line-height: 1.7; }
.rsx-request-registered__action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 10px 14px 14px;
    padding: 11px 13px;
    border-radius: 11px;
    background: linear-gradient(135deg, #0d4b87, #0d2847);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 6px 14px rgba(13,40,71,.18);
}

/* تصویر / ویس / استیکر دریافتی */
.rcm__img { display: block; max-width: 220px; border-radius: 10px; cursor: pointer; }
.rcm__voice { width: 230px; max-width: 100%; display: block; }
.rcm__sticker { font-size: 46px; line-height: 1.2; }
.rcm--me .rcm__bubble.media, .rcm--them .rcm__bubble.media { padding: 4px; position: relative; overflow: hidden; }
.rcm__bubble.sticker { background: transparent !important; border: none !important; box-shadow: none !important; }

/* حالت در حال آپلود روی حباب تصویر */
.rcm__bubble.uploading .rcm__img { opacity: .55; filter: blur(1px); }
.rcm__uploading {
    position: absolute;
    top: 50%; left: 50%;
    width: 30px; height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid rgba(255, 255, 255, .55);
    border-top-color: #fff;
    border-radius: 50%;
    animation: rsxImgSpin .8s linear infinite;
    pointer-events: none;
}
@keyframes rsxImgSpin { to { transform: rotate(360deg); } }

/* در حال نوشتن */
.rsx-chat__typing {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10.5px;
    color: var(--ink-400, #94a3b8);
    padding: 8px 4px 2px;
}
.rsx-chat__typing .d {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--ink-300, #cbd5e1);
    animation: rsx-tp 1.2s infinite;
}
.rsx-chat__typing .d:nth-child(2) { animation-delay: .2s; }
.rsx-chat__typing .d:nth-child(3) { animation-delay: .4s; }
@keyframes rsx-tp { 0%, 60%, 100% { transform: none; } 30% { transform: translateY(-4px); } }

/* فوتر و ورودی */
.rsx-chat__foot {
    flex: 0 0 auto;
    background: #fff;
    border-top: 1px solid rgba(15, 23, 42, .07);
    box-shadow: 0 -4px 16px rgba(13, 40, 71, .05);
    padding: 9px 10px calc(9px + env(safe-area-inset-bottom, 0px));
}
.rsx-chat__closednote {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: var(--ink-400, #94a3b8);
    font-size: 12px;
    padding: 8px;
}
.rsx-chat__inputrow { display: flex; align-items: flex-end; gap: 8px; }
.rsx-chat__input {
    flex: 1;
    border: 1.5px solid var(--ink-200, #e2e8f0);
    border-radius: 22px;
    padding: 10px 15px;
    font-family: inherit;
    font-size: 13.5px;
    line-height: 1.7;
    resize: none;
    max-height: 110px;
    background: #f7f9fc;
    color: var(--ink-900, #0f172a);
    outline: none;
    transition: border-color .15s, background .15s, box-shadow .15s;
}
.rsx-chat__input::placeholder { color: var(--ink-400, #94a3b8); }
.rsx-chat__input:focus {
    border-color: var(--gold-500, #c9a227);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(201, 162, 39, .12);
}
/* دکمه ارسال — سرمه‌ای، مثل اپ همکاران */
.rsx-chat__send {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #142a45, #1d3b5e);
    color: #fff;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(13, 40, 71, .3);
    transition: transform .12s, opacity .15s, box-shadow .15s;
}
.rsx-chat__send i { transform: scaleX(-1) translateX(1px); } /* جهت ارسال در RTL */
.rsx-chat__send:active:not(:disabled) { transform: scale(.9); }
.rsx-chat__send:disabled {
    background: var(--ink-200, #e2e8f0);
    color: var(--ink-400, #94a3b8);
    box-shadow: none;
    cursor: default;
}

/* دکمه پیوست تصویر — خنثی، طلایی */
.rsx-chat__attach {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--gold-600, #b08a1e);
    font-size: 19px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .15s, transform .12s, color .15s;
}
.rsx-chat__attach:hover { background: rgba(201, 162, 39, .12); }
.rsx-chat__attach:active { transform: scale(.9); }

/* ── دکمه شناور گفتگوها (پایین-راست) ── */
.rsx-fab {
    position: fixed;
    bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    right: 16px;
    z-index: 55;
    width: 54px;
    height: 54px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--navy-900, #0d2847), var(--navy-700, #1a3a5c));
    color: var(--gold-bright, #ffd86b);
    font-size: 21px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(13, 40, 71, .35);
    animation: rsx-fab-in .25s ease both;
    transition: transform .15s;
}
.rsx-fab:active { transform: scale(.92); }
@keyframes rsx-fab-in {
    from { opacity: 0; transform: scale(.6); }
    to { opacity: 1; transform: scale(1); }
}
.rsx-fab__badge {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: var(--r-pill, 999px);
    background: var(--red-500, #ef4444);
    color: #fff;
    font-size: 10.5px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

/* ── شیت لیست گفتگوها ── */
.rsx-clist {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 71;
    margin: 0 auto;
    max-width: 480px;
    max-height: 72vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-surface, #fff);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -10px 50px rgba(13, 40, 71, .3);
    transform: translateY(105%);
    transition: transform .28s cubic-bezier(.32, .72, .25, 1);
    direction: rtl;
    font-family: var(--rsx-font, 'IRANSans', sans-serif);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}
.rsx-clist.on { transform: none; }
.rsx-clist__grip {
    width: 40px;
    height: 4px;
    border-radius: 4px;
    background: var(--ink-200, #e2e8f0);
    margin: 10px auto 4px;
    flex: 0 0 auto;
}
.rsx-clist__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 18px 10px;
    border-bottom: 1px solid var(--line-soft, #eef2f7);
    flex: 0 0 auto;
}
.rsx-clist__title {
    margin: 0;
    font-size: 14.5px;
    font-weight: 800;
    color: var(--ink-900, #0f172a);
    display: flex;
    align-items: center;
    gap: 8px;
}
.rsx-clist__title i { color: var(--gold-500, #c9a227); }
.rsx-clist__close {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 9px;
    background: var(--bg-app, #f1f5f9);
    color: var(--ink-500, #64748b);
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.rsx-clist__items {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 4px 0 8px;
    min-height: 120px;
}
.rsx-clist__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 34px 20px;
    color: var(--ink-400, #94a3b8);
    font-size: 12.5px;
}
.rsx-clist__empty i { font-size: 30px; color: var(--ink-300, #cbd5e1); }
.rsx-citem {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 18px;
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: right;
    font-family: inherit;
    transition: background .14s;
}
.rsx-citem:active { background: var(--bg-app, #f1f5f9); }
.rsx-citem + .rsx-citem { border-top: 1px solid var(--line-soft, #eef2f7); }
.rsx-citem__av {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    overflow: hidden;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    background: linear-gradient(135deg, #5a83ff, #2b58e6);
}
.rsx-citem__av img { width: 100%; height: 100%; object-fit: cover; }
.rsx-citem__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rsx-citem__name {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--ink-900, #0f172a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rsx-citem__last {
    font-size: 11.5px;
    color: var(--ink-400, #94a3b8);
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rsx-citem__last b { color: var(--ink-600, #334155); font-weight: 600; }
.rsx-citem__side {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}
.rsx-citem__time { font-size: 10px; color: var(--ink-400, #94a3b8); }
.rsx-citem__unread {
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: var(--r-pill, 999px);
    background: var(--red-500, #ef4444);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ═══════════════════════════════════════════════════════════════
   شیم کوچک Bootstrap — فقط برای پارشال‌های نظرسنجی (Feedback)
   که با کلاس‌های utility بوت‌استرپ نوشته شده‌اند.
   ═══════════════════════════════════════════════════════════════ */
.feedback-container .btn,
.request-feedback-container .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 7px 14px;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    background: var(--bg-app, #f1f5f9);
    color: var(--ink-600, #334155);
    transition: all .15s;
}
.feedback-container .btn-sm,
.request-feedback-container .btn-sm { padding: 5px 11px; font-size: 12px; }
.feedback-container .btn-light,
.request-feedback-container .btn-light { background: #f1f5f9; color: #334155; border-color: #e2e8f0; }
.feedback-container .w-100,
.request-feedback-container .w-100 { width: 100%; }
.feedback-container .text-center,
.request-feedback-container .text-center { text-align: center; }
.feedback-container .me-1, .feedback-container .me-2,
.request-feedback-container .me-1, .request-feedback-container .me-2 { margin-inline-end: .4rem; }
.request-feedback-container .card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}
.request-feedback-container .card-body { padding: 12px 14px; }
.request-feedback-container .py-3 { padding-top: .75rem; padding-bottom: .75rem; }
.request-feedback-container .d-flex { display: flex; }
.request-feedback-container .flex-column { flex-direction: column; }
.request-feedback-container .justify-content-between { justify-content: space-between; }
.request-feedback-container .align-items-start { align-items: flex-start; }
.request-feedback-container .gap-2 { gap: .5rem; }
.request-feedback-container .small { font-size: 12.5px; }
.request-feedback-container .text-warning { color: var(--amber-500, #f59e0b); }
@media (min-width: 768px) {
    .request-feedback-container .flex-md-row { flex-direction: row; }
    .request-feedback-container .align-items-md-center { align-items: center; }
}

/* تریگر نظرسنجی پاسخ، هماهنگ با کارت جدید */
.rsx .feedback-container { margin-top: 2px; }
.rsx .feedback-trigger .feedback-btn { font-size: 12px; }

/* اعلان پیام تازه، روی صفحه پاسخ و سفارش */
.rsx-chat-alert[hidden] { display: none; }
.rsx-chat-alert {
    position: fixed; z-index: 1300; top: calc(12px + env(safe-area-inset-top, 0px));
    left: 50%; transform: translateX(-50%); width: min(440px, calc(100% - 24px));
    display: flex; align-items: center; gap: 6px; padding: 10px 12px;
    box-sizing: border-box; border: 1px solid #dbe5ee; border-radius: 14px;
    background: #fff; color: #0d2847; box-shadow: 0 8px 28px rgba(13, 40, 71, .18);
    direction: rtl; animation: chat-alert-enter .2s ease both;
}
@keyframes chat-alert-enter { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }
.rsx-chat-alert__open { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; border: 0; background: none; padding: 0; font: inherit; color: inherit; text-align: right; cursor: pointer; }
.rsx-chat-alert__open > i { color: #087f68; font-size: 19px; }
.rsx-chat-alert__copy { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.rsx-chat-alert__title { font-size: 12px; }
.rsx-chat-alert__preview { font-size: 11px; color: #64748b; }
.rsx-chat-alert__title, .rsx-chat-alert__preview { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.rsx-chat-alert__action { flex: 0 0 auto; color: #087f68; font-size: 11px; font-weight: 700; }
.rsx-chat-alert__close { border: 0; border-radius: 8px; background: #f1f5f9; color: #64748b; width: 28px; height: 28px; font-size: 20px; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .rsx-chat-alert { animation: none; } }
