/* Tamland Login — Figma design (login section, node 4381:91863)
 * UI-only stylesheet. Markup (PHP), JS and REST/API are untouched.
 *
 * Desktop  : split screen — illustration panel on the left, 400x400 card on the right.
 * Mobile   : (<768px) no panel, no card frame; 328px wide content centered on #fcfcfc.
 *
 * Illustration: put the exported image at  public/images/tamland-login-illustration.png
 * (Figma node 5144:102577). Without the file the pink gradient panel still renders.
 */
.tamland-login-shortcode.tlp-wrap {
	/* Figma tokens */
	--tl-primary: #c5161c;          /* primary/dark */
	--tl-primary-hover: #a91218;
	--tl-brand: #e9373d;            /* error/main — JS reads this var for error messages */
	--tl-ink-muted: #57595b;        /* JS reads this var for non-error messages */
	--tl-text-darkest: #202021;     /* text-and-icon/darkest */
	--tl-text-darker: #57595b;      /* text-and-icon/darker */
	--tl-text-dark: #7e7f83;        /* text-and-icon/dark */
	--tl-text-lightest: #fcfcfc;    /* text-and-icon/lightest */
	--tl-border: #d5d5d6;           /* border/light */
	--tl-bg-lightest: #fcfcfc;      /* background/lightest */
	--tl-primary-lighter: #fbdadb;
	--tl-primary-lightest: #fdefef;
	--tl-secondary-lightest: #fff6dd;
	--tl-secondary-darker: #4b3700;
	--tl-min-h: 100vh;              /* wrapper height on desktop — tweak if the page has a header */

	position: relative !important;
	width: 100% !important;
	min-height: var(--tl-min-h) !important;
	margin: 0 !important;
	padding: 0 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	direction: rtl !important;
	text-align: right !important;
	font-family: 'Yekan Bakh FaNum', IRANSans, Vazirmatn, Tahoma, system-ui, sans-serif !important;
	box-sizing: border-box !important;
}

@supports (min-height: 100dvh) {
	.tamland-login-shortcode.tlp-wrap {
		--tl-min-h: 100dvh;
	}
}

/*
 * Fullscreen mode (default):
 * The shortcode is fullscreen automatically. Pass fullscreen="false" only if
 * you intentionally want the form constrained to its normal container.
 *
 * The login form is promoted to a viewport-level overlay so it covers
 * the page regardless of the Elementor/WordPress container where the
 * shortcode is placed.
 */
.tamland-login-shortcode.tlp-wrap.tlp-wrap--fullscreen {
	position: fixed !important;
	inset: 0 !important;
	z-index: 999999 !important;
	width: 100vw !important;
	height: 100vh !important;
	min-height: 100vh !important;
	max-height: 100vh !important;
	margin: 0 !important;
	overflow: auto !important;
	isolation: isolate !important;
}

@supports (height: 100dvh) {
	.tamland-login-shortcode.tlp-wrap.tlp-wrap--fullscreen {
		height: 100dvh !important;
		min-height: 100dvh !important;
		max-height: 100dvh !important;
	}
}

.tamland-login-shortcode.tlp-wrap *,
.tamland-login-shortcode.tlp-wrap *::before,
.tamland-login-shortcode.tlp-wrap *::after {
	box-sizing: border-box;
}

.elementor-widget-tamland_login_form,
.elementor-widget-tamland_login_form > .elementor-widget-container {
	margin-bottom: 0 !important;
	padding-bottom: 0 !important;
}

.tamland-login-shortcode .tlp-art {
	display: none !important;
}

/* Card — 400x400, 2px border, radius 12, padding 24 */
.tamland-login-shortcode.tlp-wrap .tlp-card {
	position: static;
	width: 400px !important;
	max-width: 100% !important;
	height: 400px !important;
	min-height: 400px !important;
	max-height: none !important;
	margin: 0 !important;
	padding: 24px !important;
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	justify-content: flex-start !important;
	background: #fff !important;
	border: 2px solid var(--tl-border) !important;
	border-radius: 12px !important;
	box-shadow: none !important;
	overflow: visible !important;
}

