/**
 * SAIM Smart Login - استایل فرم ورود/ثبت‌نام و تریگر هدر.
 * همه رنگ‌ها از طریق CSS Custom Properties روی .saimsl-root تعریف می‌شوند.
 * خصوصیات منطقی (logical properties) استفاده شده تا یک قاعده هم RTL هم LTR کار کند.
 *
 * بازطراحی: سطوح گلس‌مورفیسم ملایم (شفافیت + بلور)، آواتار/دکمه‌های برجسته‌تر،
 * آیکون‌های SVG مستقل به‌جای کاراکتر یونیکد. توکن‌های قبلی حفظ شده‌اند (برای
 * سازگاری با saimsl-account.css)؛ توکن‌های جدید (surface/gradient/border-strong)
 * اضافه شده‌اند.
 */

.saimsl-root {
	--saimsl-bg: #fdfbf8;
	--saimsl-bg-subtle: #f7f2ee;
	--saimsl-fg: #1d1712;
	--saimsl-fg-muted: #8a7c70;
	--saimsl-border: rgba(29, 23, 18, 0.10);
	--saimsl-border-strong: rgba(29, 23, 18, 0.18);
	--saimsl-accent: #e11d48;
	--saimsl-accent-fg: #ffffff;
	--saimsl-accent-soft: rgba(225, 29, 72, 0.12);
	--saimsl-gradient: linear-gradient(135deg, #f43f5e 0%, #fb7136 55%, #f7b733 100%);
	--saimsl-danger: #dc2626;
	--saimsl-danger-bg: #fef2f2;
	--saimsl-success: #16a34a;
	--saimsl-success-bg: #f0fdf4;
	--saimsl-warning: #d97706;
	--saimsl-warning-bg: #fffbeb;
	--saimsl-radius: 20px;
	--saimsl-radius-sm: 12px;
	--saimsl-shadow: 0 10px 30px rgba(60, 30, 10, 0.14), 0 2px 8px rgba(60, 30, 10, 0.06);
	--saimsl-focus-ring: 0 0 0 3px rgba(225, 29, 72, 0.28);
	--saimsl-surface: rgba(255, 255, 255, 0.55);
	--saimsl-surface-strong: rgba(255, 255, 255, 0.82);
	--saimsl-surface-hover: rgba(29, 23, 18, 0.06);
	/* رَمپِ تقویمِ فعالیت (۵ سطح، مستقل تا تنظیمشان آسان باشد). */
	--saimsl-heat-0: #ece5de;
	--saimsl-heat-1: #f7cdd9;
	--saimsl-heat-2: #ef94ab;
	--saimsl-heat-3: #e35075;
	--saimsl-heat-4: #c9174a;
	font-family: inherit;
	color: var(--saimsl-fg);
}

/* تم تیره: هم بر اساس ترجیح سیستم، هم با انتخاب صریح مدیر سایت */
@media (prefers-color-scheme: dark) {
	.saimsl-root:not([data-saimsl-theme="light"]) {
		--saimsl-bg: #14100e;
		--saimsl-bg-subtle: #1f1a17;
		--saimsl-fg: #f4ede6;
		--saimsl-fg-muted: #a89a8d;
		--saimsl-border: rgba(255, 255, 255, 0.08);
		--saimsl-border-strong: rgba(255, 255, 255, 0.16);
		--saimsl-accent-fg: #ffffff;
		--saimsl-accent-soft: rgba(242, 72, 112, 0.18);
		--saimsl-danger-bg: #2a1414;
		--saimsl-success-bg: #0f2417;
		--saimsl-warning-bg: #2a2013;
		--saimsl-surface: rgba(35, 29, 26, 0.55);
		--saimsl-surface-strong: rgba(35, 29, 26, 0.88);
		--saimsl-surface-hover: rgba(255, 255, 255, 0.06);
		--saimsl-shadow: 0 10px 34px rgba(0, 0, 0, 0.5);
		--saimsl-heat-0: #26201d;
		--saimsl-heat-1: #5a2233;
		--saimsl-heat-2: #8f2c48;
		--saimsl-heat-3: #c23a63;
		--saimsl-heat-4: #f24870;
	}
}
.saimsl-root[data-saimsl-theme="dark"] {
	--saimsl-bg: #14100e;
	--saimsl-bg-subtle: #1f1a17;
	--saimsl-fg: #f4ede6;
	--saimsl-fg-muted: #a89a8d;
	--saimsl-border: rgba(255, 255, 255, 0.08);
	--saimsl-border-strong: rgba(255, 255, 255, 0.16);
	--saimsl-accent-fg: #ffffff;
	--saimsl-accent-soft: rgba(242, 72, 112, 0.18);
	--saimsl-danger-bg: #2a1414;
	--saimsl-success-bg: #0f2417;
	--saimsl-warning-bg: #2a2013;
	--saimsl-surface: rgba(35, 29, 26, 0.55);
	--saimsl-surface-strong: rgba(35, 29, 26, 0.88);
	--saimsl-surface-hover: rgba(255, 255, 255, 0.06);
	--saimsl-shadow: 0 10px 34px rgba(0, 0, 0, 0.5);
	--saimsl-heat-0: #26201d;
	--saimsl-heat-1: #5a2233;
	--saimsl-heat-2: #8f2c48;
	--saimsl-heat-3: #c23a63;
	--saimsl-heat-4: #f24870;
}

@media (prefers-reduced-motion: reduce) {
	.saimsl-root * {
		transition-duration: 0.001ms !important;
		animation-duration: 0.001ms !important;
	}
}

.saimsl-hidden {
	display: none !important;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
}

/* -------------------------------------------------- */
/* کارت فرم                                            */
/* -------------------------------------------------- */

.saimsl-auth-card {
	max-width: 420px;
	margin-inline: auto;
	background: var(--saimsl-surface-strong);
	backdrop-filter: blur(24px);
	-webkit-backdrop-filter: blur(24px);
	border: 1px solid var(--saimsl-border);
	border-radius: var(--saimsl-radius);
	overflow: hidden;
	box-shadow: var(--saimsl-shadow);
}
.saimsl-auth-card.saimsl-standalone {
	margin-block: 48px;
}

.saimsl-auth-header {
	padding: 26px 22px 6px;
	text-align: center;
}
.saimsl-auth-header h2 {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	color: var(--saimsl-fg);
}
.saimsl-auth-subtitle {
	margin: 6px 0 0;
	font-size: 13px;
	color: var(--saimsl-fg-muted);
}

.saimsl-auth-body {
	padding: 16px 24px 28px;
}

/* تب‌های روش ورود (ایمیل/پیامک) */
.saimsl-method-tabs {
	display: flex;
	gap: 6px;
	padding: 4px;
	margin-bottom: 18px;
	background: var(--saimsl-bg-subtle);
	border-radius: 999px;
}
.saimsl-method-tabs button {
	flex: 1;
	padding: 9px 10px;
	border: none;
	border-radius: 999px;
	background: transparent;
	color: var(--saimsl-fg-muted);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.saimsl-method-tabs button:hover {
	color: var(--saimsl-fg);
}
.saimsl-method-tabs button.is-active {
	background: var(--saimsl-bg);
	color: var(--saimsl-fg);
	box-shadow: 0 2px 8px rgba(15, 15, 20, 0.08);
}
.saimsl-method-tabs button:focus-visible {
	outline: none;
	box-shadow: var(--saimsl-focus-ring);
}

.saimsl-social-buttons {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 4px;
}
.saimsl-social-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	text-align: center;
	padding: 12px 14px;
	border: 1px solid var(--saimsl-border);
	border-radius: 999px;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	color: var(--saimsl-fg);
	background: var(--saimsl-bg);
	transition: background-color 0.15s ease;
}
.saimsl-social-btn:hover {
	background: var(--saimsl-surface-hover);
}
.saimsl-social-icon {
	width: 18px;
	height: 18px;
	display: inline-flex;
	flex-shrink: 0;
}
.saimsl-social-icon svg {
	display: block;
	width: 100%;
	height: 100%;
}

.saimsl-divider {
	display: flex;
	align-items: center;
	text-align: center;
	color: var(--saimsl-fg-muted);
	font-size: 13px;
	margin-block: 16px;
}
.saimsl-divider::before,
.saimsl-divider::after {
	content: '';
	flex: 1;
	border-block-end: 1px solid var(--saimsl-border);
}
.saimsl-divider span {
	padding-inline: 10px;
}

.saimsl-auth-body input[type='text'],
.saimsl-auth-body input[type='password'],
.saimsl-auth-body input[type='tel'] {
	width: 100%;
	box-sizing: border-box;
	border: none;
	background: transparent;
	font-size: 14px;
	color: var(--saimsl-fg);
	padding: 0;
}
.saimsl-auth-body input:focus-visible {
	outline: none;
}

/* فیلد pill با آیکون داخلش - جایگزین input تنهای قبلی */
.saimsl-field {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 14px;
	margin-block-end: 12px;
	border: 1px solid var(--saimsl-border-strong);
	border-radius: var(--saimsl-radius-sm);
	background: var(--saimsl-bg);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.saimsl-field:focus-within {
	border-color: var(--saimsl-accent);
	box-shadow: var(--saimsl-focus-ring);
}
.saimsl-field-icon {
	width: 18px;
	height: 18px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	color: var(--saimsl-fg-muted);
	font-size: 13px;
	font-weight: 700;
}
.saimsl-field-icon svg {
	display: block;
	width: 100%;
	height: 100%;
}
.saimsl-field-toggle {
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	padding: 0;
	border: none;
	background: none;
	color: var(--saimsl-fg-muted);
	cursor: pointer;
}
.saimsl-field-toggle svg {
	display: block;
	width: 100%;
	height: 100%;
}
.saimsl-field-toggle:hover {
	color: var(--saimsl-fg);
}

.saimsl-form-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px;
	margin-block-end: 14px;
	font-size: 13px;
}
.saimsl-checkbox {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--saimsl-fg-muted);
	cursor: pointer;
	user-select: none;
}
.saimsl-checkbox input {
	margin: 0;
}
.saimsl-link-sm {
	color: var(--saimsl-fg-muted);
	text-decoration: none;
}
.saimsl-link-sm:hover {
	color: var(--saimsl-accent);
	text-decoration: underline;
}

