/**
 * OTP login page only — keep small; do not load full main.css on /login/.
 */

:root {
	--color-bg: #fff;
	--color-text: #1a1d21;
	--color-primary: #c62828;
	--font: "Vazirmatn", "Tahoma", system-ui, sans-serif;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	overscroll-behavior-y: none;
	touch-action: manipulation;
}

body.fighoo-theme {
	margin: 0;
	min-height: 100vh;
	font-family: var(--font);
	background: var(--color-bg);
	color: var(--color-text);
	direction: rtl;
	overscroll-behavior-y: none;
	touch-action: manipulation;
	-webkit-user-select: none;
	user-select: none;
	-webkit-touch-callout: none;
}

body.fighoo-theme :where(input, textarea, select, [contenteditable="true"]) {
	-webkit-user-select: text;
	user-select: text;
	-webkit-touch-callout: default;
}

body.fighoo-view-login {
	--fighoo-login-accent: #e02020;
	--fighoo-login-accent-hover: #c41a1a;
	--fighoo-login-accent-ring: rgba(224, 32, 32, 0.22);
	background: #fff;
}

.site-main--login {
	display: flex;
	flex-direction: column;
	min-height: 100dvh;
	min-height: 100vh;
	padding: 0;
	background: #fff;
}

.fighoo-login {
	flex: 1;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: max(20px, env(safe-area-inset-top, 0px)) 20px 32px;
	padding-top: max(28px, calc(env(safe-area-inset-top, 0px) + 16px));
	box-sizing: border-box;
}

.fighoo-login__inner {
	width: 100%;
	max-width: 400px;
	text-align: center;
	margin-top: 0;
}

.fighoo-login__brand {
	margin-bottom: 24px;
}

.fighoo-login__logo {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
}

.fighoo-login__logo-img {
	display: block;
	width: min(78vw, 300px);
	max-width: 300px;
	height: auto;
	max-height: none;
	object-fit: contain;
}

.fighoo-login__logo-img.fighoo-logo-gif {
	image-rendering: auto;
}

.fighoo-login__logo-text {
	font-size: 1.5rem;
	font-weight: 800;
	color: #1a1d21;
}

.fighoo-login__title {
	margin: 0 0 8px;
	font-size: 1.35rem;
	font-weight: 800;
	color: #1a1d21;
}

.fighoo-login__lead {
	margin: 0 0 20px;
	font-size: 0.88rem;
	line-height: 1.55;
	color: #6b7280;
}

.fighoo-login__lead--otp {
	font-size: 0.82rem;
}

.fighoo-login__phone {
	font-weight: 700;
	color: #1a1d21;
}

.fighoo-login__step[hidden] {
	display: none !important;
}

#fighoo-otp-step-code {
	position: relative;
}

.fighoo-login-field {
	margin-bottom: 8px;
}

.fighoo-login-field__box {
	position: relative;
}