.tamland-login-shortcode.tlp-wrap .tlp-logo {
	display: flex;
	justify-content: center;
	align-items: center;
	flex: 0 0 auto;
	width: 150px;
	height: 43px;
	margin: 0 0 auto !important; /* pushes the form block to the card bottom (space-between) */
}

.tamland-login-shortcode.tlp-wrap .tlp-logo img {
	display: block;
	width: 150px !important;
	height: 43px !important;
	max-width: 100%;
	object-fit: contain;
}

/* Head (title + subtitle) */
.tamland-login-shortcode.tlp-wrap .tlp-head,
.tamland-login-shortcode.tlp-wrap .tlp-step,
.tamland-login-shortcode.tlp-wrap .tlp-terms {
	width: 340px !important;
	max-width: 100% !important;
	min-width: 0 !important;
	flex: 0 0 auto;
}

.tamland-login-shortcode.tlp-wrap .tlp-head {
	margin: 0 0 24px !important;
	min-height: 0 !important;
}

.tamland-login-shortcode .tlp-head-phone,
.tamland-login-shortcode .tlp-head-code {
	width: 100%;
}

.tamland-login-shortcode.tlp-wrap .tlp-title {
	margin: 0 0 12px !important;
	padding: 0 !important;
	color: var(--tl-text-darkest) !important;
	font-size: 20px !important;
	font-weight: 800 !important;
	line-height: 28px !important;
	text-align: right !important;
}

.tamland-login-shortcode.tlp-wrap .tlp-subtitle {
	margin: 0 !important;
	padding: 0 !important;
	color: var(--tl-text-darker) !important;
	font-size: 15px !important;
	font-weight: 500 !important;
	line-height: 24px !important;
	text-align: right !important;
}

.tamland-login-shortcode .tlp-code-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	direction: rtl;
}

.tamland-login-shortcode .tlp-code-meta .tlp-subtitle {
	flex: 1 1 auto;
	min-width: 0;
	line-height: 22px !important;
	white-space: nowrap;
}

.tamland-login-shortcode [id$='-current-phone'] {
	direction: ltr !important;
	unicode-bidi: isolate !important;
	white-space: nowrap !important;
	letter-spacing: 0 !important;
}