.saimsl-alt-methods {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
	margin-block-end: 12px;
}

.saimsl-submit-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 13px;
	background: var(--saimsl-gradient);
	color: var(--saimsl-accent-fg);
	border: none;
	border-radius: 999px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 8px 20px rgba(225, 29, 72, 0.32);
	transition: filter 0.15s ease, transform 0.1s ease, opacity 0.15s ease;
}
.saimsl-submit-btn svg {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
}
.saimsl-submit-btn:hover {
	filter: brightness(1.05);
}
.saimsl-submit-btn:active {
	transform: scale(0.98);
}
.saimsl-submit-btn:focus-visible {
	outline: none;
	box-shadow: var(--saimsl-focus-ring);
}
.saimsl-submit-btn:disabled {
	opacity: 0.6;
	cursor: default;
	transform: none;
	filter: none;
}
.saimsl-btn-link {
	display: block;
	text-align: center;
	text-decoration: none;
	margin-block-start: 8px;
}

.saimsl-back-btn {
	display: block;
	width: 100%;
	background: none;
	border: none;
	color: var(--saimsl-fg-muted);
	font-size: 13px;
	padding-block-start: 10px;
	cursor: pointer;
}
.saimsl-back-btn:hover {
	color: var(--saimsl-fg);
}

.saimsl-link-btn {
	background: none;
	border: none;
	color: var(--saimsl-accent);
	font-size: 13px;
	cursor: pointer;
	padding: 0;
}
.saimsl-link-btn:hover {
	text-decoration: underline;
}
.saimsl-link-btn:disabled {
	color: var(--saimsl-fg-muted);
	cursor: default;
	text-decoration: none;
}

