/* =========================================================
   Levan Login - Frontend Stylesheet
   طراحی مینیمال و مدرن مشابه صفحه ورود دیجی‌کالا
   ========================================================= */

.levan-login-wrapper {
	--levan-primary: #EF394E;
	--levan-secondary: #1F1F1F;
	--levan-border: #e5e7eb;
	--levan-bg: #ffffff;
	--levan-text: #29303b;
	--levan-muted: #8c94a3;
	direction: rtl;
	font-family: -apple-system, "IRANSans", "Vazirmatn", Tahoma, Arial, sans-serif;
	display: flex;
	justify-content: center;
	width: 100%;
	box-sizing: border-box;
}

.levan-login-wrapper * {
	box-sizing: border-box;
}

.levan-login-box {
	width: 100%;
	max-width: 400px;
	background: var(--levan-bg);
	border: 1px solid var(--levan-border);
	border-radius: 16px;
	padding: 32px 28px;
	box-shadow: 0 4px 24px rgba(20, 20, 30, 0.06);
	position: relative;
	animation: levan-fade-in 0.3s ease;
}

@keyframes levan-fade-in {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: translateY(0); }
}

.levan-login-header {
	display: flex;
	justify-content: center;
	margin-bottom: 20px;
}

.levan-login-logo {
	max-height: 48px;
}

.levan-login-logo-placeholder {
	font-weight: 700;
	font-size: 18px;
	color: var(--levan-secondary);
}

.levan-title {
	font-size: 19px;
	font-weight: 700;
	color: var(--levan-text);
	margin: 0 0 6px;
	text-align: center;
}

.levan-subtitle {
	font-size: 13.5px;
	color: var(--levan-muted);
	text-align: center;
	margin: 0 0 24px;
	line-height: 1.9;
}

.levan-mobile-display {
	color: var(--levan-text);
	font-weight: 600;
	direction: ltr;
	display: inline-block;
}

.levan-field {
	margin-bottom: 18px;
}

.levan-input {
	width: 100%;
	height: 52px;
	border: 1px solid var(--levan-border);
	border-radius: 10px;
	padding: 0 16px;
	font-size: 15px;
	color: var(--levan-text);
	background: #fafafa;
	transition: border-color 0.2s, background 0.2s;
	text-align: center;
	direction: ltr;
}

.levan-input:focus {
	outline: none;
	border-color: var(--levan-primary);
	background: #fff;
}

.levan-btn {
	width: 100%;
	height: 52px;
	border: none;
	border-radius: 10px;
	font-size: 15.5px;
	font-weight: 700;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	transition: opacity 0.2s, transform 0.05s;
}

.levan-btn:active {
	transform: scale(0.98);
}

.levan-btn-primary {
	background: var(--levan-primary);
	color: #fff;
}

.levan-btn-primary:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.levan-btn .levan-spinner {
	display: none;
	width: 18px;
	height: 18px;
	border: 2.5px solid rgba(255, 255, 255, 0.4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: levan-spin 0.7s linear infinite;
}

.levan-btn.is-loading .levan-btn-text {
	opacity: 0.6;
}

.levan-btn.is-loading .levan-spinner {
	display: inline-block;
}

@keyframes levan-spin {
	to { transform: rotate(360deg); }
}

.levan-terms {
	font-size: 11.5px;
	color: var(--levan-muted);
	text-align: center;
	margin-top: 16px;
	line-height: 1.9;
}

.levan-login-alert {
	display: none;
	background: #fdecec;
	color: #c62828;
	border: 1px solid #f5c6c6;
	border-radius: 8px;
	padding: 10px 14px;
	font-size: 13px;
	margin-bottom: 16px;
	text-align: center;
	line-height: 1.8;
}

.levan-login-alert.is-visible {
	display: block;
}

.levan-login-alert.is-success {
	background: #eaf7ed;
	color: #2e7d32;
	border-color: #c6e9c9;
}

/* OTP boxes */
.levan-otp-boxes {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-bottom: 18px;
}

.levan-otp-box {
	width: 44px;
	height: 52px;
	text-align: center;
	font-size: 20px;
	font-weight: 700;
	border: 1px solid var(--levan-border);
	border-radius: 10px;
	background: #fafafa;
	color: var(--levan-text);
	transition: border-color 0.2s, background 0.2s;
}

.levan-otp-box:focus {
	outline: none;
	border-color: var(--levan-primary);
	background: #fff;
}

.levan-timer-row {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin-bottom: 20px;
	font-size: 13px;
}

.levan-timer {
	color: var(--levan-muted);
	direction: ltr;
	display: inline-block;
}

.levan-link-btn {
	background: none;
	border: none;
	color: var(--levan-primary);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	padding: 4px;
}

.levan-link-btn:disabled {
	color: var(--levan-muted);
	cursor: not-allowed;
}

.levan-back-btn {
	position: absolute;
	top: 24px;
	right: 24px;
	background: #f4f4f5;
	border: none;
	border-radius: 50%;
	width: 32px;
	height: 32px;
	font-size: 16px;
	cursor: pointer;
	color: var(--levan-text);
	display: flex;
	align-items: center;
	justify-content: center;
}

.levan-already-logged-in {
	text-align: center;
	font-family: -apple-system, "IRANSans", "Vazirmatn", Tahoma, Arial, sans-serif;
	color: #29303b;
}

@media (max-width: 480px) {
	.levan-login-box {
		border: none;
		box-shadow: none;
		padding: 24px 16px;
	}

	.levan-otp-box {
		width: 38px;
		height: 48px;
		font-size: 18px;
	}
}
