.slm-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, 0.55);
	backdrop-filter: blur(2px);
	z-index: 999999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
}

.slm-modal-overlay.slm-modal-open {
	display: flex;
}

.slm-modal-box {
	position: relative;
	width: 100%;
	max-width: 420px;
	max-height: 90vh;
	overflow-y: auto;
	background: transparent;
	animation: slm-modal-in .18s ease;
}

@keyframes slm-modal-in {
	from { transform: translateY(12px); opacity: 0; }
	to   { transform: translateY(0); opacity: 1; }
}

.slm-modal-box .slm-wrapper {
	margin: 0;
	padding: 0;
	max-width: none;
}

.slm-modal-close {
	position: absolute;
	top: -6px;
	left: -6px;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #fff;
	border: none;
	box-shadow: 0 2px 10px rgba(0,0,0,0.15);
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	color: #1f2937;
	z-index: 2;
}

.slm-modal-close:hover {
	background: #f3f4f6;
}

.slm-modal-loading {
	background: #fff;
	border-radius: 12px;
	padding: 40px;
	text-align: center;
	font-size: 14px;
	color: #6b7280;
	direction: rtl;
}

/* حالت اجباری (محدودسازی صفحه) - بدون دکمه بستن، پس‌زمینه غیرقابل تعامل */
.slm-modal-overlay.slm-modal-forced .slm-modal-close {
	display: none;
}

body.slm-modal-active {
	overflow: hidden;
}

body.slm-restricted-blur > *:not(.slm-modal-overlay) {
	filter: blur(4px);
	pointer-events: none;
	-webkit-user-select: none;
	user-select: none;
}