.saimsl-error,
.saimsl-error-message {
	color: var(--saimsl-danger);
	font-size: 13px;
	min-height: 18px;
	margin: 0 0 8px;
}

.saimsl-pending {
	font-size: 13px;
	color: var(--saimsl-fg);
	background: var(--saimsl-bg-subtle);
	border-radius: var(--saimsl-radius-sm);
	padding: 10px 12px;
	margin: 0 0 12px;
}

.saimsl-auth-footer {
	text-align: center;
	margin: 16px 0 0;
	font-size: 13px;
	color: var(--saimsl-fg-muted);
}
.saimsl-auth-footer a {
	color: var(--saimsl-accent);
	font-weight: 600;
	text-decoration: none;
}
.saimsl-auth-footer a:hover {
	text-decoration: underline;
}

.saimsl-password-strength {
	display: flex;
	gap: 6px;
	margin-block: -6px 12px;
}
.saimsl-password-strength span {
	flex: 1;
	height: 4px;
	border-radius: 2px;
	background: var(--saimsl-border);
}
.saimsl-password-strength span.saimsl-strength-1 { background: var(--saimsl-danger); }
.saimsl-password-strength span.saimsl-strength-2 { background: var(--saimsl-warning); }
.saimsl-password-strength span.saimsl-strength-3,
.saimsl-password-strength span.saimsl-strength-4 { background: var(--saimsl-success); }

