/* فرم ورود/ثبت‌نام با OTP — طراحی مدرن، Mobile First، الهام‌گرفته از فرم‌های ورود فروشگاه‌های ایرانی */

.olwc-login-wrapper {
	--olwc-primary: #ee2b47;
	display: flex;
	justify-content: center;
	padding: 24px 12px;
	font-family: inherit;
}

.olwc-login-card {
	width: 100%;
	max-width: 400px;
	background: #ffffff;
	border: 1px solid #eeeeee;
	border-radius: 20px;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
	padding: 28px 24px;
	box-sizing: border-box;
}

.olwc-header-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 24px;
}

.olwc-logo,
.olwc-logo img {
	margin: 0 auto !important;
	text-align: center !important;
}

.olwc-logo img {
	max-width: 130px;
	max-height: 40px;
	display: block;
}

.olwc-logo-text {
	font-size: 18px;
	font-weight: 800;
	color: var(--olwc-primary);
	text-align: center !important;
}

.olwc-close-arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	color: #1a1a1a;
	text-decoration: none;
	border-radius: 50%;
	transition: background 0.15s ease;
}

.olwc-close-arrow:hover {
	background: #f3f4f6;
}

.olwc-title {
	text-align: right;
	font-size: 19px;
	font-weight: 800;
	margin: 0 0 10px;
	color: #1a1a1a;
}

.olwc-description {
	text-align: right;
	color: #9ca3af;
	font-size: 13px;
	margin: 0 0 20px;
}

.olwc-alert {
	border-radius: 10px;
	padding: 10px 14px;
	font-size: 13px;
	margin-bottom: 16px;
}

.olwc-alert-error {
	background: #fef2f2;
	color: #b91c1c;
	border: 1px solid #fecaca;
}

.olwc-alert-success {
	background: #f0fdf4;
	color: #15803d;
	border: 1px solid #bbf7d0;
}

.olwc-step label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 6px;
	color: #374151;
}

.olwc-input {
	width: 100%;
	box-sizing: border-box;
	height: 48px;
	padding: 0 16px;
	line-height: 44px;
	border: 1.5px solid #000 !important;
	border-radius: 14px;
	font-size: 14px;
	margin-bottom: 14px;
	transition: border-color 0.15s ease;
	background: #fafafa;
	color: #1a1a1a;
	box-shadow: none !important;
}

.olwc-input::placeholder {
	color: #9ca3af;
}

/* خنثی‌سازی استایل قرمز پیش‌فرض برخی قالب‌ها/مرورگرها روی فیلدهای required/invalid
   تا همه فیلدهای این افزونه همیشه ظاهر یکسان (مطابق فیلد شماره موبایل) داشته باشند. */
.olwc-input:invalid,
.olwc-input:required,
.olwc-input:-moz-ui-invalid {
	border-color: #000 !important;
	box-shadow: none !important;
}

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

.olwc-btn {
	width: 100%;
	padding: 15px;
	border-radius: 10px;
	border: none;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	text-align: center !important;
	transition: opacity 0.15s ease, transform 0.05s ease;
}

.olwc-btn:active {
	transform: scale(0.99);
}

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

.olwc-btn-primary {
	background: var(--olwc-primary);
	color: var(--olwc-btn-text, #fff);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.olwc-btn-primary:hover:not(:disabled) {
	opacity: 0.92;
}

.olwc-link {
	display: block;
	width: 100%;
	text-align: center !important;
	background: none;
	border: none;
	color: var(--olwc-primary);
	font-size: 13px;
	font-weight: 600;
	margin-top: 14px;
	cursor: pointer;
	text-decoration: none;
	padding: 4px;
}

.olwc-link:hover {
	text-decoration: underline;
}

.olwc-consent-text {
	text-align: center !important;
	font-size: 12px;
	color: #9ca3af;
	margin: 16px 0 0;
	line-height: 1.8;
}

.olwc-consent-text a {
	color: #1a1a1a;
	font-weight: 600;
	text-decoration: underline;
}

.olwc-otp-info {
	text-align: center;
	font-size: 13px;
	color: #6b7280;
	margin-bottom: 18px;
}

.olwc-phone-display {
	color: #1a1a1a;
	display: block;
	margin-top: 4px;
	font-size: 15px;
	direction: ltr;
	unicode-bidi: plaintext;
}

.olwc-otp-inputs {
	display: flex;
	justify-content: center;
	gap: 10px;
	margin-bottom: 18px;
	direction: ltr;
}

.olwc-otp-digit {
	width: 52px;
	height: 52px;
	flex: 0 0 auto;
	text-align: center;
	font-size: 22px;
	font-weight: 700;
	border: 1.5px solid #000 !important;
	border-radius: 14px;
	background: #fafafa;
	box-shadow: none !important;
}

.olwc-otp-digit:focus {
	outline: none;
	border-color: var(--olwc-primary) !important;
	background: #fff;
}

.olwc-otp-digit.is-correct {
	border-color: #16a34a !important;
	background: #f0fdf4;
}

.olwc-otp-digit.is-wrong {
	border-color: #dc2626 !important;
	background: #fef2f2;
	animation: olwc-otp-shake 0.3s ease;
}

@keyframes olwc-otp-shake {
	10%, 90% { transform: translateX(-1px); }
	20%, 80% { transform: translateX(2px); }
	30%, 50%, 70% { transform: translateX(-3px); }
	40%, 60% { transform: translateX(3px); }
}

@media ( max-width: 360px ) {
	.olwc-otp-digit {
		width: 44px;
		height: 44px;
		font-size: 18px;
	}
}

.olwc-resend-wrap {
	text-align: center;
	font-size: 13px;
	color: #9ca3af;
	margin: 0 0 4px;
}

.olwc-resend-timer {
	direction: ltr;
	unicode-bidi: plaintext;
}

.olwc-already-logged-in {
	text-align: center;
	padding: 20px;
	color: #6b7280;
}

@media ( max-width: 400px ) {
	.olwc-login-card {
		padding: 22px 18px;
		border-radius: 16px;
	}
}
