/* محیط AMIR GPT — ظاهر شبیه ChatGPT: چیدمان LTR، منوی تخت، ورودی کپسولی، حباب آبی روشن */
:root[data-ws="gpt"] {
	--bg:#ffffff;--bg-side:#f9f9f9;--bg-elev:#ffffff;--text:#0d0d0d;--muted:#6b6b6b;--border:#e5e5e5;--hover:#ececec;--active:#e3e3e3;
	--accent:#0285ff;--accent-soft:#e6f2ff;--accent-contrast:#ffffff;--user-bubble:#e8f1fb;--composer-bg:#ffffff;--composer-border:#e5e5e5;--composer-radius:32px;
	--send-bg:#0285ff;--send-fg:#ffffff;--shadow:0 2px 10px rgba(0,0,0,.06);--shadow-lg:0 18px 50px rgba(0,0,0,.18);
	--code-bg:#f7f7f8;--code-head:#ececec;--code-text:#1d1d22;--code-muted:#6b6b6b;color-scheme:light;
}
@media (prefers-color-scheme: dark) {
	:root[data-ws="gpt"]:not([data-mode="light"]) {
	--bg:#000000;--bg-side:#0a0a0a;--bg-elev:#212121;--text:#ededed;--muted:#9b9b9b;--border:#2b2b2b;--hover:#1c1c1c;--active:#2a2a2a;
	--accent:#4da3ff;--accent-soft:#0d2a45;--accent-contrast:#001b33;--user-bubble:#2f2f2f;--composer-bg:#212121;--composer-border:#2f2f2f;
	--send-bg:#4da3ff;--send-fg:#00182e;--shadow:0 2px 14px rgba(0,0,0,.5);--shadow-lg:0 18px 50px rgba(0,0,0,.7);
	--code-bg:#0f0f0f;--code-head:#1c1c1c;--code-text:#e8e8e8;--code-muted:#9b9b9b;color-scheme:dark;
	}
}
:root[data-ws="gpt"][data-mode="dark"] {
	--bg:#000000;--bg-side:#0a0a0a;--bg-elev:#212121;--text:#ededed;--muted:#9b9b9b;--border:#2b2b2b;--hover:#1c1c1c;--active:#2a2a2a;
	--accent:#4da3ff;--accent-soft:#0d2a45;--accent-contrast:#001b33;--user-bubble:#2f2f2f;--composer-bg:#212121;--composer-border:#2f2f2f;
	--send-bg:#4da3ff;--send-fg:#00182e;--shadow:0 2px 14px rgba(0,0,0,.5);--shadow-lg:0 18px 50px rgba(0,0,0,.7);
	--code-bg:#0f0f0f;--code-head:#1c1c1c;--code-text:#e8e8e8;--code-muted:#9b9b9b;color-scheme:dark;
}

/* ---------- ظاهر شبیه ChatGPT ---------- */
.amirai-theme-gpt .app { direction: ltr; flex-direction: row-reverse; } /* منو همیشه سمت راست */
.amirai-theme-gpt .sidebar { width: 288px; padding: 10px 8px; gap: 2px; border-inline-end: 0; }
.amirai-theme-gpt .app.side-collapsed .sidebar { margin-inline-start: -288px; }
.amirai-theme-gpt .side-head { padding: 6px 8px 10px; }
.amirai-theme-gpt .brand-mark { background: none; width: 28px; height: 28px; border-radius: 0; color: var(--text); }
.amirai-theme-gpt .brand-mark svg { width: 26px; height: 26px; }
.amirai-theme-gpt .brand-title { font-weight: 500; font-size: 19px; letter-spacing: 0;  }
.amirai-theme-gpt .brand-sub { display: none; }
.amirai-theme-gpt .side-head .icon-btn { width: 32px; height: 32px; }