/* Honeypot: کاملاً از دید کاربر واقعی و صفحه‌خوان‌ها مخفی */
.saimsl-honeypot-wrap {
	position: absolute;
	inset-inline-start: -9999px;
	top: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

#saimsl-captcha-slot:empty {
	display: none;
}
#saimsl-captcha-slot {
	margin-block-end: 12px;
	display: flex;
	justify-content: center;
}

/* -------------------------------------------------- */
/* هدر: آیکون تریگر، مودال، منوی حساب                  */
/* -------------------------------------------------- */

.saimsl-header-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	background: transparent;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	color: var(--saimsl-fg);
	position: relative;
	transition: background-color 0.15s ease, color 0.15s ease;
}
.saimsl-header-icon-btn:hover {
	background: var(--saimsl-accent-soft);
	color: var(--saimsl-accent);
}
.saimsl-header-icon-btn:focus-visible {
	outline: none;
	box-shadow: var(--saimsl-focus-ring);
}
.saimsl-header-icon-btn img,
.saimsl-header-avatar {
	border-radius: 50%;
	box-shadow: 0 0 0 2px var(--saimsl-border-strong);
}
.saimsl-account-btn:hover .saimsl-header-avatar {
	box-shadow: 0 0 0 2px var(--saimsl-accent);
}
.saimsl-badge-dot {
	position: absolute;
	top: 2px;
	inset-inline-end: 2px;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--saimsl-accent);
	border: 2px solid var(--saimsl-bg);
}

.saimsl-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.saimsl-modal.saimsl-hidden {
	display: none;
}
.saimsl-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(15, 10, 8, 0.55);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}
.saimsl-modal-content {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 420px;
	max-height: 90vh;
	overflow-y: auto;
	border-radius: var(--saimsl-radius);
	animation: saimsl-modal-in 0.2s ease;
}
@keyframes saimsl-modal-in {
	from { opacity: 0; transform: translateY(8px) scale(0.98); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}
.saimsl-modal-content .saimsl-auth-card {
	box-shadow: none;
}
.saimsl-modal-close {
	position: absolute;
	top: 14px;
	inset-inline-start: 14px;
	width: 32px;
	height: 32px;
	border: none;
	background: var(--saimsl-surface-hover);
	color: var(--saimsl-fg-muted);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 2;
	transition: background-color 0.15s ease, color 0.15s ease;
}
.saimsl-modal-close:hover {
	background: var(--saimsl-danger-bg);
	color: var(--saimsl-danger);
}
.saimsl-modal-close:focus-visible {
	outline: none;
	box-shadow: var(--saimsl-focus-ring);
}

.saimsl-header-account {
	position: relative;
}
.saimsl-account-menu {
	/*
	 * چرا fixed به‌جای absolute؟ از نسخهٔ ۲.۲.۱ این منو فقط یک‌بار در پابرگ
	 * صفحه رندر می‌شود (نه کنار هر دکمهٔ آواتار)، پس دیگر یک والدِ
	 * position:relative مشخص ندارد که نسبت به آن absolute موقعیت بگیرد. با
	 * fixed، جاوااسکریپت (saimsl-auth.js) با getBoundingClientRect() دکمهٔ
	 * کلیک‌شده، top/left واقعی را هر بار محاسبه و با !important ست می‌کند -
	 * این هم مشکل «داخل والدِ overflow:hidden منوی موبایل گم می‌شد» را حل
	 * می‌کند، هم دیگر به قانون‌های left/right بیرونی وابسته نیست.
	 */
	position: fixed !important;
	min-width: 220px;
	/* جلوگیری از بیرون‌زدن از لبهٔ صفحه وقتی تریگر نزدیک کنارهٔ ویوپورت است. */
	max-width: calc(100vw - 24px);
	background: var(--saimsl-surface-strong);
	backdrop-filter: blur(24px);
	-webkit-backdrop-filter: blur(24px);
	border: 1px solid var(--saimsl-border);
	border-radius: var(--saimsl-radius-sm);
	box-shadow: var(--saimsl-shadow);
	padding: 8px;
	/* هم‌سطح با z-index مودال ورود (100000) تا مطمئن باشیم روی منوی
	   موبایل/آف‌کانواس قالب - که خودش معمولاً z-index بالایی دارد - قرار می‌گیرد. */
	z-index: 100000;
	color: var(--saimsl-fg);
	animation: saimsl-modal-in 0.16s ease;
}
.saimsl-account-menu.saimsl-hidden {
	display: none;
}
.saimsl-account-menu-name {
	padding: 8px 10px 12px;
	font-weight: 700;
	font-size: 13px;
	border-block-end: 1px solid var(--saimsl-border);
	margin-block-end: 4px;
}
.saimsl-account-menu a {
	display: flex;
	align-items: center;
	gap: 10px;
	justify-content: space-between;
	padding: 9px 10px;
	border-radius: 8px;
	font-size: 13px;
	color: inherit;
	text-decoration: none;
}
.saimsl-account-menu a svg {
	flex-shrink: 0;
}
.saimsl-account-menu a:hover {
	background: var(--saimsl-surface-hover);
}
.saimsl-account-menu .saimsl-logout-link {
	color: var(--saimsl-danger);
	margin-block-start: 6px;
	border-block-start: 1px solid var(--saimsl-border);
	padding-block-start: 10px;
	border-radius: 0 0 8px 8px;
}
.saimsl-account-menu .saimsl-logout-link:hover {
	background: var(--saimsl-danger-bg);
}
.saimsl-badge-count {
	background: var(--saimsl-accent);
	color: #fff;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	padding: 1px 7px;
}

/* -------------------------------------------------- */
/* نوار عملیات انتهای مطلب: لایک، بوکمارک، اشتراک‌گذاری، */
/* پرش به نظرات، دنبال‌کردن نویسنده                     */
/* -------------------------------------------------- */

.saimsl-post-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 16px;
	margin-block: 32px;
	padding: 22px 24px;
	background: var(--saimsl-surface);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border: 1px solid var(--saimsl-border);
	border-radius: var(--saimsl-radius);
	box-shadow: var(--saimsl-shadow);
}

