.fl-auth {
	display: grid;
	align-content: center;
	justify-items: center;
	min-height: 68vh;
	padding: clamp(24px, 4vw, 56px) 0;
}

.fl-auth-page .fl-breadcrumb,
.fl-auth-page .woocommerce-breadcrumb,
.fl-auth-page .wp-block-post-title {
	display: none;
}

.woocommerce-account:not(.logged-in) .entry-content > .woocommerce,
.woocommerce-account:not(.logged-in) .wp-block-post-content > .woocommerce {
	display: block;
	max-width: none;
	margin-inline: 0;
}

.fl-auth__panel {
	width: 100%;
	max-width: 430px;
}

.fl-auth__title {
	margin: 0 0 20px;
	font-size: clamp(1.45rem, 1.2rem + 0.9vw, 1.75rem);
	font-weight: 800;
	line-height: 1.2;
	text-align: center;
	color: var(--fl-heading, #1b2b27);
}

.fl-auth__lead {
	margin: 0 0 4px;
	font-size: 0.92rem;
	line-height: 1.5;
	text-align: center;
	color: var(--fl-muted, #636b77);
	text-wrap: balance;
}

.fl-auth__card {
	padding: clamp(22px, 2.4vw, 30px);
	border: 1px solid var(--fl-border, #e6e8e6);
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 8px 28px rgba(20, 40, 30, 0.06);
}

.fl-auth__form,
.woocommerce-account:not(.logged-in) .fl-auth form.login,
.woocommerce-account:not(.logged-in) .fl-auth form.register {
	display: grid;
	gap: 16px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}

.fl-auth__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
}

.fl-auth__row {
	margin: 0;
	display: grid;
	gap: 7px;
}

.fl-auth__row label {
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	color: var(--fl-heading, #1b2b27);
}

.fl-auth__field {
	position: relative;
	display: block;
}

.fl-auth__ico {
	position: absolute;
	z-index: 2;
	top: 50%;
	left: 16px;
	width: 19px;
	height: 19px;
	margin-top: -9.5px;
	color: var(--fl-muted, #636b77);
	pointer-events: none;
}

.fl-auth__trap {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.fl-auth .fl-auth__field input {
	width: 100%;
	min-height: 50px;
	box-sizing: border-box;
	padding: 13px 16px 13px 46px;
	border: 1px solid var(--fl-border, #e6e8e6);
	border-radius: 12px;
	background: #fff;
	font: inherit;
	font-size: 0.95rem;
	color: var(--fl-heading, #1b2b27);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.fl-auth .fl-auth__field input::placeholder {
	color: #a5aca8;
}

.fl-auth .fl-auth__field input:focus {
	outline: none;
	border-color: var(--fl-primary, #397063);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--fl-primary, #397063) 15%, #fff);
}

.fl-auth__hint {
	font-size: 0.8rem;
	color: var(--fl-muted, #636b77);
}

.fl-auth__forgot {
	margin: -6px 0 0;
	text-align: right;
}

.fl-auth__forgot a {
	color: var(--fl-primary, #397063);
	font-size: 0.88rem;
	font-weight: 600;
	text-decoration: none;
}

.fl-auth__forgot a:hover {
	text-decoration: underline;
}

.fl-auth__submit {
	min-height: 50px;
	margin-top: 2px;
	border: 0;
	border-radius: 12px;
	background: var(--fl-primary-dark, #1f4d3f);
	color: #fff;
	font-size: 0.98rem;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.15s ease, transform 0.12s ease;
}

.fl-auth__submit:hover {
	background: var(--fl-primary, #397063);
	transform: translateY(-1px);
}

.fl-auth__submit:focus-visible {
	outline: 2px solid var(--fl-primary, #397063);
	outline-offset: 3px;
}

.fl-auth__remember {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 0.88rem;
	color: var(--fl-muted, #636b77);
}

.fl-auth__consent {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 0.86rem;
	line-height: 1.45;
	color: var(--fl-muted, #636b77);
}

.fl-auth__consent input,
.fl-auth__remember input {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	margin: 0;
	accent-color: var(--fl-primary, #397063);
}

.fl-auth__consent a {
	color: var(--fl-primary, #397063);
}

.fl-auth__switch {
	margin: 22px 0 0;
	padding-top: 20px;
	border-top: 1px solid var(--fl-border, #e6e8e6);
	text-align: center;
	font-size: 0.9rem;
	color: var(--fl-muted, #636b77);
}

.fl-auth__switch a {
	color: var(--fl-primary, #397063);
	font-weight: 700;
	text-decoration: none;
}

.fl-auth__switch a:hover {
	text-decoration: underline;
}

.fl-auth-page .woocommerce-notices-wrapper {
	display: none;
}

/* ---- Form response ---- */

.fl-auth__alert {
	padding: 12px 14px;
	border-radius: 12px;
	border: 1px solid transparent;
	border-left-width: 3px;
	font-size: 0.9rem;
	line-height: 1.45;
}

.fl-auth__alert--error {
	border-color: color-mix(in srgb, #c0392b 26%, #fff);
	border-left-color: #c0392b;
	background: color-mix(in srgb, #c0392b 7%, #fff);
	color: #8e2b20;
}

.fl-auth__alert--success {
	border-color: color-mix(in srgb, var(--fl-primary, #397063) 26%, #fff);
	border-left-color: var(--fl-primary, #397063);
	background: color-mix(in srgb, var(--fl-primary, #397063) 7%, #fff);
	color: var(--fl-primary-dark, #1f4d3f);
}

.fl-auth__form [hidden] {
	display: none !important;
}

.fl-auth__error {
	display: block;
	color: #c0392b;
	font-size: 0.82rem;
	line-height: 1.35;
}

.fl-auth .fl-auth__field input.is-invalid {
	border-color: #c0392b;
}

.fl-auth .fl-auth__field input.is-invalid:focus {
	box-shadow: 0 0 0 3px color-mix(in srgb, #c0392b 15%, #fff);
}

.fl-auth__consent input.is-invalid {
	outline: 2px solid #c0392b;
	outline-offset: 2px;
}

.fl-auth__submit:disabled {
	cursor: progress;
	opacity: 0.75;
	transform: none;
}

.fl-auth__submit.is-loading {
	position: relative;
	color: transparent;
}

.fl-auth__submit.is-loading::after {
	content: '';
	position: absolute;
	inset: 50% auto auto 50%;
	width: 20px;
	height: 20px;
	margin: -10px 0 0 -10px;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: fl-auth-spin 0.7s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
	.fl-auth__submit.is-loading::after {
		animation-duration: 2.4s;
	}
}

.fl-login__aside {
	width: 100%;
	max-width: 520px;
	margin-top: 28px;
}

@media (max-width: 560px) {
	.fl-auth__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.fl-auth__card {
		padding: 20px 18px;
	}

	.fl-auth__title {
		margin-bottom: 16px;
	}
}

/* ---- One-time code login ---- */

.fl-otp__sent {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	padding: 10px 12px;
	border: 1px solid var(--fl-border, #e6e8e6);
	border-radius: 14px;
	background: var(--fl-surface, #f5f6f5);
	line-height: 1.35;
}

.fl-otp__sent-ico {
	flex: none;
	width: 20px;
	height: 20px;
	color: var(--fl-primary, #397063);
}

.fl-otp__sent-body {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
	flex: 1 1 auto;
}

.fl-otp__sent-label {
	font-size: 0.7rem;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--fl-muted, #636b77);
}

.fl-otp__sent-mail {
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--fl-heading, #1b2b27);
	overflow-wrap: anywhere;
}

.fl-otp__sent .fl-otp__change {
	flex: none;
	padding: 6px 12px;
	border: 1px solid var(--fl-border, #e6e8e6);
	border-radius: 999px;
	background: #fff;
	font-size: 0.82rem;
	text-decoration: none;
	transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.fl-otp__sent .fl-otp__change:hover,
.fl-otp__sent .fl-otp__change:focus-visible {
	border-color: var(--fl-primary, #397063);
	background: var(--fl-primary, #397063);
	color: #fff;
}

.fl-otp__change,
.fl-otp__again {
	padding: 0;
	border: 0;
	background: none;
	color: var(--fl-primary, #397063);
	font: inherit;
	font-size: 0.88rem;
	font-weight: 600;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.fl-otp__change:disabled,
.fl-otp__again:disabled {
	color: var(--fl-muted, #636b77);
	text-decoration: none;
	cursor: default;
}

.fl-otp__resend {
	margin: 0;
	text-align: center;
}

.fl-auth .fl-otp__code {
	width: 100%;
	min-height: 56px;
	box-sizing: border-box;
	padding: 12px 16px;
	border: 1px solid var(--fl-border, #e6e8e6);
	border-radius: 12px;
	background: #fff;
	font: inherit;
	font-size: 1.4rem;
	font-weight: 700;
	letter-spacing: 0.5em;
	text-align: center;
	text-indent: 0.5em;
	color: var(--fl-heading, #1b2b27);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.fl-auth .fl-otp__code::placeholder {
	letter-spacing: 0.4em;
	font-weight: 400;
	color: #c9cfcc;
}

.fl-auth .fl-otp__code:focus {
	outline: none;
	border-color: var(--fl-primary, #397063);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--fl-primary, #397063) 15%, #fff);
}

.fl-auth .fl-otp__code.is-invalid {
	border-color: #c0392b;
}

.fl-otp [data-fl-otp-step] {
	display: grid;
	gap: 16px;
}

.fl-otp [data-fl-otp-step][hidden] {
	display: none;
}

.fl-otp__new,
.fl-otp__note {
	margin: 2px 0 0;
	padding-top: 16px;
	border-top: 1px solid var(--fl-border, #e6e8e6);
	font-size: 0.83rem;
	line-height: 1.5;
	text-align: center;
	text-wrap: pretty;
	color: var(--fl-muted, #636b77);
}