.amirai-theme-gpt .new-chat, .amirai-theme-gpt .search, .amirai-theme-gpt .proj-head, .amirai-theme-gpt .proj-item, .amirai-theme-gpt .bot-btn {
	border: 0; background: transparent; border-radius: 99px; padding: 9px 14px; font-size: 14px; font-weight: 500; color: var(--text); gap: 12px;
}
.amirai-theme-gpt .new-chat { background: var(--active); }
.amirai-theme-gpt .new-chat:hover, .amirai-theme-gpt .proj-item:hover, .amirai-theme-gpt .bot-btn:hover { background: var(--hover); }
.amirai-theme-gpt .new-chat svg { width: 19px; height: 19px; color: var(--text); }
.amirai-theme-gpt .search {
	padding-inline-start: 44px; background: transparent no-repeat 14px center / 18px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239a9a95' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='M16 16l4 4'/%3E%3C/svg%3E");
	direction: ltr; text-align: start;
}
.amirai-theme-gpt .search:hover, .amirai-theme-gpt .search:focus { background-color: var(--hover); border: 0; box-shadow: none; }
.amirai-theme-gpt .proj-head { color: var(--muted); font-size: 13px; font-weight: 500; padding-top: 16px; }
.amirai-theme-gpt .proj-empty { display: none; }
.amirai-theme-gpt .conv-group { font-size: 13px; font-weight: 500; padding: 16px 14px 4px; }
.amirai-theme-gpt .conv { border-radius: 99px; }
.amirai-theme-gpt .conv-title { font-size: 13.5px; padding: 8px 14px; unicode-bidi: plaintext; }
.amirai-theme-gpt .conv:hover { background: var(--hover); }
.amirai-theme-gpt .conv.active { background: var(--active); }
.amirai-theme-gpt .side-foot { border-top: 0; padding-top: 4px; }
.amirai-theme-gpt .disclaimer { display: none; }
.amirai-theme-gpt .avatar { width: 30px; height: 30px; background: var(--accent); color: #fff; font-size: 12.5px; }
.amirai-theme-gpt .user-row { padding: 6px 8px; border-radius: 99px; }

/* نوار بالا و درخشش پس‌زمینه */
.amirai-theme-gpt .topbar { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; min-height: 54px; padding: 8px 14px; }
.amirai-theme-gpt .main { background: var(--bg); }
.amirai-theme-gpt .ws-switch { font-size: 0; }
.amirai-theme-gpt .ws-switch button { font-size: 11.5px; padding: 5px 11px; }

/* گفتگو */
.amirai-theme-gpt .thread-inner { max-width: 780px; gap: 24px; }
.amirai-theme-gpt .msg.user { justify-content: flex-end; }
.amirai-theme-gpt .msg .bubble { background: var(--user-bubble); border-radius: 22px 22px 6px 22px; padding: 11px 18px; max-width: 80%; unicode-bidi: plaintext; text-align: start; }
.amirai-theme-gpt .msg.user .user-col { align-items: flex-end; }
.amirai-theme-gpt .msg .ava { background: transparent; width: 30px; height: 30px; color: var(--text); }
.amirai-theme-gpt .msg .ava svg { width: 26px; height: 26px; }
.amirai-theme-gpt .msg.assistant .body { font-size: 16px; line-height: 1.85; }
.amirai-theme-gpt .md p, .amirai-theme-gpt .md li, .amirai-theme-gpt .md h1, .amirai-theme-gpt .md h2, .amirai-theme-gpt .md h3, .amirai-theme-gpt .md h4, .amirai-theme-gpt .md blockquote { unicode-bidi: plaintext; text-align: start; }
.amirai-theme-gpt .msg .actions { opacity: 1; }

/* حالت خالی */
.amirai-theme-gpt .empty-logo { display: none; }
.amirai-theme-gpt .empty { justify-content: center; gap: 0; padding-bottom: 12vh; }
.amirai-theme-gpt .empty h1 {  font-weight: 400; font-size: clamp(30px, 4.6vw, 42px); background: none; color: var(--text); -webkit-text-fill-color: currentColor; margin-bottom: 28px; }
.amirai-theme-gpt .empty p { display: none; }
.amirai-theme-gpt .chips { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; max-width: 660px; margin-top: 22px; }
.amirai-theme-gpt .chip { min-height: 0; padding: 10px 16px; border: 0; background: transparent; border-radius: 99px; font-size: 14.5px; display: flex; align-items: center; gap: 12px; text-align: start; unicode-bidi: plaintext; }
.amirai-theme-gpt .chip::before { content: ""; width: 18px; height: 18px; flex: none; background: var(--accent); opacity: .85; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2c.6 5.4 4.6 9.4 10 10-5.4.6-9.4 4.6-10 10-.6-5.4-4.6-9.4-10-10 5.4-.6 9.4-4.6 10-10z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2c.6 5.4 4.6 9.4 10 10-5.4.6-9.4 4.6-10 10-.6-5.4-4.6-9.4-10-10 5.4-.6 9.4-4.6 10-10z'/%3E%3C/svg%3E") center / contain no-repeat; }
.amirai-theme-gpt .chip:hover { background: var(--hover); transform: none; }

/* ورودی کپسولی: + ، متن، مدل، ارسال */
.amirai-theme-gpt .composer { direction: ltr; border-radius: 32px; padding: 8px 10px; align-items: center; box-shadow: 0 1px 6px rgba(0,0,0,.08); }
.amirai-theme-gpt .composer-row { display: flex; align-items: center; gap: 2px; width: 100%; }
.amirai-theme-gpt .composer-row textarea { padding: 12px 10px; unicode-bidi: plaintext; text-align: start; font-size: 16px; }
.amirai-theme-gpt .composer-row .attach-btn { width: 38px; height: 38px; }
.amirai-theme-gpt .composer .model-btn { font-size: 14px; font-weight: 500; padding: 8px 12px; border-radius: 99px; color: var(--text);  }
.amirai-theme-gpt .composer .model-btn:hover { background: var(--hover); }
.amirai-theme-gpt .composer .menu { top: auto; bottom: calc(100% + 8px); inset-inline-start: auto; inset-inline-end: 0; direction: ltr; border-radius: 20px; }
.amirai-theme-gpt .send-btn { width: 40px; height: 40px; background: transparent; color: var(--accent); }
.amirai-theme-gpt .send-btn:hover { background: var(--hover); filter: none; }
.amirai-theme-gpt .attach-row { order: -1; }
.amirai-theme-gpt .composer-wrap { padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
.amirai-theme-gpt .composer:focus-within { box-shadow: 0 1px 6px rgba(0,0,0,.08), 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent); }
.amirai-theme-gpt .m-logo { background: var(--accent); color: #fff; border-radius: 50%; }
.amirai-theme-gpt .modal { border-radius: 28px; }
@media (max-width: 760px) { .amirai-theme-gpt .empty { padding-bottom: 6vh; } }
.amirai-theme-gpt .chips { width: 100%; align-self: center; }

/* تفاوت‌های ChatGPT */
.amirai-theme-gpt .empty h1 { font-weight: 500; font-size: clamp(26px, 4vw, 34px); }
.amirai-theme-gpt .brand-title { font-weight: 600; font-size: 18px; }
.amirai-theme-gpt .chip::before { -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.1 2.1 0 013 3L7 19l-4 1 1-4z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.1 2.1 0 013 3L7 19l-4 1 1-4z'/%3E%3C/svg%3E") center / contain no-repeat; background: var(--muted); opacity: 1; }
.amirai-theme-gpt .chip { color: var(--text); }
.amirai-theme-gpt .msg .bubble { border-radius: 22px; }
.amirai-theme-gpt .msg .ava { display: none; }
.amirai-theme-gpt .send-btn { background: var(--send-bg); color: var(--send-fg); width: 36px; height: 36px; margin-inline-start: 4px; }
.amirai-theme-gpt .send-btn:hover { background: var(--send-bg); filter: brightness(1.08); }
.amirai-theme-gpt .composer { box-shadow: 0 1px 4px rgba(0,0,0,.06); border-color: var(--composer-border); }
.amirai-theme-gpt .main { background: var(--bg); }
.amirai-theme-gpt .avatar { background: var(--accent); color: var(--accent-contrast); }
.amirai-theme-gpt .m-logo { background: var(--accent); color: var(--accent-contrast); }
.amirai-theme-gpt .composer-row textarea::placeholder, .amirai-theme-gemini .composer-row textarea::placeholder { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.amirai-theme-gpt .app.side-collapsed .sidebar { margin-inline-start: 0; margin-inline-end: -288px; }
.amirai-theme-gpt .topbar { flex-direction: row-reverse; }
@media (max-width: 860px) { .amirai-theme-gpt .sidebar { inset-inline-start: auto; inset-inline-end: 0; margin-inline-end: 0 !important; } .amirai-theme-gpt .app.side-collapsed .sidebar { margin-inline-end: 0; } }