.saimsl-post-actions-author {
	display: flex;
	align-items: center;
	gap: 12px;
}

/* آواتار: پس‌زمینهٔ حرف اول همیشه زیرِ تصویر است؛ اگر تصویر لود نشود (onerror) همان دیده می‌شود */
.saimsl-avatar {
	position: relative;
	display: inline-block;
	flex-shrink: 0;
	border-radius: 50%;
	overflow: hidden;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--saimsl-accent) 40%, transparent);
}
.saimsl-avatar-fallback {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-weight: 700;
	font-size: 1.1em;
	line-height: 1;
}
.saimsl-avatar-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
}

.saimsl-post-actions-author-info {
	display: flex;
	flex-direction: column;
	gap: 6px;
	align-items: flex-start;
}
.saimsl-post-actions-author-name {
	font-size: 14px;
	font-weight: 700;
	color: var(--saimsl-fg);
	text-decoration: none;
}
.saimsl-post-actions-author-name:hover {
	text-decoration: underline;
}

.saimsl-post-actions-reactions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.saimsl-reaction-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 9px 16px;
	border-radius: 999px;
	border: 1px solid var(--saimsl-border);
	background: var(--saimsl-bg);
	color: var(--saimsl-fg-muted);
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease,
		transform 0.1s ease, box-shadow 0.15s ease;
}
.saimsl-reaction-btn:hover {
	background: var(--saimsl-surface-hover);
	color: var(--saimsl-fg);
	border-color: color-mix(in srgb, var(--saimsl-accent) 30%, var(--saimsl-border));
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(15, 15, 20, 0.08);
}
.saimsl-reaction-btn:active {
	transform: translateY(0) scale(0.94);
}
.saimsl-reaction-btn:focus-visible {
	outline: none;
	box-shadow: var(--saimsl-focus-ring);
}
.saimsl-reaction-btn:disabled {
	opacity: 0.6;
	cursor: default;
	transform: none;
	box-shadow: none;
}
.saimsl-reaction-btn .saimsl-reaction-count {
	color: var(--saimsl-fg-muted);
	font-size: 12px;
}

.saimsl-reaction-btn.is-active {
	border-color: var(--saimsl-accent);
	color: var(--saimsl-accent);
	background: color-mix(in srgb, var(--saimsl-accent) 12%, var(--saimsl-bg));
}
.saimsl-reaction-btn.is-active .saimsl-reaction-count {
	color: var(--saimsl-accent);
}
@keyframes saimsl-icon-pop {
	0% { transform: scale(1); }
	45% { transform: scale(1.28); }
	100% { transform: scale(1); }
}
.saimsl-reaction-btn.is-active .saimsl-reaction-icon {
	animation: saimsl-icon-pop 0.28s ease;
}

