/* محیط AMIR GEMINI — روشن، سبک و گرد با لحن آبی و گرادیان رنگی در خوش‌آمدگویی */

:root[data-ws="gemini"] {
	--bg: #f8f9fb;
	--bg-side: #ffffff;
	--bg-elev: #ffffff;
	--text: #1f1f1f;
	--muted: #5f6368;
	--border: #dfe4ea;
	--hover: #eef2f8;
	--active: #e6edf8;
	--accent: #0b57d0;
	--accent-soft: #e8f0fe;
	--accent-contrast: #ffffff;
	--user-bubble: #e9eef6;
	--composer-bg: #ffffff;
	--composer-border: #ffffff;
	--composer-radius: 32px;
	--send-bg: #0b57d0;
	--send-fg: #ffffff;
	--shadow: 0 1px 3px rgba(31, 31, 31, .08);
	--shadow-lg: 0 18px 50px rgba(31, 31, 31, .18);
	--code-bg: #f0f4f9;
	--code-head: #e1e8f1;
	--code-text: #1f1f1f;
	--code-muted: #5f6368;
	color-scheme: light;
}

@media (prefers-color-scheme: dark) {
	:root[data-ws="gemini"]:not([data-mode="light"]) {
		--bg: #0f0f10;
		--bg-side: #161617;
		--bg-elev: #1e1f20;
		--text: #e3e3e3;
		--muted: #9aa0a6;
		--border: #37393b;
		--hover: #242526;
		--active: #26282b;
		--accent: #8ab4f8;
		--accent-soft: #1d2b45;
		--accent-contrast: #062e6f;
		--user-bubble: #282a2c;
		--composer-bg: #1e1f20;
		--composer-border: #1e1f20;
		--composer-radius: 32px;
		--send-bg: #8ab4f8;
		--send-fg: #062e6f;
		--shadow: 0 1px 4px rgba(0, 0, 0, .4);
		--shadow-lg: 0 18px 50px rgba(0, 0, 0, .6);
		--code-bg: #0f0f10;
		--code-head: #1b1c1d;
		--code-text: #e3e3e3;
		--code-muted: #9aa0a6;
		color-scheme: dark;
	}
}

:root[data-ws="gemini"][data-mode="dark"] {
	--bg: #0f0f10;
	--bg-side: #161617;
	--bg-elev: #1e1f20;
	--text: #e3e3e3;
	--muted: #9aa0a6;
	--border: #37393b;
	--hover: #242526;
	--active: #26282b;
	--accent: #8ab4f8;
	--accent-soft: #1d2b45;
	--accent-contrast: #062e6f;
	--user-bubble: #282a2c;
	--composer-bg: #1e1f20;
	--composer-border: #1e1f20;
	--composer-radius: 32px;
	--send-bg: #8ab4f8;
	--send-fg: #062e6f;
	--shadow: 0 1px 4px rgba(0, 0, 0, .4);
	--shadow-lg: 0 18px 50px rgba(0, 0, 0, .6);
	--code-bg: #0f0f10;
	--code-head: #1b1c1d;
	--code-text: #e3e3e3;
	--code-muted: #9aa0a6;
	color-scheme: dark;
}

