/**
 * UI سفارشی wp-login — ۱:۱ mockups/wp-login-redesign.html · توکن از SPE_Theme
 *
 * @package ServicePricingEngine
 * @version 15.241.4
 */

/* ── پنهان UI پیش‌فرض وردپرس ── */
body.spe-wp-login-ui #login.spe-wp-login-replace > h1,
body.spe-wp-login-ui #login > h1,
body.spe-wp-login-ui #login > #loginform,
body.spe-wp-login-ui #login > form#loginform,
body.spe-wp-login-ui #login > #nav,
body.spe-wp-login-ui #login > .privacy-policy-page-link,
body.spe-wp-login-ui #login > #backtoblog {
	display: none !important;
}

body.spe-wp-login-ui #login:not(.spe-wp-login-replace) {
	display: none !important;
}

body.spe-wp-login-ui #login:not(.spe-wp-login-replace) > *:not(.spe-wp-login-card) {
	display: none !important;
}

body.spe-wp-login-ui #login h1,
body.spe-wp-login-ui #backtoblog,
body.spe-wp-login-ui .privacy-policy-page-link,
body.spe-wp-login-ui .language-switcher {
	display: none !important;
}

body.spe-wp-login-ui.spe-login-stealth .spe-wp-login-lang {
	display: none !important;
}

/* کلاس دسترس‌پذیری وردپرس (چون CSS پیش‌فرض login حذف شده، اینجا بازتعریف می‌شود) */
body.spe-wp-login-ui .screen-reader-text {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* ── بدنه (معادل body در موکاپ) ── */
html.spe-wp-login-root {
	height: 100%;
}

body.spe-wp-login-ui {
	margin: 0 !important;
	min-height: 100dvh !important;
	height: 100%;
	display: flex !important;
	flex-direction: column !important;
	align-items: stretch !important;
	justify-content: flex-start !important;
	padding: 0 !important;
	background: var(--spe-bg) !important;
	font-family: var(--spe-font) !important;
	font-size: var(--spe-fsize) !important;
	color: var(--spe-text) !important;
	line-height: 1.6 !important;
}

body.spe-wp-login-ui.login,
body.spe-wp-login-ui.wp-core-ui {
	background: var(--spe-bg) !important;
}

/* ── لایه مرکزی (معادل .spe-wp-login در موکاپ) ── */
body.spe-wp-login-ui #login.spe-wp-login-shell,
body.spe-wp-login-ui #login {
	flex: 1 1 auto;
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	justify-content: center !important;
	width: 100% !important;
	max-width: none !important;
	min-height: 0;
	padding: 32px 16px !important;
	margin: 0 auto !important;
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	box-sizing: border-box;
}

/* شِل باقی‌مانده بیرون #login (نباید وجود داشته باشد) را جمع کن */
body.spe-wp-login-ui > .spe-wp-login-shell:not(#login) {
	display: none !important;
}

/* لینک فروشگاه بیرون کارت — بالا سمت چپ دیداری */

/* ── کارت ── */
.spe-wp-login-card {
	width: 100%;
	max-width: 400px;
	background: var(--spe-surface);
	border: 1px solid var(--spe-border);
	border-radius: var(--spe-radius-lg);
	box-shadow: var(--spe-shadow-pop);
	padding: 36px 32px 28px;
	box-sizing: border-box;
	overflow: visible;
}

.spe-wp-login-brand {
	text-align: center;
	margin-bottom: 28px;
}