/* دعوت اصلی به تعامل: برخلاف بقیه، همیشه رنگی است تا چشم را جذب کند */
.saimsl-comment-jump-btn {
	background: var(--saimsl-accent-soft);
	border-color: color-mix(in srgb, var(--saimsl-accent) 30%, var(--saimsl-border));
	color: var(--saimsl-accent);
	font-weight: 700;
}
.saimsl-comment-jump-btn:hover {
	background: color-mix(in srgb, var(--saimsl-accent) 20%, var(--saimsl-bg));
	color: var(--saimsl-accent);
}

/* آیکون‌ها: SVG مستقل inline (بدون فونت آیکون یا کتابخانهٔ خارجی) */
.saimsl-reaction-icon {
	width: 16px;
	height: 16px;
	display: inline-flex;
	flex-shrink: 0;
}
.saimsl-reaction-icon svg {
	display: block;
	width: 100%;
	height: 100%;
}
/* دو نسخهٔ خطی/پرشده هر آیکون رندر می‌شود؛ فقط با کلاس is-active جابه‌جا می‌شوند
   (بدون نیاز به رندر مجدد سمت سرور) چون جاوااسکریپت فقط کلاس دکمه را toggle می‌کند. */
.saimsl-reaction-btn .saimsl-icon-filled { display: none; }
.saimsl-reaction-btn.is-active .saimsl-icon-filled { display: inline-flex; }
.saimsl-reaction-btn.is-active .saimsl-icon-outline { display: none; }

.saimsl-follow-btn {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 7px 18px;
	border-radius: 999px;
	border: 1px solid transparent;
	background: var(--saimsl-gradient);
	color: var(--saimsl-accent-fg);
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(225, 29, 72, 0.3);
	transition: filter 0.15s ease, background-color 0.15s ease, color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}
.saimsl-follow-btn:hover {
	filter: brightness(1.05);
}
.saimsl-follow-btn:active {
	transform: scale(0.95);
}
.saimsl-follow-btn:focus-visible {
	outline: none;
	box-shadow: var(--saimsl-focus-ring);
}
.saimsl-follow-btn.is-active {
	background: transparent;
	color: var(--saimsl-accent);
	border-color: var(--saimsl-accent);
	box-shadow: none;
}
.saimsl-follow-btn.is-active:hover {
	background: var(--saimsl-accent-soft);
}
.saimsl-follow-btn:disabled {
	opacity: 0.6;
	cursor: default;
	transform: none;
	box-shadow: none;
}

/* شمارندهٔ دنبال‌کننده کنارِ دکمهٔ فالو (انگیزه‌ای برای دنبال‌کردن). */
.saimsl-follow-wrap {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}
.saimsl-follow-count {
	font-size: 12px;
	color: var(--saimsl-fg-muted);
	white-space: nowrap;
}

/* نشانِ «دنبال‌شده» و برجسته‌سازیِ بلوکِ نویسنده وقتی کاربر او را دنبال کرده (مورد ۸). */
.saimsl-post-actions-author-head {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}
.saimsl-following-flag {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	padding: 2px 9px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	background: var(--saimsl-accent-soft);
	color: var(--saimsl-accent);
}
/* استایلِ author روی display از UA styleِ [hidden] قوی‌تر است، پس خودمان صریحاً پنهانش می‌کنیم. */
.saimsl-following-flag[hidden] {
	display: none;
}
.saimsl-following-flag svg {
	width: 12px;
	height: 12px;
}
/* نشانِ pill خودش به‌قدرِ کافی برجسته است؛ نامِ نویسنده هم وقتی دنبال شده accent می‌گیرد. */
.saimsl-post-actions-author.is-following .saimsl-post-actions-author-name {
	color: var(--saimsl-accent);
}

/* -------------------------------------------------- */
/* جعبهٔ «فایلِ ویژهٔ اعضا» - شورت‌کدِ [saimsl_gated_download] */
/* در هر نوشته‌ای می‌تواند باشد، پس در بستهٔ auth (همه‌جا بارگذاری‌شونده) است. */
/* -------------------------------------------------- */

