/**
 * HG Automotive — branded frontend login.
 *
 * @package HG_Automotive
 * @since 0.25.0
 */

.hg-auto-login {
	--hg-login-accent: var(--hg-color-primary);
	--hg-login-ink: var(--hg-color-text);
	--hg-login-muted: var(--hg-color-text-muted);
	--hg-login-border: var(--hg-color-border);
	--hg-login-soft: var(--hg-color-bg-subtle);
	--hg-login-danger: var(--hg-auto-color-danger, #8a1f11);
	--hg-login-radius: 8px;
	max-width: 64rem;
	margin: 0 auto 2.25rem;
	padding: 0 0.15rem;
}

.hg-auto-login__layout {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
	gap: 1.35rem 1.5rem;
	align-items: stretch;
}

.hg-auto-login__brand,
.hg-auto-login__panel {
	padding: 1.55rem 1.4rem 1.65rem;
	border: 1px solid var(--hg-login-border);
	border-radius: var(--hg-login-radius);
	background: #fff;
}

.hg-auto-login__brand {
	background:
		radial-gradient(120% 80% at 0% 0%, rgba(var(--hg-color-primary-rgb), 0.08), transparent 55%),
		linear-gradient(165deg, var(--hg-color-bg-subtle) 0%, var(--hg-color-card) 58%, var(--hg-color-primary-soft) 100%);
}

.hg-auto-login__eyebrow {
	margin: 0 0 0.45rem;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	color: var(--hg-login-accent);
}

.hg-auto-login__heading {
	margin: 0 0 0.6rem;
	font-family: var(--hg-auto-font-display, inherit);
	font-size: clamp(1.6rem, 2.1vw, 2rem);
	line-height: 1.2;
	color: var(--hg-login-ink);
}

.hg-auto-login__lede {
	margin: 0 0 1rem;
	max-width: 34rem;
	color: var(--hg-login-muted);
	font-size: 1.02rem;
	line-height: 1.55;
}

.hg-auto-login__benefits {
	margin: 0 0 1.2rem;
	padding: 0 0 0 1.15rem;
	color: var(--hg-login-ink);
	line-height: 1.55;
}

.hg-auto-login__paths {
	display: flex;
	flex-wrap: wrap;
	gap: 0.7rem 1.1rem;
}

.hg-auto-login__paths a {
	color: var(--hg-login-accent);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.hg-auto-login__panel--solo {
	max-width: 28rem;
	margin: 0 auto;
}

.hg-auto-login__field {
	margin: 0 0 1rem;
}

.hg-auto-login__field label {
	display: block;
	margin-bottom: 0.35rem;
	font-weight: 600;
	color: var(--hg-login-ink);
}

.hg-auto-login__field input[type="text"],
.hg-auto-login__field input[type="password"],
.hg-auto-login__field input[type="email"],
.hg-auto-login__field input[type="tel"] {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	min-height: 2.85rem;
	padding: 0.55rem 0.8rem;
	border: 1px solid var(--hg-login-border);
	border-radius: 6px;
	background: #fff;
	font: inherit;
	color: var(--hg-login-ink);
}

.hg-auto-login__field input:focus {
	outline: 2px solid rgba(var(--hg-color-primary-rgb), 0.35);
	outline-offset: 1px;
	border-color: var(--hg-login-accent);
}

.hg-auto-login__field.is-invalid input {
	border-color: var(--hg-login-danger);
}

.hg-auto-login__remember {
	margin: 0 0 1rem;
	color: var(--hg-login-ink);
}

.hg-auto-login__actions {
	margin: 0;
}

.hg-auto-login__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 3rem;
	width: 100%;
	padding: 0.7rem 1.25rem;
	border: 1px solid var(--hg-login-accent);
	border-radius: 6px;
	background: var(--hg-login-accent);
	color: var(--hg-color-on-primary);
	font: inherit;
	font-size: 1rem;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
	transition: opacity 0.15s ease;
}

.hg-auto-login__submit:hover,
.hg-auto-login__submit:focus {
	opacity: 0.92;
	color: var(--hg-color-on-primary);
}

.hg-auto-login__errors {
	margin: 0 0 1rem;
	padding: 0.8rem 0.95rem;
	border-left: 4px solid var(--hg-login-danger);
	background: #fbf2f0;
	color: var(--hg-login-danger);
}

.hg-auto-login__success {
	margin: 0 0 1rem;
	padding: 0.8rem 0.95rem;
	border-left: 4px solid var(--hg-login-accent);
	background: #eef6f1;
	color: var(--hg-login-ink);
}

.hg-auto-login__meta {
	margin: 0.9rem 0 0;
	text-align: center;
}

.hg-auto-login__meta a {
	color: var(--hg-login-accent);
	font-weight: 600;
}

.hg-auto-login--signed-in .hg-auto-login__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1rem;
	align-items: center;
}