.spe-wp-login-logo {
	width: 64px;
	height: 64px;
	margin: 0 auto 12px;
	border-radius: var(--spe-radius);
	background: #fff;
	border: 1px solid var(--spe-border);
	padding: 8px;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.spe-wp-login-logo.is-placeholder {
	background: linear-gradient(135deg, var(--spe-accent), var(--spe-accent-dark));
	color: #fff;
	border-color: transparent;
	padding: 0;
}

.spe-wp-login-logo svg {
	width: 28px;
	height: 28px;
}

.spe-wp-login-logo.has-image img {
	width: 100%;
	height: 100%;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	object-position: center;
	display: block;
}

.spe-wp-login-site {
	font-size: 17px;
	font-weight: 800;
	margin: 0;
	letter-spacing: -.02em;
}

.spe-wp-login-heading {
	font-size: 13px;
	color: var(--spe-text-2);
	margin: 4px 0 0;
}

.spe-wp-login-notice {
	display: none;
	align-items: flex-start;
	gap: 10px;
	padding: 11px 13px;
	border-radius: var(--spe-radius-sm);
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 18px;
	text-align: right;
	line-height: 1.65;
	overflow: visible;
}

.spe-wp-login-notice.is-error {
	display: flex;
	background: var(--spe-danger-bg, #fce9e9);
	border: 1px solid color-mix(in srgb, var(--spe-danger, #dc2626) 25%, transparent);
	color: var(--spe-danger, #dc2626);
}

.spe-wp-login-notice.is-success {
	display: flex;
	background: var(--spe-success-bg, #e8f8ee);
	border: 1px solid color-mix(in srgb, var(--spe-success, #16a34a) 25%, transparent);
	color: var(--spe-success, #16a34a);
}

.spe-wp-login-notice svg {
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
	margin-top: 2px;
}

#spe-wp-login-notice-text {
	flex: 1 1 auto;
	min-width: 0;
	color: inherit;
	font: inherit;
	line-height: inherit;
	word-break: break-word;
}

.spe-wp-login-form {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin: 0;
	padding: 0;
	overflow: visible;
}

.spe-wp-login-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

/* ردیف نام + نام خانوادگی (هم‌تراز طرف‌حساب) */
.spe-wp-login-field-row {
	display: flex;
	gap: 12px;
	width: 100%;
	align-items: flex-start;
}

.spe-wp-login-field-row > .spe-wp-login-field {
	flex: 1 1 0;
	min-width: 0;
}

@media (max-width: 380px) {
	.spe-wp-login-field-row {
		flex-direction: column;
		gap: 16px;
	}
}

.spe-wp-login-label {
	font-size: 12.5px;
	font-weight: 700;
	color: var(--spe-text);
}

.spe-wp-login-input {
	font-family: inherit !important;
	font-size: 14px !important;
	color: var(--spe-text) !important;
	height: var(--spe-field-h) !important;
	padding: 0 14px !important;
	width: 100% !important;
	background: var(--spe-surface) !important;
	border: 1px solid var(--spe-border-strong) !important;
	border-radius: var(--spe-radius-sm) !important;
	outline: none !important;
	box-shadow: none !important;
	transition: border-color .15s, box-shadow .15s;
	box-sizing: border-box;
}

.spe-wp-login-input::placeholder {
	color: var(--spe-text-3);
}

.spe-wp-login-input:focus {
	border-color: var(--spe-accent) !important;
	box-shadow: 0 0 0 3px var(--spe-accent-soft) !important;
}

.spe-wp-login-pass {
	position: relative;
}

.spe-wp-login-pass .spe-wp-login-input {
	padding-inline-start: 44px !important;
}

.spe-wp-login-eye {
	position: absolute;
	inset-inline-start: 6px;
	top: 50%;
	transform: translateY(-50%);
	width: 34px;
	height: 34px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
	background: none;
	cursor: pointer;
	color: var(--spe-text-3);
	border-radius: var(--spe-radius-sm);
	padding: 0;
}

.spe-wp-login-eye:hover {
	color: var(--spe-accent);
	background: var(--spe-surface-2);
}

.spe-wp-login-eye svg {
	width: 18px;
	height: 18px;
}

.spe-wp-login-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: -4px;
}

.spe-wp-login-row--after-submit,
.spe-wp-login-row--footer {
	margin-top: 14px;
	margin-bottom: 0;
	justify-content: space-between;
	align-items: center;
	width: 100%;
	gap: 8px;
	flex-wrap: nowrap;
}

.spe-wp-login-login-footer {
	margin-top: 18px;
	padding-top: 16px;
	border-top: 1px solid var(--spe-border);
	width: 100%;
}

.spe-wp-login-footer-item {
	margin: 0;
	font-size: 12.5px;
	color: var(--spe-text-2);
	line-height: 1.5;
}

.spe-wp-login-footer-item--register {
	flex: 1 1 auto;
	min-width: 0;
	text-align: start;
}

.spe-wp-login-footer-item.spe-wp-login-forgot {
	flex: 0 1 auto;
	text-align: end;
	white-space: nowrap;
}

.spe-wp-login-link-btn {
	background: none;
	border: none;
	padding: 0;
	color: var(--spe-accent);
	font-family: inherit;
	font-size: 12.5px;
	font-weight: 700;
	cursor: pointer;
}

.spe-wp-login-link-btn:hover {
	color: var(--spe-accent-dark);
	text-decoration: underline;
}

.spe-wp-login-footer-spacer {
	flex: 1 1 auto;
}

.spe-wp-login-check--below-pass {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 12px;
	margin-bottom: 0;
	font-size: 13px;
	color: var(--spe-text-2);
	cursor: pointer;
	user-select: none;
}

.spe-wp-login-otp-forgot {
	margin: 14px 0 0;
	text-align: center;
}

.spe-wp-login-check {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: var(--spe-text-2);
	cursor: pointer;
	user-select: none;
}

.spe-wp-login-check input {
	width: 16px;
	height: 16px;
	accent-color: var(--spe-accent);
	margin: 0;
	cursor: pointer;
}

.spe-wp-login-forgot {
	font-size: 12.5px;
	color: var(--spe-accent);
	text-decoration: none;
	font-weight: 600;
	cursor: pointer;
}

.spe-wp-login-forgot:hover {
	color: var(--spe-accent-dark);
	text-decoration: underline;
}

.spe-wp-login-submit {
	width: 100%;
	height: var(--spe-field-h);
	margin-top: 4px;
	border: none !important;
	border-radius: var(--spe-radius-sm) !important;
	background: var(--spe-accent) !important;
	color: #fff !important;
	font-family: inherit !important;
	font-size: 14.5px !important;
	font-weight: 700 !important;
	cursor: pointer;
	transition: background .15s;
	box-shadow: none !important;
	text-shadow: none !important;
	float: none !important;
	line-height: normal !important;
}

.spe-wp-login-submit:hover {
	background: var(--spe-accent-dark) !important;
}

.spe-wp-login-submit:focus-visible {
	outline: 2px solid var(--spe-accent);
	outline-offset: 2px;
}

.spe-wp-login-tabs {
	display: flex;
	gap: 0;
	margin-bottom: 20px;
	border-bottom: 2px solid var(--spe-border);
}

.spe-wp-login-auth-tabs {
	display: flex;
	gap: 8px;
	margin-bottom: 20px;
}

.spe-wp-login-auth-tab {
	flex: 1;
	padding: 10px 12px;
	border: 1px solid var(--spe-border-strong);
	border-radius: var(--spe-radius-sm);
	background: var(--spe-surface);
	color: var(--spe-text-2);
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	transition: color .2s, border-color .2s, background .2s;
}

.spe-wp-login-auth-tab.active {
	color: var(--spe-accent);
	border-color: var(--spe-accent);
	background: var(--spe-accent-soft);
}

.spe-wp-login-auth-tab:hover:not(.active) {
	color: var(--spe-accent);
	background: var(--spe-surface-2);
}

[data-view="lost"] .spe-wp-login-auth-tabs {
	display: none;
}

.spe-wp-login-tab {
	flex: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 10px 8px;
	border: none;
	background: transparent;
	color: var(--spe-text-2);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	font-family: inherit;
	border-bottom: 2px solid transparent;
	margin-bottom: -2px;
	transition: color .2s, border-color .2s, background .2s;
}

.spe-wp-login-tab svg {
	width: 16px;
	height: 16px;
	flex: 0 0 auto;
}

.spe-wp-login-tab.active {
	color: var(--spe-accent);
	border-bottom-color: var(--spe-accent);
}

.spe-wp-login-tab:hover:not(.active) {
	color: var(--spe-accent);
	background: var(--spe-accent-soft);
}

.spe-wp-login-pane {
	display: none;
}

.spe-wp-login-pane.is-active {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

/* فرم هم‌زمان pane است؛ display:block نباید flex را باطل کند */
.spe-wp-login-pane.is-active.spe-wp-login-form {
	display: flex;
}

.spe-wp-login-otp-input {
	letter-spacing: 8px;
	font-size: 20px !important;
	text-align: center;
	font-variant-numeric: tabular-nums;
}

.spe-wp-login-text-btn {
	display: block;
	width: 100%;
	margin-top: 10px;
	background: none;
	border: none;
	color: var(--spe-accent);
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}

.spe-wp-login-text-btn:hover {
	color: var(--spe-accent-dark);
	text-decoration: underline;
}

.spe-wp-login-submit.is-success {
	background: var(--spe-success) !important;
}

.spe-wp-login-submit.is-success:hover {
	background: color-mix(in srgb, var(--spe-success) 85%, #000) !important;
}

.spe-wp-login-switch {
	margin-top: 20px;
	padding-top: 18px;
	border-top: 1px solid var(--spe-border);
	text-align: center;
	font-size: 13px;
	color: var(--spe-text-2);
}

.spe-wp-login-switch button {
	background: none;
	border: none;
	color: var(--spe-accent);
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
}

.spe-wp-login-switch button:hover {
	color: var(--spe-accent-dark);
	text-decoration: underline;
}

.spe-wp-login-pmatch {
	font-size: 12.5px;
	font-weight: 600;
	text-align: right;
	min-height: 20px;
	margin: 0;
	padding: 0 2px;
	line-height: 1.6;
	overflow: visible;
}

.spe-wp-login-pmatch.ok {
	color: var(--spe-success, #16a34a);
}

.spe-wp-login-pmatch.err {
	color: var(--spe-danger, #dc2626);
}

.spe-wp-login-hint {
	font-size: 13px;
	color: var(--spe-text-2);
	margin: 0 0 12px;
	line-height: 1.7;
	text-align: center;
}

.spe-wp-login-lead {
	font-size: 13px;
	color: var(--spe-text-2);
	margin: 0 0 4px;
	line-height: 1.75;
}

.spe-wp-login-powered,
.spe-wp-login-powered.spe-wp-login-powered--top {
	position: fixed;
	top: 18px;
	left: 18px;
	right: auto;
	z-index: 100;
	margin: 0;
	padding: 0;
	text-align: left;
	font-size: 13px;
	font-weight: 600;
	color: var(--spe-text-2);
	background: transparent;
	border: none;
	box-shadow: none;
}

.spe-wp-login-powered a {
	color: var(--spe-text-2);
	text-decoration: none;
}

.spe-wp-login-powered a:hover {
	color: var(--spe-accent);
	text-decoration: underline;
}

.spe-wp-login-powered > span:not(.spe-wp-login-lang) {
	display: none; /* جداکننده · مخفی */
}

.spe-wp-login-lang {
	font-size: 12px;
	color: var(--spe-text-3);
}

.spe-wp-login-lang select {
	font-family: inherit;
	font-size: 12px;
	border: 1px solid var(--spe-border-strong);
	border-radius: 6px;
	padding: 3px 8px;
	background: var(--spe-surface);
	color: var(--spe-text-2);
}

.spe-input-ltr {
	direction: ltr;
	text-align: center;
}

/* ── هشدار Caps Lock (توسط افزونه/هستهٔ دیگری پویا افزوده می‌شود) ── */
body.spe-wp-login-ui .caps-warning {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 4px 0 0;
	padding: 7px 10px;
	border-radius: var(--spe-radius-sm);
	background: var(--spe-warn-bg, #fff4e5);
	border: 1px solid color-mix(in srgb, var(--spe-warn, #d97706) 30%, transparent);
	color: var(--spe-warn, #b45309);
	font-size: 12px;
	line-height: 1.5;
}

body.spe-wp-login-ui .caps-icon {
	flex: 0 0 15px;
	width: 15px;
	height: 15px;
	display: inline-flex;
	align-items: center;
}

body.spe-wp-login-ui .caps-icon svg {
	width: 15px !important;
	height: 15px !important;
}

/* گارد ایمنی: هیچ آیکنی درون کارت نباید از عرض ظرف سرریز کند */
.spe-wp-login-card > svg,
.spe-wp-login-card .caps-warning svg {
	max-width: 100%;
}

[data-view="lost"] .view-login,
[data-view="lost"] .view-register,
[data-view="lost"] .view-role,
[data-view="lost"] .view-reset,
[data-view="lost"] .view-reset-done {
	display: none;
}

[data-view="login"] .view-lost,
[data-view="login"] .view-role,
[data-view="login"] .view-reset,
[data-view="login"] .view-reset-done {
	display: none;
}

[data-view="role"] .view-login,
[data-view="role"] .view-register,
[data-view="role"] .view-lost,
[data-view="role"] .view-reset,
[data-view="role"] .view-reset-done {
	display: none;
}

/* ── تعیین رمز تازه (لینکِ ایمیلِ بازیابی) ── */
[data-view="reset"] .view-login,
[data-view="reset"] .view-register,
[data-view="reset"] .view-role,
[data-view="reset"] .view-lost,
[data-view="reset"] .view-reset-done {
	display: none;
}

[data-view="reset-done"] .view-login,
[data-view="reset-done"] .view-register,
[data-view="reset-done"] .view-role,
[data-view="reset-done"] .view-lost,
[data-view="reset-done"] .view-reset {
	display: none;
}

a.spe-wp-login-submit--link {
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
}

a.spe-wp-login-submit--link:hover {
	color: #fff !important;
}

[data-auth="login"] .view-register {
	display: none;
}

[data-auth="register"] .view-login {
	display: none;
}

/* ── انتخاب نقش پس از ورود ── */
.spe-wp-login-role-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.spe-wp-login-role-card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
	width: 100%;
	padding: 14px 16px;
	border: 1px solid var(--spe-border);
	border-radius: var(--spe-radius-sm);
	background: var(--spe-surface);
	color: var(--spe-text);
	font-family: inherit;
	text-align: right;
	cursor: pointer;
	transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.spe-wp-login-role-card:hover,
.spe-wp-login-role-card:focus-visible {
	border-color: var(--spe-accent);
	background: var(--spe-accent-soft);
	outline: none;
	box-shadow: 0 0 0 2px color-mix(in srgb, var(--spe-accent) 20%, transparent);
}

.spe-wp-login-role-label {
	font-size: 14px;
	font-weight: 700;
	color: var(--spe-text);
}

.spe-wp-login-role-desc {
	font-size: 12.5px;
	color: var(--spe-text-2);
	line-height: 1.55;
}

/* ── فشرده‌سازی حالت ثبت‌نام: بدون اسکرول صفحه ── */
body.spe-wp-login-ui:has([data-auth="register"]) {
	overflow: hidden;
}

body.spe-wp-login-ui:has([data-auth="register"]) #login {
	justify-content: center !important;
	padding: 16px 12px !important;
	overflow: hidden !important;
}

.spe-wp-login-card[data-auth="register"] {
	max-width: 440px;
	max-height: calc(100dvh - 32px);
	padding: 20px 24px 16px;
	overflow-y: auto;
	overflow-x: hidden;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
}

.spe-wp-login-card[data-auth="register"] .spe-wp-login-brand {
	margin-bottom: 12px;
}

.spe-wp-login-card[data-auth="register"] .spe-wp-login-logo {
	width: 44px;
	height: 44px;
	margin-bottom: 6px;
	padding: 5px;
}

.spe-wp-login-card[data-auth="register"] .spe-wp-login-logo svg {
	width: 20px;
	height: 20px;
}

.spe-wp-login-card[data-auth="register"] .spe-wp-login-site {
	font-size: 15px;
}

.spe-wp-login-card[data-auth="register"] .spe-wp-login-heading {
	margin-top: 2px;
}

.spe-wp-login-card[data-auth="register"] .spe-wp-login-tabs {
	margin-bottom: 12px;
}

.spe-wp-login-card[data-auth="register"] .spe-wp-login-tab {
	padding: 8px 6px;
	font-size: 12.5px;
}

.spe-wp-login-card[data-auth="register"] .spe-wp-login-form,
.spe-wp-login-card[data-auth="register"] .spe-wp-login-pane.is-active {
	gap: 10px;
}

.spe-wp-login-card[data-auth="register"] .spe-wp-login-field {
	gap: 4px;
}

.spe-wp-login-card[data-auth="register"] .spe-wp-login-label {
	font-size: 12px;
}

.spe-wp-login-card[data-auth="register"] .spe-wp-login-input {
	height: 38px !important;
	font-size: 13px !important;
	padding: 0 12px !important;
}

.spe-wp-login-card[data-auth="register"] .spe-wp-login-pass .spe-wp-login-input {
	padding-inline-start: 40px !important;
}

.spe-wp-login-card[data-auth="register"] .spe-wp-login-eye {
	width: 30px;
	height: 30px;
}

.spe-wp-login-card[data-auth="register"] .spe-wp-login-submit {
	height: 40px;
	margin-top: 2px;
	font-size: 14px !important;
}

.spe-wp-login-card[data-auth="register"] .spe-wp-login-switch {
	margin-top: 12px;
	padding-top: 12px;
}

.spe-wp-login-card[data-auth="register"] .spe-wp-login-notice {
	margin-bottom: 10px;
	padding: 8px 10px;
	font-size: 12.5px;
}

.spe-wp-login-card[data-auth="register"] .spe-wp-login-pmatch {
	min-height: 16px;
	font-size: 12px;
}

@media (max-width: 420px) {
	.spe-wp-login-card {
		padding: 28px 20px 22px;
	}

	.spe-wp-login-card[data-auth="register"] {
		padding: 16px 16px 14px;
		max-height: calc(100dvh - 24px);
	}

	.spe-wp-login-row {
		flex-direction: column;
		align-items: flex-start;
	}
}
