/* پاپ‌آپ ورود/عضویت پیامکی — رنگ‌ها از متغیرهای پوسته (با مقدار پیش‌فرض اگر پوسته عوض شد) */
.ne-otp-modal {
	--otp-primary: var(--ne-forest, #234B36);
	--otp-primary-2: var(--ne-forest-soft, #35664A);
	--otp-bg: var(--ne-paper, #FFFFFF);
	--otp-soft: var(--ne-sage, #E3ECDF);
	--otp-text: var(--ne-text, #1E2E24);
	--otp-muted: var(--ne-muted, #55665B);
	--otp-border: var(--ne-border-strong, rgba(35, 75, 54, 0.28));
	--otp-danger: var(--ne-danger, #B42318);

	width: min(420px, calc(100vw - 2rem));
	max-height: calc(100dvh - 2rem);
	padding: 2rem 1.5rem 1.5rem;
	border: 0;
	border-radius: 16px;
	background: var(--otp-bg);
	color: var(--otp-text);
	font-family: inherit;
	direction: rtl;
	text-align: center;
	box-shadow: 0 24px 60px rgba(22, 48, 31, 0.25);
	overflow-y: auto;
}
.ne-otp-modal::backdrop { background: rgba(15, 32, 22, 0.55); }
.ne-otp-modal[open] { animation: ne-otp-in 200ms cubic-bezier(0.2, 0.7, 0.2, 1); }
@keyframes ne-otp-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.ne-otp-close {
	position: absolute;
	top: 0.5rem;
	left: 0.5rem;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--otp-muted);
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
}
.ne-otp-close:hover { background: var(--otp-soft); color: var(--otp-primary); }

.ne-otp-logo { display: flex; justify-content: center; margin-bottom: 0.75rem; }
.ne-otp-logo img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; }

.ne-otp-steps-indicator { display: flex; justify-content: center; gap: 0.35rem; margin-bottom: 1rem; }
.ne-otp-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--otp-soft); transition: width 200ms, background-color 200ms; }
.ne-otp-dot.is-active { width: 24px; background: var(--otp-primary); }
.ne-otp-dot[hidden] { display: none; }

.ne-otp-step[hidden] { display: none; }
.ne-otp-step h2 { margin: 0 0 0.35rem; font-size: 1.25rem; color: var(--otp-primary); line-height: 1.5; }
.ne-otp-sub { margin: 0 0 1.1rem; font-size: 0.9rem; color: var(--otp-muted); line-height: 1.8; }
.ne-otp-welcome { margin: 0 0 0.5rem; font-weight: 700; color: var(--otp-primary-2); }
.ne-otp-welcome[hidden] { display: none; }

.ne-otp-input {
	display: block;
	width: 100%;
	min-height: 50px;
	margin-bottom: 0.75rem;
	padding: 0.6rem 0.9rem;
	border: 1px solid var(--otp-border);
	border-radius: 10px;
	background: #fff;
	font: inherit;
	font-size: 1.05rem;
	text-align: center;
	color: var(--otp-text);
	transition: border-color 160ms, box-shadow 160ms;
}
.ne-otp-input:focus { outline: none; border-color: var(--otp-primary); box-shadow: 0 0 0 3px rgba(35, 75, 54, 0.14); }
.ne-otp-input--code { letter-spacing: 0.45em; font-size: 1.35rem; font-weight: 700; }
.ne-otp-step[data-step="name"] .ne-otp-input { text-align: right; }

.ne-otp-btn {
	display: block;
	width: 100%;
	min-height: 50px;
	border: 0;
	border-radius: 10px;
	background: var(--otp-primary);
	color: #fff;
	font: inherit;
	font-size: 1rem;
	font-weight: 700;
	cursor: pointer;
	transition: background-color 160ms, transform 120ms;
}
.ne-otp-btn:hover { background: var(--otp-primary-2); }
.ne-otp-btn:active { transform: translateY(1px); }
.ne-otp-btn:disabled { opacity: 0.65; cursor: wait; }

.ne-otp-actions { display: flex; justify-content: space-between; gap: 0.5rem; margin-top: 0.75rem; }
.ne-otp-link {
	min-height: 40px;
	padding: 0 0.5rem;
	border: 0;
	background: transparent;
	color: var(--otp-primary);
	font: inherit;
	font-size: 0.85rem;
	font-weight: 700;
	cursor: pointer;
}
.ne-otp-link:disabled { color: var(--otp-muted); font-weight: 400; cursor: default; }

.ne-otp-hint { margin: 0.6rem 0 0; font-size: 0.8rem; color: var(--otp-muted); }
.ne-otp-hint[hidden] { display: none; }
.ne-otp-error { min-height: 1.4em; margin: 0.6rem 0 0; font-size: 0.85rem; font-weight: 700; color: var(--otp-danger); }

.ne-otp-check { display: flex; justify-content: center; margin-bottom: 0.75rem; color: var(--otp-primary); }

.ne-otp-sronly {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
	.ne-otp-modal[open] { animation: none; }
}