.hg-auto-login__panel--solo {
	max-width: 28rem;
	margin: 0 auto;
}

.hg-auto-login__hint {
	margin: 0 0 0.75rem;
	color: var(--hg-login-muted);
	font-size: 0.92rem;
	line-height: 1.45;
}

.hg-auto-login__generate {
	appearance: none;
	border: 0;
	background: transparent;
	color: var(--hg-login-accent);
	font: inherit;
	font-weight: 600;
	text-decoration: underline;
	cursor: pointer;
	padding: 0;
}

.hg-auto-login__logo {
	margin: 0 0 0.75rem;
}

.hg-auto-login__logo img {
	display: block;
	max-width: 10rem;
	height: auto;
}

.hg-auto-login--register .hg-auto-login__form {
	display: grid;
	gap: 0;
}

.hg-auto-login--register .hg-auto-login__field {
	margin-bottom: 0.85rem;
}

.hg-auto-login__section-heading,
.hg-auto-login__form-heading {
	margin: 0 0 1rem;
}

.hg-auto-login__section-heading h3,
.hg-auto-login__form-heading {
	font-family: var(--hg-auto-font-display, inherit);
	color: var(--hg-login-ink);
}

.hg-auto-login__section-heading h3 {
	margin: 0;
	font-size: 1.4rem;
}

.hg-auto-login__form-heading {
	padding-top: 0.25rem;
	font-size: 1.15rem;
}

.hg-auto-login__field input[readonly] {
	background: var(--hg-login-soft);
	color: var(--hg-login-muted);
	cursor: not-allowed;
}

.hg-seller-registration-steps {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 0.45rem;
	margin: 0 0 1.35rem;
	padding: 0;
	list-style: none;
}

.hg-seller-registration-steps li {
	min-width: 0;
	color: var(--hg-login-muted);
	font-size: 0.7rem;
	font-weight: 650;
	line-height: 1.25;
}

.hg-seller-registration-steps span {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 1.8rem;
	height: 1.8rem;
	margin-bottom: 0.4rem;
	border: 1px solid var(--hg-login-border);
	border-radius: 50%;
	background: #fff;
	color: var(--hg-login-muted);
}

.hg-seller-registration-steps .is-current,
.hg-seller-registration-steps .is-complete {
	color: var(--hg-login-ink);
}

.hg-seller-registration-steps .is-current span,
.hg-seller-registration-steps .is-complete span {
	border-color: var(--hg-login-accent);
	background: var(--hg-login-accent);
	color: #fff;
}

.hg-seller-login-notice {
	box-sizing: border-box;
	width: 100%;
	margin: 0 0 1.25rem;
	padding: 0.8rem 1rem;
	border: 1px solid #e7edf2;
	border-radius: 10px;
	background: #f7f9fa;
	color: var(--hg-color-text);
	font-size: 0.92rem;
	line-height: 1.45;
}

.hg-seller-login-notice a {
	display: inline-block;
	margin-left: 0.2rem;
	padding: 0.15rem 0;
	color: var(--hg-primary);
	font-weight: 700;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

.hg-seller-login-notice a:hover,
.hg-seller-login-notice a:focus-visible {
	color: var(--hg-color-primary-hover);
}

@media (max-width: 767px) {
	.hg-auto-login__layout {
		grid-template-columns: 1fr;
	}

	.hg-auto-login__panel {
		min-width: 0;
	}

	.hg-seller-registration-steps {
		box-sizing: border-box;
		display: flex;
		width: 100%;
		max-width: 100%;
		overflow-x: auto;
		padding-bottom: 0.35rem;
		scrollbar-width: thin;
	}

	.hg-seller-registration-steps li {
		flex: 0 0 7.5rem;
	}

	.hg-auto-login__brand {
		padding-bottom: 1.25rem;
	}

	.hg-auto-login__submit {
		width: 100%;
	}
}
