/* ===========================================================
   WP Sell — استایل پاپ‌آپ ورود پیامکی
   =========================================================== */

.wps-login-head { text-align: center; margin-bottom: 22px; }

.wps-login-logo {
	display: inline-flex; align-items: center; justify-content: center;
	width: 52px; height: 52px;
	margin-bottom: 12px;
	background: linear-gradient(135deg, var(--wps-primary, #7C3AED), var(--wps-secondary, #4F46E5));
	border-radius: 14px;
	color: #fff;
	box-shadow: 0 8px 20px rgba(124, 58, 237, .3);
}

.wps-login-head h2 { margin: 0 0 4px; font-size: 1.25rem; font-weight: 900; }
.wps-login-sub { margin: 0; font-size: .8rem; color: var(--wps-text-muted, #6B7280); }
.wps-login-sub span { color: var(--wps-primary, #7C3AED); font-weight: 700; }

/* ---------- تب‌ها ---------- */
.wps-login-tabs {
	display: flex; gap: 4px;
	background: var(--wps-bg, #F5F3FF);
	border-radius: 12px;
	padding: 4px;
	margin-bottom: 20px;
}

.wps-login-tab {
	flex: 1;
	display: inline-flex; align-items: center; justify-content: center; gap: 7px;
	padding: 10px 8px;
	min-height: 44px;
	background: transparent; border: none; border-radius: 9px;
	font-family: inherit; font-size: .82rem; font-weight: 600;
	color: var(--wps-text-muted, #6B7280);
	cursor: pointer;
	transition: all .2s cubic-bezier(.16, 1, .3, 1);
}
.wps-login-tab:hover { color: var(--wps-primary, #7C3AED); }
.wps-login-tab.is-active {
	background: var(--wps-surface, #fff);
	color: var(--wps-primary, #7C3AED);
	font-weight: 700;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}

/* ---------- پنل‌ها ---------- */
.wps-login-pane { display: none; flex-direction: column; gap: 16px; }
.wps-login-pane.is-active { display: flex; }

/* ---------- فیلدها ---------- */
.wps-field { display: flex; flex-direction: column; gap: 7px; }
.wps-field-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wps-field label { font-size: .8rem; font-weight: 700; color: var(--wps-text, #1E1B4B); }

.wps-field input[type="text"],
.wps-field input[type="password"] {
	width: 100%;
	min-height: 48px;
	padding: 12px 15px;
	background: var(--wps-bg, #F9FAFB);
	border: 1.5px solid var(--wps-border, #EDE9FE);
	border-radius: 12px;
	font-family: inherit; font-size: .9rem;
	color: var(--wps-text, #1E1B4B);
	transition: border-color .2s, box-shadow .2s;
}
.wps-field input:focus {
	outline: none;
	border-color: var(--wps-primary, #7C3AED);
	box-shadow: 0 0 0 3px rgba(124, 58, 237, .12);
}

/* ---------- شماره موبایل ---------- */
.wps-phone-input {
	display: flex; align-items: stretch;
	background: var(--wps-bg, #F9FAFB);
	border: 1.5px solid var(--wps-border, #EDE9FE);
	border-radius: 12px;
	overflow: hidden;
	transition: border-color .2s, box-shadow .2s;
}
.wps-phone-input:focus-within {
	border-color: var(--wps-primary, #7C3AED);
	box-shadow: 0 0 0 3px rgba(124, 58, 237, .12);
}

.wps-phone-prefix {
	display: flex; align-items: center; gap: 6px;
	padding: 0 13px;
	flex-shrink: 0;
	background: var(--wps-surface, #fff);
	border-inline-end: 1.5px solid var(--wps-border, #EDE9FE);
	font-size: .82rem; font-weight: 600;
	color: var(--wps-text, #374151);
}
.wps-flag { font-size: 1.05rem; line-height: 1; }

.wps-phone-input input {
	flex: 1; min-width: 0;
	height: 50px;
	padding: 0 14px;
	border: none; background: transparent;
	font-family: inherit; font-size: .95rem;
	color: var(--wps-text, #1E1B4B);
	direction: ltr; text-align: end;
	outline: none;
}

/* ---------- جعبه‌های OTP ---------- */
.wps-otp { display: flex; gap: 8px; justify-content: center; direction: ltr; }

.wps-otp-box {
	width: 52px; height: 56px;
	padding: 0 !important;
	text-align: center;
	background: var(--wps-surface, #fff) !important;
	border: 2px solid var(--wps-border, #EDE9FE) !important;
	border-radius: 12px !important;
	font-family: inherit;
	font-size: 1.25rem !important; font-weight: 800;
	color: var(--wps-primary, #7C3AED) !important;
	transition: all .2s cubic-bezier(.16, 1, .3, 1);
}
.wps-otp-box:focus {
	border-color: var(--wps-primary, #7C3AED) !important;
	box-shadow: 0 0 0 3px rgba(124, 58, 237, .14) !important;
	transform: translateY(-1px);
}
.wps-otp-box:not(:placeholder-shown),
.wps-otp-box[value]:not([value=""]) { border-color: var(--wps-primary, #7C3AED) !important; }

@media (max-width: 400px) {
	.wps-otp { gap: 6px; }
	.wps-otp-box { width: 46px; height: 52px; font-size: 1.1rem !important; }
}

/* ---------- شمارش معکوس ---------- */
.wps-countdown {
	display: inline-flex; align-items: center; gap: 4px;
	font-size: .72rem; color: var(--wps-text-muted, #6B7280); font-weight: 600;
}

.wps-resend {
	background: none; border: none; padding: 0;
	font-family: inherit; font-size: .72rem; font-weight: 700;
	color: var(--wps-primary, #7C3AED);
	cursor: pointer; text-decoration: underline;
}

/* ---------- پیام اطلاع‌رسانی ---------- */
.wps-login-note {
	display: flex; align-items: center; gap: 7px;
	margin-top: 10px;
	padding: 9px 12px;
	background: rgba(59, 130, 246, .1);
	border-radius: 9px;
	font-size: .72rem; font-weight: 500;
	color: #1D4ED8;
}
.wps-login-note svg { flex-shrink: 0; }

/* ---------- هشدار ---------- */
.wps-login-alert {
	padding: 11px 14px;
	border-radius: 10px;
	font-size: .78rem; font-weight: 600;
	margin-bottom: 14px;
}
.wps-login-alert.is-error { background: rgba(239, 68, 68, .1); color: #991B1B; }
.wps-login-alert.is-success { background: rgba(16, 185, 129, .12); color: #065F46; }

/* ---------- دکمه ارسال ---------- */
.wps-login-submit {
	display: flex; align-items: center; justify-content: center; gap: 8px;
	width: 100%;
	padding: 14px;
	min-height: 52px;
	background: linear-gradient(135deg, var(--wps-primary, #7C3AED), var(--wps-secondary, #4F46E5));
	color: #fff; border: none; border-radius: 13px;
	font-family: inherit; font-size: .95rem; font-weight: 800;
	cursor: pointer;
	box-shadow: 0 6px 20px rgba(124, 58, 237, .32);
	transition: box-shadow .2s, transform .2s, opacity .2s;
}
.wps-login-submit:hover:not(:disabled) { box-shadow: 0 9px 28px rgba(124, 58, 237, .42); transform: translateY(-1px); }
.wps-login-submit:disabled { opacity: .6; cursor: default; }

.wps-login-submit.is-loading .wps-login-submit-text { opacity: .6; }
.wps-login-submit.is-loading::after {
	content: '';
	width: 15px; height: 15px;
	border: 2px solid rgba(255, 255, 255, .45);
	border-top-color: #fff;
	border-radius: 50%;
	animation: wps-login-spin .6s linear infinite;
}
@keyframes wps-login-spin { to { transform: rotate(360deg); } }

.wps-login-back {
	background: none; border: none;
	padding: 6px;
	font-family: inherit; font-size: .78rem; font-weight: 600;
	color: var(--wps-text-muted, #6B7280);
	cursor: pointer;
}
.wps-login-back:hover { color: var(--wps-primary, #7C3AED); }

/* ---------- رمز عبور ---------- */
.wps-pass-input { position: relative; }
.wps-pass-input input { padding-inline-end: 46px !important; }

.wps-pass-toggle {
	position: absolute; top: 50%; inset-inline-end: 8px;
	transform: translateY(-50%);
	width: 34px; height: 34px;
	display: inline-flex; align-items: center; justify-content: center;
	background: transparent; border: none; border-radius: 8px;
	color: var(--wps-text-soft, #9CA3AF);
	cursor: pointer;
}
.wps-pass-toggle:hover { color: var(--wps-primary, #7C3AED); }
.wps-pass-toggle.is-visible { color: var(--wps-primary, #7C3AED); }

.wps-remember { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--wps-text-muted, #6B7280); cursor: pointer; }
.wps-remember input { accent-color: var(--wps-primary, #7C3AED); width: 17px; height: 17px; }

.wps-login-lost { display: block; text-align: center; font-size: .76rem; color: var(--wps-text-muted, #6B7280); }
.wps-login-lost:hover { color: var(--wps-primary, #7C3AED); }

/* ---------- در صورت نبود قالب WP Sell ---------- */
.wps-modal:not([hidden]) { display: flex; }