/* ---------- ظاهر شبیه Gemini: چیدمان LTR، منوی تخت، ورودی کپسولی، درخشش آبی ---------- */
:root[data-ws="gemini"] { --grad: linear-gradient(90deg, #4285f4 0%, #9b72cb 52%, #d96570 100%); --glow: rgba(66, 133, 244, .16); }
@media (prefers-color-scheme: dark) { :root[data-ws="gemini"]:not([data-mode="light"]) { --glow: rgba(40, 70, 200, .28); } }
:root[data-ws="gemini"][data-mode="dark"] { --glow: rgba(40, 70, 200, .28); }

.amirai-theme-gemini .app { direction: ltr; flex-direction: row-reverse; } /* منو همیشه سمت راست */
.amirai-theme-gemini .sidebar { width: 288px; padding: 10px 8px; gap: 2px; border-inline-end: 0; }
.amirai-theme-gemini .app.side-collapsed .sidebar { margin-inline-start: -288px; }
.amirai-theme-gemini .side-head { padding: 6px 8px 10px; }
.amirai-theme-gemini .brand-mark { background: none; width: 28px; height: 28px; border-radius: 0; color: #4285f4; }
.amirai-theme-gemini .brand-mark svg { width: 26px; height: 26px; }
.amirai-theme-gemini .brand-title { font-weight: 500; font-size: 19px; letter-spacing: 0; font-family: "Google Sans", "Product Sans", Roboto, "Vazirmatn", system-ui, sans-serif; }
.amirai-theme-gemini .brand-sub { display: none; }
.amirai-theme-gemini .side-head .icon-btn { width: 32px; height: 32px; }

.amirai-theme-gemini .new-chat, .amirai-theme-gemini .search, .amirai-theme-gemini .proj-head, .amirai-theme-gemini .proj-item, .amirai-theme-gemini .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-gemini .new-chat { background: var(--active); }
.amirai-theme-gemini .new-chat:hover, .amirai-theme-gemini .proj-item:hover, .amirai-theme-gemini .bot-btn:hover { background: var(--hover); }
.amirai-theme-gemini .new-chat svg { width: 19px; height: 19px; color: var(--text); }
.amirai-theme-gemini .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-gemini .search:hover, .amirai-theme-gemini .search:focus { background-color: var(--hover); border: 0; box-shadow: none; }
.amirai-theme-gemini .proj-head { color: var(--muted); font-size: 13px; font-weight: 500; padding-top: 16px; }
.amirai-theme-gemini .proj-empty { display: none; }
.amirai-theme-gemini .conv-group { font-size: 13px; font-weight: 500; padding: 16px 14px 4px; }
.amirai-theme-gemini .conv { border-radius: 99px; }
.amirai-theme-gemini .conv-title { font-size: 13.5px; padding: 8px 14px; unicode-bidi: plaintext; }
.amirai-theme-gemini .conv:hover { background: var(--hover); }
.amirai-theme-gemini .conv.active { background: var(--active); }
.amirai-theme-gemini .side-foot { border-top: 0; padding-top: 4px; }
.amirai-theme-gemini .disclaimer { display: none; }
.amirai-theme-gemini .avatar { width: 30px; height: 30px; background: var(--grad); color: #fff; font-size: 12.5px; }
.amirai-theme-gemini .user-row { padding: 6px 8px; border-radius: 99px; }

/* نوار بالا و درخشش پس‌زمینه */
.amirai-theme-gemini .topbar { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; min-height: 54px; padding: 8px 14px; }
.amirai-theme-gemini .main { background: radial-gradient(ellipse 55% 42% at 50% 58%, var(--glow), transparent 72%), var(--bg); }
.amirai-theme-gemini .ws-switch { font-size: 0; }
.amirai-theme-gemini .ws-switch button { font-size: 11.5px; padding: 5px 11px; }

/* گفتگو */
.amirai-theme-gemini .thread-inner { max-width: 780px; gap: 24px; }
.amirai-theme-gemini .msg.user { justify-content: flex-end; }
.amirai-theme-gemini .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-gemini .msg.user .user-col { align-items: flex-end; }
.amirai-theme-gemini .msg .ava { background: transparent; width: 30px; height: 30px; color: #4285f4; }
.amirai-theme-gemini .msg .ava svg { width: 26px; height: 26px; }
.amirai-theme-gemini .msg.assistant .body { font-size: 16px; line-height: 1.85; }
.amirai-theme-gemini .md p, .amirai-theme-gemini .md li, .amirai-theme-gemini .md h1, .amirai-theme-gemini .md h2, .amirai-theme-gemini .md h3, .amirai-theme-gemini .md h4, .amirai-theme-gemini .md blockquote { unicode-bidi: plaintext; text-align: start; }
.amirai-theme-gemini .msg .actions { opacity: 1; }

/* حالت خالی */
.amirai-theme-gemini .empty-logo { display: none; }
.amirai-theme-gemini .empty { justify-content: center; gap: 0; padding-bottom: 12vh; }
.amirai-theme-gemini .empty h1 { font-family: "Google Sans", "Product Sans", Roboto, "Vazirmatn", system-ui, sans-serif; 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-gemini .empty p { display: none; }
.amirai-theme-gemini .chips { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; max-width: 660px; margin-top: 22px; }
.amirai-theme-gemini .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-gemini .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-gemini .chip:hover { background: var(--hover); transform: none; }

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

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