/* "ویرایش شماره" chip */
.tamland-login-shortcode.tlp-wrap .tlp-edit-number {
	flex: 0 0 auto;
	border: 1px solid #e53935 !important;
	border-radius: 12px !important;
	padding: 4px 8px !important;
	background: transparent !important;
	color: #e53935 !important;
	font-family: inherit !important;
	font-size: 10px !important;
	font-weight: 600 !important;
	line-height: 14px !important;
	white-space: nowrap;
	cursor: pointer;
	box-shadow: none !important;
	transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.tamland-login-shortcode.tlp-wrap .tlp-edit-number:hover,
.tamland-login-shortcode.tlp-wrap .tlp-edit-number:focus-visible {
	background: rgba(229, 57, 53, 0.08) !important;
	color: #c62828 !important;
	outline: none !important;
	transform: translateY(-1px);
}

/* Message => Figma "Toast" (top of the form panel). Color is set inline by JS via CSS vars. */
.tamland-login-shortcode.tlp-wrap .tlp-message {
	position: absolute !important;
	top: 50px;
	left: calc(75% + 0px);
	transform: translateX(-50%);
	z-index: 5;
	min-width: 243px;
	max-width: min(420px, calc(50% - 32px));
	height: auto !important;
	min-height: 44px !important;
	max-height: none !important;
	margin: 0 !important;
	padding: 8px 16px !important;
	display: flex !important;
	align-items: center !important;
	justify-content: flex-end !important;
	overflow: hidden !important;
	background: var(--tl-primary-lightest) !important;
	border-radius: 8px !important;
	font-size: 12px !important;
	font-weight: 300 !important;
	line-height: 20px !important;
	text-align: right !important;
	animation: tlp-toast-in 0.22s ease-out;
}

.tamland-login-shortcode.tlp-wrap .tlp-message:empty {
	display: none !important;
}

.tamland-login-shortcode.tlp-wrap .tlp-message::after {
	content: '';
	position: absolute;
	right: 0;
	bottom: 0;
	width: 100%;
	height: 2px;
	background: var(--tl-brand);
	transform: scaleX(0);
	transform-origin: right;
}

.tamland-login-shortcode.tlp-wrap .tlp-message.tlp-message-active::after {
	animation: tlp-toast-progress var(--tl-message-duration, 4000ms) linear forwards;
}

@keyframes tlp-toast-progress {
	from { transform: scaleX(0); }
	to { transform: scaleX(1); }
}

.tamland-login-shortcode.tlp-wrap .tlp-message.tlp-message-success {
	background: #f0fdf4 !important;
	border: 1px solid #16a34a !important;
}

.tamland-login-shortcode.tlp-wrap .tlp-message.tlp-message-success::after {
	background: #16a34a;
}

/* Steps */
.tamland-login-shortcode .tlp-step {
	display: flex;
	flex-direction: column;
}

.tamland-login-shortcode .tlp-hide {
	display: none !important;
}

.tamland-login-shortcode.tlp-wrap .tlp-step-phone {
	gap: 24px !important;
	justify-content: flex-start !important;
	height: auto !important;
	min-height: 0 !important;
	max-height: none !important;
}

.tamland-login-shortcode.tlp-wrap .tlp-step-code {
	gap: 12px !important;
	justify-content: flex-start !important;
	height: auto !important;
	min-height: 0 !important;
	max-height: none !important;
}

/* Phone field — 1px border, radius 10, padding 12/8, 18px bold */
.tamland-login-shortcode.tlp-wrap .tlp-field {
	position: relative;
	display: flex;
	align-items: center;
	width: 100% !important;
	max-width: 100% !important;
	min-height: 52px !important;
	padding: 12px 8px !important;
	border: 1px solid var(--tl-border) !important;
	border-radius: 10px !important;
	background: #fff !important;
	cursor: text;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tamland-login-shortcode.tlp-wrap .tlp-field:hover {
	border-color: #bdbdbf !important;
}

.tamland-login-shortcode.tlp-wrap .tlp-field:focus-within {
	border-color: var(--tl-primary) !important;
	box-shadow: 0 0 0 3px rgba(197, 22, 28, 0.08) !important;
}

.tamland-login-shortcode.tlp-wrap .tlp-field.tlp-field--invalid {
	border-color: var(--tl-brand) !important;
	box-shadow: 0 0 0 3px rgba(233, 55, 61, 0.1) !important;
}

.tamland-login-shortcode.tlp-wrap .tlp-field input {
	width: 100% !important;
	height: 28px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	outline: none !important;
	background: transparent !important;
	box-shadow: none !important;
	color: var(--tl-text-darkest) !important;
	font-family: inherit !important;
	font-size: 16px !important;
	font-weight: 600 !important;
	line-height: 28px !important;
	direction: ltr;
	text-align: right !important;
	flex-direction: row-reverse;
	font-variant-numeric: tabular-nums;
}

.tamland-login-shortcode.tlp-wrap .tlp-field input::placeholder {
	color: var(--tl-text-darkest);
	opacity: 1;
	direction: rtl;
}

/* OTP — six 50px cells, gap 8 (340px) */
.tamland-login-shortcode.tlp-wrap .tlp-otp {
	display: flex !important;
	flex-wrap: nowrap !important;
	justify-content: center !important;
	gap: 8px !important;
	direction: ltr;
	width: 100% !important;
}

.tamland-login-shortcode.tlp-wrap .tlp-otp-box {
	flex: 1 1 0 !important;
	width: auto !important;
	min-width: 0 !important;
	max-width: 50px !important;
	height: auto !important;
	min-height: 0 !important;
	aspect-ratio: 1 / 1;
	margin: 0 !important;
	padding: 0 !important;
	border: 1px solid var(--tl-border) !important;
	border-radius: 10px !important;
	background: #fff !important;
	color: var(--tl-text-darkest) !important;
	font-family: inherit !important;
	font-size: 20px !important;
	font-weight: 700 !important;
	line-height: 28px !important;
	text-align: center !important;
	outline: none !important;
	box-shadow: none !important;
	appearance: textfield;
	-moz-appearance: textfield;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tamland-login-shortcode.tlp-wrap .tlp-otp-box:focus {
	border-color: var(--tl-primary) !important;
	box-shadow: 0 0 0 3px rgba(197, 22, 28, 0.08) !important;
}

.tamland-login-shortcode .tlp-otp-box::-webkit-outer-spin-button,
.tamland-login-shortcode .tlp-otp-box::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* Timer / resend button */
.tamland-login-shortcode.tlp-wrap .tlp-timer {
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 48px !important;
	height: 48px !important;
	margin: 0 !important;
	padding: 0 !important;
}

.tamland-login-shortcode.tlp-wrap .tlp-resend-button {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 100% !important;
	max-width: 100% !important;
	height: 48px !important;
	min-height: 48px !important;
	max-height: 48px !important;
	margin: 0 !important;
	padding: 0 16px !important;
	border: 1px solid transparent !important;
	border-radius: 12px !important;
	background: transparent !important;
	box-shadow: none !important;
	color: var(--tl-text-dark) !important;
	font-family: inherit !important;
	font-size: 14px !important;
	font-weight: 400 !important;
	line-height: 20px !important;
	cursor: default;
	transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

.tamland-login-shortcode.tlp-wrap .tlp-resend-icon {
	width: 16px;
	height: 16px;
	flex: 0 0 16px;
}

/* Keep the reload icon hidden while the countdown is running. */
.tamland-login-shortcode.tlp-wrap .tlp-timer:not(.tlp-timer--resend) .tlp-resend-icon {
	display: none !important;
}

.tamland-login-shortcode.tlp-wrap .tlp-timer.tlp-timer--resend .tlp-resend-icon {
	display: block !important;
}

.tamland-login-shortcode.tlp-wrap .tlp-timer.tlp-timer--resend .tlp-resend-button {
	border-color: var(--tl-primary) !important;
	background: transparent !important;
	color: var(--tl-primary) !important;
	cursor: pointer;
	font-weight: 600 !important;
}



/* Custom refinements: smaller/lighter resend text + icon on the left */
.tamland-login-shortcode.tlp-wrap .tlp-resend-button {
	flex-direction: row-reverse !important;
	font-size: 12px !important;
	font-weight: 300 !important;
}

.tamland-login-shortcode.tlp-wrap .tlp-resend-icon {
	margin-left: 6px !important;
	margin-right: 0 !important;
}

.tamland-login-shortcode.tlp-wrap .tlp-timer.tlp-timer--resend .tlp-resend-button:hover,
.tamland-login-shortcode.tlp-wrap .tlp-timer.tlp-timer--resend .tlp-resend-button:focus-visible {
	border-color: var(--tl-primary-hover) !important;
	background: var(--tl-primary-lightest) !important;
	color: var(--tl-primary-hover) !important;
	outline: none !important;
	transform: translateY(-1px);
}

/* Primary button — 48px, radius 12, disabled = 30% opacity */
.tamland-login-shortcode.tlp-wrap .tlp-submit {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 100% !important;
	max-width: 100% !important;
	height: 48px !important;
	min-height: 48px !important;
	max-height: 48px !important;
	margin: 0 !important;
	padding: 0 16px !important;
	border: 0 !important;
	border-radius: 12px !important;
	background: var(--tl-primary) !important;
	color: var(--tl-text-lightest) !important;
	font-family: inherit !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	line-height: 20px !important;
	box-shadow: none !important;
	cursor: pointer;
	transition: background-color 0.2s ease, opacity 0.2s ease, transform 0.16s ease;
}

.tamland-login-shortcode.tlp-wrap .tlp-submit:not(:disabled):hover,
.tamland-login-shortcode.tlp-wrap .tlp-submit:not(:disabled):focus-visible {
	background: var(--tl-primary-hover) !important;
	color: var(--tl-text-lightest) !important;
	outline: none !important;
}

.tamland-login-shortcode.tlp-wrap .tlp-submit:not(:disabled):active {
	transform: translateY(1px);
}

.tamland-login-shortcode.tlp-wrap .tlp-submit:disabled {
	background: var(--tl-primary) !important;
	color: var(--tl-text-lightest) !important;
	opacity: 0.3 !important;
	cursor: not-allowed;
}

.tamland-login-shortcode .tlp-button-content {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: auto;
	line-height: 20px;
}

.tamland-login-shortcode .tlp-button-label {
	display: inline-block;
}

.tamland-login-shortcode .tlp-spinner {
	display: none;
	width: 14px;
	height: 14px;
	border: 2px solid rgba(252, 252, 252, 0.4);
	border-top-color: var(--tl-text-lightest);
	border-radius: 50%;
	animation: tlp-spin 0.8s linear infinite;
}

.tamland-login-shortcode .tlp-submit.is-loading .tlp-spinner {
	display: inline-block;
}

/* Terms */
.tamland-login-shortcode.tlp-wrap .tlp-terms {
	margin: 12px 0 0 !important;
	padding: 0 !important;
	color: var(--tl-text-darker) !important;
	font-size: 12px !important;
	font-weight: 600 !important;
	line-height: 20px !important;
	text-align: center !important;
}

.tamland-login-shortcode.tlp-wrap .tlp-terms a,
.tamland-login-shortcode.tlp-wrap .tlp-terms-strong {
	color: var(--tl-primary) !important;
	font-weight: inherit !important;
	text-decoration: none !important;
}

/* The Figma OTP step has no terms line */
.tamland-login-shortcode.tlp-wrap .tlp-card:has(.tlp-step-code:not(.tlp-hide)) .tlp-terms {
	display: none;
}

.tamland-login-shortcode .tlp-honeypot {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	clip-path: inset(50%) !important;
	white-space: nowrap !important;
}

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

@keyframes tlp-toast-in {
	from {
		opacity: 0;
		transform: translate(-50%, -8px);
	}
	to {
		opacity: 1;
		transform: translate(-50%, 0);
	}
}

/* Tablet: keep the split screen, card never wider than its half */
@media (min-width: 768px) and (max-width: 1024px) {
	.tamland-login-shortcode.tlp-wrap .tlp-card {
		width: min(400px, calc(50vw - 32px)) !important;
	}

	.tamland-login-shortcode.tlp-wrap .tlp-otp-box {
		font-size: 18px !important;
	}
}

/* Mobile — Figma "phone view" (360 wide, content 328) */
@media (max-width: 767px) {
	.tamland-login-shortcode.tlp-wrap {
		min-height: 100vh !important;
		padding: 16px !important;
		background: var(--tl-bg-lightest) !important;
		overflow-x: hidden !important;
	}

	@supports (min-height: 100dvh) {
		.tamland-login-shortcode.tlp-wrap {
			min-height: 100dvh !important;
		}
	}

	.tamland-login-shortcode.tlp-wrap::before {
		display: none;
	}

	.tamland-login-shortcode.tlp-wrap .tlp-card {
		width: 328px !important;
		max-width: 100% !important;
		height: auto !important;
		min-height: 0 !important;
		padding: 0 !important;
		background: transparent !important;
		border: 0 !important;
		border-radius: 0 !important;
	}

	.tamland-login-shortcode.tlp-wrap .tlp-logo {
		margin: 0 0 40px !important;
	}

	.tamland-login-shortcode.tlp-wrap .tlp-head,
	.tamland-login-shortcode.tlp-wrap .tlp-step,
	.tamland-login-shortcode.tlp-wrap .tlp-terms {
		width: 100% !important;
	}

	.tamland-login-shortcode.tlp-wrap .tlp-subtitle {
		font-size: 14px !important;
	}

	.tamland-login-shortcode.tlp-wrap .tlp-otp-box {
		max-width: 48px !important;
		font-size: 20px !important;
	}

	.tamland-login-shortcode.tlp-wrap .tlp-terms {
		margin-top: 6px !important;
		color: var(--tl-text-dark) !important;
		font-size: 10px !important;
		font-weight: 500 !important;
	}

	.tamland-login-shortcode.tlp-wrap .tlp-message {
		top: 24px;
		left: 50%;
		max-width: calc(100% - 32px);
		min-width: min(243px, calc(100% - 32px));
	}
}

@media (max-width: 340px) {
	.tamland-login-shortcode.tlp-wrap {
		padding-inline: 8px !important;
	}

	.tamland-login-shortcode.tlp-wrap .tlp-otp {
		gap: 4px !important;
	}

	.tamland-login-shortcode.tlp-wrap .tlp-otp-box {
		font-size: 16px !important;
	}

	.tamland-login-shortcode.tlp-wrap .tlp-subtitle {
		font-size: 13px !important;
	}
}
