/* Expert conversation: page scrolling, private attachments, Persian RTL. */
.bs-expert-page,.bs-expert-chat {
    --expert-ink:#243047;
    --expert-muted:#536078;
    --expert-accent:var(--bs-primary,#536fa8);
    --expert-line:#dce1e9;
    --expert-paper:#fff;
    --expert-bg:#f5f6f8;
    font-family:Vazirmatn,Tahoma,sans-serif;
    color:var(--expert-ink)
}
.bs-expert-page {margin:0;background:var(--expert-bg)}
.bs-expert-wrap {max-width:1120px;margin-inline:auto;padding:0 24px 32px}
.bs-expert-heading {display:flex;align-items:center;gap:20px;padding:24px 0;border-bottom:1px solid var(--expert-line);margin-bottom:24px}
.bs-expert-heading-copy {flex:1;min-width:0}
.bs-expert-heading-copy small {font-size:12px;color:var(--expert-muted)}
.bs-expert-heading h1 {font-size:24px;line-height:1.6;margin:2px 0 0;font-weight:800}
.bs-expert-back {display:inline-flex;align-items:center;gap:4px;min-height:44px;color:var(--expert-accent);text-decoration:none;font-size:13px}
.bs-expert-back svg {width:20px;height:20px}
.bs-expert-heading-mark,.bs-expert-empty-icon {display:grid;place-items:center;background:#e9edf4;color:var(--expert-accent);border-radius:12px;width:44px;height:44px}
.bs-expert-heading-mark svg,.bs-expert-empty-icon svg {width:24px;height:24px}
.bs-expert-chat {box-sizing:border-box;max-width:940px;min-width:0;position:relative}
.bs-expert-chat * {box-sizing:border-box}
.bs-expert-intro {margin:0;font-size:13px;line-height:1.8;color:var(--expert-muted)}
.bs-expert-status {font-size:12px;line-height:1.8;color:var(--expert-muted);margin:4px 0 20px;padding:0;min-height:22px}
.bs-expert-empty {padding:32px 0 40px;max-width:480px;margin-inline:auto;text-align:center}
.bs-expert-empty-icon {margin:0 auto 16px;width:52px;height:52px}
.bs-expert-empty h2 {font-size:20px;line-height:1.7;margin:0 0 12px}
.bs-expert-empty p {font-size:14px;line-height:2;margin:0 0 12px;color:var(--expert-muted)}
.bs-expert-empty small {font-size:12px;color:var(--expert-muted)}
.bs-expert-messages {list-style:none;margin:20px 0;padding:0;display:flex;flex-direction:column;gap:20px;overflow:visible}
.bs-expert-messages:empty {display:none}
.bs-expert-message {max-width:82%;align-self:flex-end;padding:16px 20px;border:1px solid var(--expert-line);background:var(--expert-paper);border-radius:16px 16px 16px 4px;overflow-wrap:anywhere;min-width:160px}
.bs-expert-message.is-mine {align-self:flex-start;background:var(--expert-accent);border-color:var(--expert-accent);color:#fff;border-radius:16px 16px 4px 16px}
.bs-expert-message.is-mine .bs-expert-message-meta { color:#d2e7da; }
.bs-expert-message.is-mine a { color:#fff; }
.bs-expert-message-meta {display:flex;align-items:center;justify-content:space-between;gap:16px;font-size:11px;line-height:1.7;color:var(--expert-muted)}
.bs-expert-message-meta strong {font-size:12px}
.bs-expert-message time {white-space:nowrap}
.bs-expert-message p {white-space:pre-wrap;font-size:15px;line-height:1.95;margin:8px 0 0}
.bs-expert-chat .bs-expert-attachment {display:block;color:var(--expert-accent);font-size:13px;line-height:1.8;margin-top:12px;text-decoration:underline;text-underline-offset:4px;overflow-wrap:anywhere}
.bs-expert-preview {display:block;max-width:320px;max-height:320px;width:100%;object-fit:contain;border-radius:8px;margin-top:12px;background:#f4f5f1}
.bs-expert-form {background:var(--expert-paper);border:1px solid var(--expert-line);border-radius:16px;padding:16px;margin-top:24px}
.bs-expert-page .bs-expert-form {position:sticky;bottom:12px;z-index:5;box-shadow:0 4px 24px rgba(32,58,50,.08)}
.bs-expert-form>label {display:block;font-size:12px;font-weight:700;margin-bottom:8px;color:var(--expert-muted)}
.bs-expert-chat textarea {display:block;width:100%;min-height:64px;max-height:160px;resize:none;border:0;background:var(--expert-paper);color:var(--expert-ink);font:inherit;font-size:16px;line-height:1.8;padding:4px 0;outline-offset:4px}
.bs-expert-chat textarea::placeholder {color:#687b70}
.bs-expert-composer {display:flex;align-items:center;gap:12px;margin-top:12px}
.bs-expert-chat button {font:inherit;font-size:13px;cursor:pointer;border:1px solid var(--expert-line);color:var(--expert-ink);background:#fff;border-radius:8px;padding:10px 16px;min-height:44px;line-height:1.5}
.bs-expert-chat button:hover {background:#eef1f6}
.bs-expert-chat button:disabled {opacity:.55;cursor:wait}
.bs-expert-chat .bs-expert-submit {background:var(--expert-accent);border-color:var(--expert-accent);color:#fff;margin-inline-start:auto;min-width:112px}
.bs-expert-chat .bs-expert-submit:hover {background:var(--expert-accent)}
.bs-expert-pick {display:inline-flex;gap:8px;align-items:center}
.bs-expert-pick svg {width:18px;height:18px}
.bs-expert-selected {display:flex;align-items:center;gap:12px;border:1px solid var(--expert-line);border-radius:8px;margin:12px 0;padding:8px;background:#f6f8f4}
.bs-expert-selected img {width:48px;height:48px;object-fit:cover;border-radius:4px;flex-shrink:0}
.bs-expert-selected span {flex:1;min-width:0;overflow-wrap:anywhere;font-size:12px;line-height:1.8}
.bs-expert-selected button {padding:8px;flex-shrink:0}
.bs-expert-form>p {font-size:11px;line-height:1.8;color:var(--expert-muted);margin:8px 0 0}
.bs-expert-form [data-send-status]:empty {display:none}
.bs-expert-form [data-send-status] {font-size:12px;font-weight:600;color:var(--expert-accent)}
.bs-expert-form [data-send-status][data-state="error"] {color:#a02e25}
.bs-expert-chat [hidden] {display:none!important}
.bs-expert-chat input:focus-visible,.bs-expert-chat textarea:focus-visible,.bs-expert-chat button:focus-visible,.bs-expert-chat a:focus-visible,.bs-expert-back:focus-visible {outline:2px solid #987129;outline-offset:4px}
.bs-expert-more {display:block;margin:12px auto}
.bs-expert-admin {padding-bottom:32px}
.bs-expert-admin .bs-expert-chat {margin-top:20px;padding:20px;background:var(--expert-bg);border:1px solid var(--expert-line);border-radius:12px}
.bs-expert-admin table {margin-top:16px}
.bs-expert-login {padding:24px;background:#fff;border:1px solid var(--expert-line);border-radius:12px;line-height:1.9}
.bs-expert-login a {display:inline-block;margin-top:12px;color:var(--expert-accent);font-weight:700;text-underline-offset:4px}
 .bs-expert-workspace {display:grid;grid-template-columns:260px minmax(0,1fr);gap:40px;align-items:start}
.bs-expert-guide {position:sticky;top:24px;padding:24px;background:#243047;color:#f2f7f0;border-radius:16px}
.bs-expert-guide small {color:#b1cbb8;font-size:12px}
.bs-expert-guide h2 {font-size:21px;line-height:1.7;margin:10px 0}
.bs-expert-guide p,.bs-expert-guide li {font-size:13px;line-height:2;color:#d6e5d8}
.bs-expert-guide ul {padding-inline-start:18px;margin:20px 0 0}
@media(max-width:900px) {.bs-expert-workspace{grid-template-columns:1fr;gap:0}.bs-expert-guide{display:none}}
@media(max-width:600px) {
    .bs-expert-wrap {padding:0 16px 16px}
    .bs-expert-heading {gap:12px;padding:16px 0;margin-bottom:20px}
    .bs-expert-heading h1 {font-size:20px}
    .bs-expert-heading-copy small {font-size:11px}
    .bs-expert-heading-mark {display:none}
    .bs-expert-back {font-size:12px}
    .bs-expert-empty {padding:20px 8px 28px}
    .bs-expert-empty h2 {font-size:18px}
    .bs-expert-message {max-width:92%;padding:12px 16px}
    .bs-expert-message p {font-size:14px}
    .bs-expert-message-meta {gap:12px;font-size:10px}
    .bs-expert-message-meta strong {font-size:11px}
    .bs-expert-form {padding:12px;margin-top:20px}
    .bs-expert-page .bs-expert-form {bottom:0;padding-bottom:calc(12px + env(safe-area-inset-bottom,0px));border-radius:12px}
    .bs-expert-chat .bs-expert-submit {min-width:104px}
    .bs-expert-pick {padding-inline:12px}
}

/* Scoped topic control; native keyboard and mobile selection. */
.bs-expert-topic-field{display:flex;align-items:center;gap:12px;margin-bottom:14px;min-width:0}
.bs-expert-topic-field label{flex-shrink:0;margin:0;font-size:13px}
.bs-expert-topic-field select{min-width:0;max-width:100%;width:240px;min-height:44px;padding:8px 12px;border:1px solid var(--expert-line);border-radius:8px;background:var(--expert-paper);color:var(--expert-ink);font:inherit;font-size:14px}
.bs-expert-topic-field select:focus-visible{outline:2px solid var(--expert-accent);outline-offset:2px}
.bs-expert-message-topic{display:block;margin:6px 0;font-size:12px;line-height:1.8;opacity:.85}
.bs-expert-form #bs-expert-policy{font-size:12px;line-height:1.9;margin:10px 0 4px}
@media(max-width:480px){.bs-expert-topic-field{gap:8px}.bs-expert-topic-field select{flex:1;width:auto}}
