/*
 * بند ۴۹ فهرست ۶۴ (نسخهٔ ۱.۱۴.۰) — اسکلتون/توست واحد قالب آکادمی رویش.
 *
 * پیاده‌سازی سمت JS: assets/js/arx-ui.js (window.ARX_UI بدون وابستگی).
 *   - #arx-toasts  : پشتهٔ توست‌های RTL (پایین وسط، role=status aria-live=polite)
 *   - .arx-skeleton: بلوک‌های شیمر (مصرف با ARX_UI.skeleton)
 *   - .arx-modal   : پایهٔ مودال (برای استفاده‌های آینده)
 * همهٔ رنگ‌ها از توکن‌های بند ۴۷ (--arx-*) می‌آیند تا دارک مود (بند ۴۸) خودکار اعمال شود.
 */

/* ---------------------------------------------------------------
 * توست‌ها — پشتهٔ ثابت پایین وسط (RTL)
 * --------------------------------------------------------------- */
#arx-toasts {
	position: fixed;
	bottom: 16px;
	inset-inline: 0;
	margin-inline: auto;
	width: max-content;
	max-width: calc(100vw - 32px);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	z-index: 90;
	pointer-events: none;
}
.arx-toast {
	pointer-events: auto;
	display: flex;
	align-items: center;
	gap: 8px;
	max-width: 100%;
	padding: 10px 14px;
	border-radius: var(--arx-radius-md, 12px);
	background: #0f172a;
	color: #f8fafc;
	font-size: var(--arx-text-sm, 0.875rem);
	line-height: 1.8;
	border-inline-start: 4px solid var(--arx-info, #0284c7);
	box-shadow: var(--arx-shadow-3, 0 16px 40px rgba(15, 23, 42, 0.16));
	opacity: 0;
	transform: translateY(8px);
	transition: opacity var(--arx-transition, 180ms ease), transform var(--arx-transition, 180ms ease);
}
.arx-toast.is-visible {
	opacity: 1;
	transform: translateY(0);
}
.arx-toast.is-leaving {
	opacity: 0;
	transform: translateY(8px);
}
.arx-toast--success {
	border-inline-start-color: var(--arx-success, #059669);
}
.arx-toast--error {
	border-inline-start-color: var(--arx-danger, #dc2626);
}
.arx-toast--info {
	border-inline-start-color: var(--arx-info, #0284c7);
}

/* ---------------------------------------------------------------
 * اسکلتون — بلوک‌های شیمر (ARX_UI.skeleton)
 * --------------------------------------------------------------- */
.arx-skeleton {
	height: 14px;
	margin-block: 8px;
	border-radius: var(--arx-radius-sm, 8px);
	background: #e2e8f0;
	position: relative;
	overflow: hidden;
}
.arx-skeleton::after {
	content: "";
	position: absolute;
	inset: 0;
	transform: translateX(-100%);
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
	animation: arx-shimmer 1.4s infinite;
}
.arx-skeleton-loading {
	pointer-events: none;
}
@keyframes arx-shimmer {
	100% {
		transform: translateX(100%);
	}
}

/* ---------------------------------------------------------------
 * پایهٔ مودال (.arx-modal) — حداقلی، برای مصرف آینده
 * --------------------------------------------------------------- */
.arx-modal {
	position: fixed;
	inset: 0;
	z-index: 95;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(15, 23, 42, 0.55);
}
.arx-modal[hidden] {
	display: none;
}
.arx-modal__dialog {
	width: 100%;
	max-width: 420px;
	background: var(--arx-surface, #ffffff);
	color: var(--arx-on-surface, #0f172a);
	border: 1px solid var(--arx-surface-border, #e2e8f0);
	border-radius: var(--arx-radius-lg, 16px);
	padding: var(--arx-space-5, 24px);
	box-shadow: var(--arx-shadow-3, 0 16px 40px rgba(15, 23, 42, 0.16));
}

/* امنیت حرکت — بند ۴۹: شیمر بدون انیمیشن (prefers-reduced-motion) */
@media (prefers-reduced-motion: reduce) {
	.arx-toast {
		transition: none;
	}
	.arx-skeleton::after {
		animation: none;
	}
}