.saimsl-gated-box {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	margin-block: 28px;
	padding: 20px 22px;
	background: var(--saimsl-surface);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border: 1px solid var(--saimsl-border);
	border-radius: var(--saimsl-radius);
	box-shadow: var(--saimsl-shadow);
}
.saimsl-gated-icon {
	flex-shrink: 0;
	font-size: 28px;
	line-height: 1;
}
.saimsl-gated-body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
	min-width: 0;
}
.saimsl-gated-label {
	font-size: 15px;
	color: var(--saimsl-fg);
}
.saimsl-gated-deadline {
	margin: 0;
	font-size: 12px;
	color: var(--saimsl-fg-muted);
}
.saimsl-gated-countdown-value {
	font-weight: 700;
	color: var(--saimsl-accent);
}
.saimsl-gated-box.is-expired {
	opacity: 0.7;
}
.saimsl-gated-box.is-expired .saimsl-gated-icon {
	filter: grayscale(1);
}
.saimsl-gated-progress {
	width: 100%;
	max-width: 220px;
	height: 6px;
	border-radius: 999px;
	background: var(--saimsl-border);
	overflow: hidden;
}
.saimsl-gated-progress-bar {
	display: block;
	height: 100%;
	border-radius: inherit;
	background: var(--saimsl-gradient);
	transition: width 0.3s ease;
}
.saimsl-gated-download-btn,
.saimsl-gated-box .saimsl-open-modal-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 22px;
	border-radius: 999px;
	border: none;
	background: var(--saimsl-gradient);
	color: var(--saimsl-accent-fg);
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
	box-shadow: 0 6px 16px rgba(225, 29, 72, 0.28);
	transition: filter 0.15s ease, transform 0.1s ease;
}
.saimsl-gated-download-btn:hover,
.saimsl-gated-box .saimsl-open-modal-btn:hover {
	filter: brightness(1.05);
}
.saimsl-gated-download-btn:active,
.saimsl-gated-box .saimsl-open-modal-btn:active {
	transform: scale(0.97);
}

/* فهرستِ چند «فایلِ ویژهٔ اعضا» پشتِ هم (ناحیهٔ کاربری) - فاصله از خودِ لیست، نه از margin تکیِ هر جعبه. */
.saimsl-gated-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.saimsl-gated-list .saimsl-gated-box {
	margin-block: 0;
}

.saimsl-share-wrap {
	position: relative;
	display: inline-flex;
}
.saimsl-share-dropdown {
	position: absolute !important;
	bottom: calc(100% + 10px) !important;
	/* همان دلیل .saimsl-account-menu: قفل صریح هر دو سمت با !important تا CSS قالب نتواند
	   left/right فیزیکی را بازنویسی کند. */
	inset-inline-end: 0 !important;
	inset-inline-start: auto !important;
	min-width: 180px;
	max-width: calc(100vw - 24px);
	background: var(--saimsl-surface-strong);
	backdrop-filter: blur(24px);
	-webkit-backdrop-filter: blur(24px);
	border: 1px solid var(--saimsl-border);
	border-radius: var(--saimsl-radius-sm);
	box-shadow: var(--saimsl-shadow);
	padding: 6px;
	z-index: 50;
	display: flex;
	flex-direction: column;
	gap: 2px;
	animation: saimsl-modal-in 0.15s ease;
}
.saimsl-share-option {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	box-sizing: border-box;
	text-align: start;
	padding: 9px 12px;
	border: none;
	background: none;
	border-radius: 8px;
	color: var(--saimsl-fg);
	font-size: 13px;
	text-decoration: none;
	cursor: pointer;
	font-family: inherit;
}
.saimsl-share-option svg {
	/* بدون width/height صریح، SVGهای این آیکون‌ها (که خودشان هیچ width/height
	   ندارند) به اندازهٔ پیش‌فرض مرورگر (۳۰۰×۱۵۰ یا مشابه) رندر می‌شدند - همان
	   آیکون‌های غول‌پیکر روی منوی اشتراک‌گذاری. */
	width: 16px;
	height: 16px;
	flex-shrink: 0;
}
.saimsl-share-option:hover {
	background: var(--saimsl-surface-hover);
}
.saimsl-share-copy {
	border-top: 1px solid var(--saimsl-border);
	margin-block-start: 4px;
	padding-block-start: 10px;
}

.saimsl-share-toast {
	position: fixed;
	bottom: 24px;
	left: 50%;
	transform: translateX(-50%);
	background: var(--saimsl-fg);
	color: var(--saimsl-bg);
	padding: 10px 20px;
	border-radius: 999px;
	font-size: 13px;
	z-index: 100001;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease;
}
.saimsl-share-toast.is-visible {
	opacity: 1;
}