.fighoo-login-field__label {
	position: absolute;
	top: -9px;
	right: 14px;
	padding: 0 6px;
	font-size: 0.72rem;
	font-weight: 600;
	color: var(--fighoo-login-accent, #e02020);
	background: #fff;
	z-index: 1;
}

.fighoo-login-field__row {
	display: block;
	padding: 6px 12px;
	border: 1px solid #d1d5db;
	border-radius: 12px;
	background: #fff;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.fighoo-login-field__row:focus-within {
	border-color: var(--fighoo-login-accent, #e02020);
	box-shadow: 0 0 0 3px var(--fighoo-login-accent-ring, rgba(224, 32, 32, 0.22));
}

.fighoo-login-field__input {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: 10px 4px;
	border: none;
	background: transparent;
	font-family: inherit;
	font-size: 1rem;
	font-weight: 600;
	color: #111b21;
	outline: none;
	text-align: left;
}

.fighoo-login-field__submit {
	border: none;
	border-radius: 12px;
	background: var(--fighoo-login-accent, #e02020);
	color: #fff;
	cursor: pointer;
	display: inline-flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	gap: 6px;
	font-family: inherit;
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1.2;
	transition: background 0.15s ease, opacity 0.15s ease;
}

.fighoo-login-field__submit--below {
	width: 100%;
	min-height: 48px;
	margin-top: 12px;
	padding: 12px 16px;
}

.fighoo-login-field__submit-text {
	display: inline-block;
}

.fighoo-login-field__submit-icon {
	display: block;
	flex-shrink: 0;
}

.fighoo-login-field__submit:hover:not(:disabled) {
	background: var(--fighoo-login-accent-hover, #c41a1a);
}

.fighoo-login-field__submit:disabled {
	opacity: 0.55;
	cursor: wait;
}

.fighoo-login-otp {
	display: flex;
	flex-direction: row;
	justify-content: center;
	gap: 10px;
	margin: 0 auto 16px;
	direction: ltr;
	unicode-bidi: isolate;
	max-width: 100%;
}

/* iOS Safari reads SMS into one field with autocomplete=one-time-code (not split cells). */
.fighoo-login-otp__autofill {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
	opacity: 0.01;
}

.fighoo-login-otp__cell {
	width: 48px;
	height: 48px;
	box-sizing: border-box;
	border: 1px solid #d1d5db;
	border-radius: 10px;
	background: #fff;
	text-align: center;
	font-family: inherit;
	font-size: 1.2rem;
	font-weight: 700;
	color: #111b21;
	outline: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.fighoo-login-otp__cell:focus {
	border-color: var(--fighoo-login-accent, #e02020);
	box-shadow: 0 0 0 3px var(--fighoo-login-accent-ring, rgba(224, 32, 32, 0.22));
}

.fighoo-login-otp--10 {
	gap: 6px;
}

.fighoo-login-otp--10 .fighoo-login-otp__cell {
	width: 28px;
	height: 40px;
	font-size: 1rem;
	border-radius: 8px;
}

.fighoo-login__otp-actions {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 8px;
}

.fighoo-login__otp-divider {
	width: 1px;
	height: 14px;
	background: #e5e7eb;
}

.fighoo-login__link {
	border: none;
	background: none;
	padding: 0;
	font-family: inherit;
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--fighoo-login-accent, #e02020);
	cursor: pointer;
}

.fighoo-login__link:disabled {
	color: #9ca3af;
	cursor: not-allowed;
}

.fighoo-login__terms {
	margin: 20px 0 0;
	font-size: 0.72rem;
	line-height: 1.5;
	color: #9ca3af;
}

.fighoo-login__terms-check {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 14px 0 4px;
	padding: 0 2px;
	text-align: start;
	font-size: 0.78rem;
	line-height: 1.55;
	color: #4b5563;
	cursor: pointer;
	-webkit-user-select: none;
	user-select: none;
}

.fighoo-login__terms-input {
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	margin: 2px 0 0;
	accent-color: var(--fighoo-login-accent, #e02020);
	cursor: pointer;
}

.fighoo-login__terms-check-text {
	flex: 1;
	min-width: 0;
}

.fighoo-login__terms-link {
	position: relative;
	z-index: 5;
	display: inline;
	padding: 4px 2px;
	margin: 0 2px;
	color: var(--fighoo-login-accent, #e02020);
	text-decoration: underline;
	text-underline-offset: 2px;
	font-weight: 600;
	cursor: pointer;
	-webkit-tap-highlight-color: rgba(224, 32, 32, 0.15);
	touch-action: manipulation;
	pointer-events: auto;
}

body.fighoo-view-login .fighoo-login__terms-check {
	position: relative;
	z-index: 4;
}

.fighoo-login .fighoo-otp-debug {
	margin-top: 16px;
}

.fighoo-login .fighoo-otp__status {
	margin-top: 12px;
	text-align: center;
}

.fighoo-otp-debug {
	margin-top: 12px;
	padding: 12px 14px;
	border-radius: 14px;
	text-align: center;
	border: 1px dashed rgba(198, 40, 40, 0.45);
	background: rgba(254, 242, 242, 0.65);
}

.fighoo-otp-debug__label {
	display: block;
	font-size: 0.72rem;
	font-weight: 600;
	color: #b71c1c;
	margin-bottom: 4px;
}

.fighoo-otp-debug__code {
	font-size: 1.35rem;
	font-weight: 800;
	letter-spacing: 0.2em;
	color: #7f1d1d;
}

.fighoo-otp__status {
	margin: 12px 0 0;
	font-size: 0.82rem;
	font-weight: 600;
	color: #15803d;
}

.fighoo-otp__status.is-error {
	color: #b91c1c;
}

/* Legacy OTP / WP login markup (removed from main.css) */

.fighoo-otp-glass-slot {
	margin-bottom: 12px;
}

.fighoo-otp-glass {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	gap: 8px;
	padding: 8px 10px 8px 14px;
}

.fighoo-otp-glass--code {
	grid-template-columns: 1fr auto;
}

.fighoo-otp-glass__input {
	min-width: 0;
	border: none;
	background: transparent;
	font-family: inherit;
	font-size: 1rem;
	font-weight: 600;
	color: #111b21;
	outline: none;
	padding: 10px 0;
}

.fighoo-otp-glass__input::placeholder {
	color: rgba(17, 27, 33, 0.35);
	font-weight: 500;
}

.fighoo-otp-glass__input--code {
	text-align: center;
	letter-spacing: 0.18em;
}

.fighoo-otp-glass__btn {
	flex-shrink: 0;
	border: none;
	border-radius: 9999px;
	padding: 10px 16px;
	font-family: inherit;
	font-size: 0.82rem;
	font-weight: 700;
	color: rgba(26, 29, 33, 0.92);
	cursor: pointer;
	border: 1px solid rgba(255, 255, 255, 0.72);
	background: rgba(255, 255, 255, 0.52);
	box-shadow:
		0 2px 12px rgba(15, 23, 42, 0.07),
		inset 0 1px 0 rgba(255, 255, 255, 0.82);
	-webkit-backdrop-filter: blur(14px) saturate(1.25);
	backdrop-filter: blur(14px) saturate(1.25);
	white-space: nowrap;
}

.fighoo-otp-glass__btn:disabled {
	opacity: 0.55;
	cursor: wait;
}

.fighoo-login-form {
	padding: 16px;
	border-radius: 16px;
	border: 1px solid rgba(255, 255, 255, 0.72);
	background: rgba(255, 255, 255, 0.55);
	box-shadow:
		0 2px 12px rgba(15, 23, 42, 0.06),
		inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.fighoo-login-form label {
	display: block;
	margin: 0 0 6px;
	font-size: 0.85rem;
	font-weight: 600;
}

.fighoo-login-form .input,
.fighoo-login-form input[type="text"],
.fighoo-login-form input[type="password"] {
	width: 100%;
	margin: 0 0 12px;
	padding: 10px 12px;
	border-radius: 10px;
	border: 1px solid rgba(15, 23, 42, 0.12);
	font-family: inherit;
	font-size: 0.9rem;
	box-sizing: border-box;
}

.fighoo-login-form .login-remember {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 14px;
	font-size: 0.82rem;
}

.fighoo-login-form .button-primary,
.fighoo-login-form input[type="submit"] {
	width: 100%;
	padding: 12px 16px;
	border: none;
	border-radius: 9999px;
	background: var(--color-primary);
	color: #fff;
	font-family: inherit;
	font-size: 0.9rem;
	font-weight: 700;
	cursor: pointer;
}

.fighoo-otp__label {
	display: block;
	margin: 0 0 6px;
	font-size: 0.85rem;
	font-weight: 600;
}

.fighoo-otp__input {
	width: 100%;
	margin: 0 0 12px;
	padding: 12px 14px;
	border-radius: 12px;
	border: 1px solid rgba(15, 23, 42, 0.12);
	font-family: inherit;
	font-size: 1rem;
	box-sizing: border-box;
}

.fighoo-otp__input--code {
	letter-spacing: 0.2em;
	text-align: center;
	font-weight: 700;
}

.fighoo-otp__btn {
	display: block;
	width: 100%;
	margin: 0 0 8px;
	padding: 12px 16px;
	border: none;
	border-radius: 9999px;
	background: var(--color-primary);
	color: #fff;
	font-family: inherit;
	font-size: 0.9rem;
	font-weight: 700;
	cursor: pointer;
}

.fighoo-otp__btn:disabled {
	opacity: 0.6;
	cursor: wait;
}

.fighoo-otp__btn--ghost {
	background: transparent;
	color: var(--color-primary);
	border: 1px solid rgba(198, 40, 40, 0.35);
}

.fighoo-otp__hint {
	margin: 0 0 12px;
	font-size: 0.82rem;
	color: rgba(26, 29, 33, 0.65);
}