.saimsl-post-actions-follow-row {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

/* -------------------------------------------------- */
/* لینکدین: دکمهٔ نویسنده، بنرِ رسانه، nudge رفتاری       */
/* -------------------------------------------------- */

.saimsl-linkedin-icon {
	width: 16px;
	height: 16px;
	display: inline-flex;
	flex-shrink: 0;
	border-radius: 3px;
	overflow: hidden;
}
.saimsl-linkedin-icon svg {
	display: block;
	width: 100%;
	height: 100%;
}

.saimsl-linkedin-btn {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 7px 16px;
	border-radius: 999px;
	border: 1px solid var(--saimsl-border);
	background: var(--saimsl-bg);
	color: var(--saimsl-fg-muted);
	font-size: 12px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.saimsl-linkedin-btn:hover {
	background: color-mix(in srgb, #0A66C2 10%, var(--saimsl-bg));
	border-color: #0A66C2;
	color: #0A66C2;
}

.saimsl-linkedin-banner {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	padding: 14px 20px;
	margin: 0 24px 4px;
	background: color-mix(in srgb, #0A66C2 8%, var(--saimsl-bg-subtle));
	border: 1px solid color-mix(in srgb, #0A66C2 25%, var(--saimsl-border));
	border-radius: var(--saimsl-radius-sm);
}
.saimsl-linkedin-banner .saimsl-linkedin-icon {
	width: 22px;
	height: 22px;
	flex-shrink: 0;
}
.saimsl-linkedin-banner-text {
	flex: 1;
	min-width: 160px;
	font-size: 13px;
	font-weight: 600;
	color: var(--saimsl-fg);
}
.saimsl-linkedin-banner-btn {
	flex-shrink: 0;
	padding: 8px 20px;
	border-radius: 999px;
	background: #0A66C2;
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
	transition: filter 0.15s ease;
}
.saimsl-linkedin-banner-btn:hover {
	filter: brightness(1.1);
}

/* nudge رفتاری: با جاوااسکریپت ساخته می‌شود (نگاه کنید به saimsl-auth.js)،
   نه در هیچ تمپلیتی - چون باید روی هر صفحه‌ای (نه فقط ناحیه کاربری) بتواند
   ظاهر شود. */
.saimsl-li-nudge {
	position: fixed;
	inset-block-end: 20px;
	inset-inline-start: 20px;
	z-index: 100001;
	display: flex;
	align-items: center;
	gap: 12px;
	max-width: 360px;
	padding: 14px 16px;
	background: var(--saimsl-surface-strong);
	backdrop-filter: blur(24px);
	-webkit-backdrop-filter: blur(24px);
	border: 1px solid var(--saimsl-border);
	border-radius: var(--saimsl-radius-sm);
	box-shadow: var(--saimsl-shadow);
	animation: saimsl-modal-in 0.25s ease;
}
.saimsl-li-nudge-icon {
	width: 26px;
	height: 26px;
	flex-shrink: 0;
	border-radius: 5px;
	overflow: hidden;
}
.saimsl-li-nudge-icon svg {
	display: block;
	width: 100%;
	height: 100%;
}
.saimsl-li-nudge-text {
	flex: 1;
	font-size: 13px;
	color: var(--saimsl-fg);
}
.saimsl-li-nudge-actions {
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex-shrink: 0;
}
.saimsl-li-nudge-btn {
	padding: 7px 14px;
	border-radius: 999px;
	background: #0A66C2;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	text-decoration: none;
	text-align: center;
	white-space: nowrap;
}
.saimsl-login-nudge-btn {
	padding: 7px 14px;
	border: none;
	border-radius: 999px;
	background: var(--saimsl-gradient);
	color: var(--saimsl-accent-fg);
	font-size: 12px;
	font-weight: 700;
	text-align: center;
	white-space: nowrap;
	cursor: pointer;
}
.saimsl-li-nudge-close {
	position: absolute;
	top: 6px;
	inset-inline-end: 8px;
	background: none;
	border: none;
	color: var(--saimsl-fg-muted);
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	padding: 4px;
}
.saimsl-li-nudge-close:hover {
	color: var(--saimsl-fg);
}

@media (max-width: 560px) {
	.saimsl-post-actions {
		flex-direction: column;
		align-items: stretch;
	}
	.saimsl-post-actions-reactions {
		justify-content: space-between;
	}
	.saimsl-linkedin-banner {
		margin-inline: 16px;
	}
	.saimsl-li-nudge {
		inset-inline-end: 20px;
		max-width: none;
	}
}
