/* ==========================================================================
   Auth pages (login / register / lost + reset password) — standalone,
   Shopify-clean centered cards. The account body class already hides the
   site chrome; these pages bring their own minimal brand header.
   ========================================================================== */

.hw-auth {
	min-height: 70vh;
	max-width: 920px;
	margin: 0 auto;
	padding: 2.5rem 1.25rem 4rem;
	display: flex;
	flex-direction: column;
	gap: 2rem;
}

.hw-auth__brand {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
}

.hw-auth__brand img {
	max-height: 64px;
	width: auto;
}

.hw-auth__back {
	font-weight: 700;
	color: var(--hw-accent, #32432d);
	text-decoration: none;
}

.hw-auth__back:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.hw-auth__panels {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 1.5rem;
	align-items: start;
}

.hw-auth__panels--single {
	max-width: 540px;
	width: 100%;
	margin: 0 auto;
}

/* A clean, roomy card with a soft Apple-style elevation (owner: bring the card
   back, make it wider + less cramped, with a nice box shadow). Only the
   out-of-house unsubscribe page sits without one. */
.hw-auth__card {
	background: var(--hw-card, #fff);
	border: 1px solid rgba(0, 0, 0, 0.06);
	border-radius: 18px;
	padding: 2.75rem 2.5rem;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 14px 38px rgba(0, 0, 0, 0.09);
}

@media (max-width: 480px) {
	.hw-auth__card {
		padding: 1.85rem 1.4rem;
		border-radius: 14px;
	}
}

.hw-auth__title {
	margin: 0 0 0.6rem;
	font-size: 1.9rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.15;
	text-align: center;
}

.hw-auth__sub {
	margin: 0 auto 2.25rem;
	max-width: 36ch;
	font-size: 0.95rem;
	opacity: 0.7;
	line-height: 1.55;
	text-align: center;
}

/* Registration privacy notice — small + muted, but the policy link stays a clear, tappable link
   (bold + underline, inherits colour so it works on any card background). */
.hw-auth__privacy {
	margin: 0.25rem auto 1.15rem;
	max-width: 42ch;
	font-size: 0.8rem;
	line-height: 1.5;
	opacity: 0.75;
	text-align: center;
}
.hw-auth__privacy a {
	font-weight: 700;
	text-decoration: underline;
}

.hw-auth__row {
	margin: 0 0 1.15rem;
}

.hw-auth__row label {
	display: block;
	font-size: 0.82rem;
	font-weight: 700;
	margin-bottom: 0.35rem;
	opacity: 0.85;
}

.hw-auth__input {
	width: 100%;
	border: 1.5px solid var(--color-border, #d8d2c7);
	border-radius: 12px;
	padding: 0.85rem 1rem;
	font: inherit;
	font-size: 1rem;
	background: var(--hw-card, #fff);
	box-sizing: border-box;
	transition: border-color 0.12s linear, box-shadow 0.12s linear;
}

.hw-auth__input:focus {
	outline: none;
	border-color: var(--hw-accent, #32432d);
	box-shadow: 0 0 0 1px var(--hw-accent, #32432d);
}

.hw-auth__row--split {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
}

.hw-auth__remember {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	font-size: 0.88rem;
	cursor: pointer;
}

.hw-auth__remember input {
	accent-color: var(--hw-accent, #32432d);
}

.hw-auth__link {
	font-size: 0.88rem;
	color: var(--hw-accent, #32432d);
	font-weight: 700;
	text-decoration: none;
}

.hw-auth__link:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.hw-auth__hint {
	font-size: 0.85rem;
	opacity: 0.7;
	margin: 0 0 1rem;
}

.hw-auth__btn {
	width: 100%;
	background: var(--hw-accent, #32432d);
	color: var(--hw-on-accent, #fff);
	border: 1.5px solid var(--hw-accent, #32432d);
	border-radius: 12px;
	padding: 0.95rem 1rem;
	margin-top: 0.35rem;
	font: inherit;
	font-size: 1rem;
	font-weight: 800;
	cursor: pointer;
	transition: filter 0.12s linear;
}

.hw-auth__btn:hover {
	filter: brightness(1.12);
}

.hw-auth__btn--outline {
	background: var(--hw-card, #fff);
	color: var(--hw-accent, #32432d);
}

.hw-auth__btn--outline:hover {
	background: color-mix(in srgb, var(--hw-accent, #32432d) 6%, var(--hw-card, #fff));
	filter: none;
}

/* WC notices on auth pages (errors / confirmations) */
body.hw-account-page .woocommerce-notices-wrapper {
	max-width: 920px;
	margin: 1rem auto 0;
	padding: 0 1.25rem;
}

body.hw-account-page .woocommerce-error,
body.hw-account-page .woocommerce-message,
body.hw-account-page .woocommerce-info {
	list-style: none;
	background: var(--hw-card, #fff);
	border: 1px solid var(--color-border, #e5e0d8);
	border-left: 4px solid var(--hw-accent, #32432d);
	border-radius: 10px;
	padding: 0.9rem 1.1rem;
	margin: 0 0 0.75rem;
	font-size: 0.92rem;
}

body.hw-account-page .woocommerce-error {
	border-left-color: #b3261e;
}

body.hw-account-page .woocommerce-error li,
body.hw-account-page .woocommerce-message li {
	margin: 0;
}

/* In-store auth framing: login/register render inside the normal page
   (header + green menu visible) — tighter spacing, no brand header. */
.hw-auth--inline {
	min-height: 0;
	max-width: 100%;
	margin: 0;
	padding: 3.5rem 1rem 5rem;
	/* Block layout so the single panel's margin:auto centers it on the page
	   (the base .hw-auth is a flex column, which left-aligned the card). */
	display: block;
}

/* 2FA code step sits higher on the page than the full login/register forms —
   it's a single short, wide (landscape) card, so the big top gap that suits the
   tall forms just stranded it low. Pull it up to mirror the back-office dialog,
   which reads "high" because it's vertically centered. (owner: "move up higher
   … something simple") */
.hw-auth--inline.hw-auth--2fa {
	padding-top: 1.25rem;
	padding-bottom: 3rem;
}

/* Page title on the in-store auth page comes from the page chrome; hide it
   to avoid "My account" above "Sign in" (the cards carry their own titles). */
body.hw-auth-page .gutter-bottom--page {
	display: none;
}

/* ---- Single-card extras: alt link, register grid, messages, activation ---- */
.hw-auth__alt {
	margin: 1.75rem 0 0;
	padding-top: 1.5rem;
	border-top: 1px solid var(--color-border, #e5e0d8);
	font-size: 0.92rem;
	text-align: center;
	opacity: 0.9;
}
.hw-auth__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 0.9rem;
}
@media (max-width: 460px) {
	.hw-auth__grid { grid-template-columns: 1fr; }
}
.hw-auth__email-hint {
	display: block;
	margin-top: 0.35rem;
	font-size: 0.8rem;
}

/* Marketing opt-in checkbox on the create-account form (promotional consent,
   separate from the newsletter list). */
.hw-auth__checkbox {
	display: flex;
	align-items: flex-start;
	gap: 0.6rem;
	margin: 0.25rem 0 1.25rem;
	font-size: 0.86rem;
	line-height: 1.45;
	opacity: 0.85;
	cursor: pointer;
}

.hw-auth__checkbox input {
	margin: 0.1rem 0 0;
	width: 18px;
	height: 18px;
	flex: 0 0 auto;
	accent-color: var(--hw-accent, #32432d);
	cursor: pointer;
}
.hw-auth__msg {
	margin: 1rem 0 0;
	padding: 0.8rem 1rem;
	border-radius: 10px;
	font-size: 0.92rem;
	line-height: 1.5;
}
.hw-auth__msg.is-success {
	background: rgba(50, 67, 45, 0.08);
	border: 1px solid rgba(50, 67, 45, 0.25);
	color: var(--hw-accent, #32432d);
}
.hw-auth__msg.is-error {
	background: #fdecea;
	border: 1px solid #f5c6c2;
	color: #b3261e;
}
.hw-auth__error {
	margin: 0 0 1rem;
	padding: 0.7rem 0.95rem;
	border-radius: 10px;
	background: #fdecea;
	border: 1px solid #f5c6c2;
	color: #b3261e;
	font-size: 0.9rem;
}
.hw-auth__match {
	display: block;
	margin-top: 0.35rem;
	font-size: 0.8rem;
	color: #b91c1c;
}
.hw-auth__inner {
	width: 100%;
}
/* Respect the `hidden` attribute — our display rules below would otherwise
   force the checklist + mismatch note visible before the user types. */
.hw-pwck[hidden],
.hw-auth__match[hidden] {
	display: none;
}

/* Password requirements checklist — mirrors the back office, with breathing room. */
.hw-pwck {
	list-style: none;
	margin: 0.1rem 0 1.15rem;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.45rem 1rem;
	font-size: 0.82rem;
	color: rgba(0, 0, 0, 0.55);
}
@media (max-width: 460px) {
	.hw-pwck { grid-template-columns: 1fr; }
}
.hw-pwck li {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	transition: color 0.15s ease;
}
.hw-pwck__dot {
	width: 15px;
	height: 15px;
	border-radius: 999px;
	border: 1.5px solid currentColor;
	flex: 0 0 auto;
	position: relative;
	opacity: 0.55;
}
.hw-pwck li.is-met {
	color: #2f7d39;
}
.hw-pwck li.is-met .hw-pwck__dot {
	background: #2f7d39;
	border-color: #2f7d39;
	opacity: 1;
}
.hw-pwck li.is-met .hw-pwck__dot::after {
	content: "";
	position: absolute;
	left: 5px;
	top: 1px;
	width: 4px;
	height: 8px;
	border: solid var(--hw-on-accent, #fff);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

/* Give WC's own password-strength meter room — it renders crammed directly
   under the input on the reset form by default. */
body.hw-account-page .woocommerce-password-strength,
body.hw-account-page .woocommerce-password-hint {
	display: block;
	margin-top: 0.6rem;
	padding: 0.4rem 0.6rem;
	border-radius: 8px;
	font-size: 0.82rem;
	line-height: 1.4;
}

/* 6-block one-time-code input — the 2FA code step at login (matches the
   account-setup OtpInput + the back-office look). */
.hw-otp {
	display: flex;
	gap: 0.5rem;
	justify-content: center;
	flex-wrap: wrap;
	margin-top: 0.25rem;
}
.hw-otp__cell {
	width: 46px;
	height: 56px;
	text-align: center;
	font-size: 1.5rem;
	font-weight: 700;
	border: 1.5px solid var(--color-border, #d8d2c7);
	border-radius: 10px;
	background: var(--hw-card, #fff);
	box-sizing: border-box;
	color: inherit;
	font-family: inherit;
}
.hw-otp__cell:focus {
	outline: none;
	border-color: var(--hw-accent, #32432d);
	box-shadow: 0 0 0 2px var(--hw-accent, #32432d);
}
@media (max-width: 420px) {
	.hw-otp__cell { width: 40px; height: 50px; font-size: 1.3rem; }
}

/* 2FA code card — mirrors the back-office login exactly: a BRAND block (shop
   name · "Welcome back" · sub) on one side and the FULL two-step form (heading +
   code boxes + Verify, kept together) on the other. Left-aligned, like the
   back-office. Adapts on available HEIGHT (not width):
     • TALL viewport (default): single column — brand stacked above the form
       ("big height").
     • SHORT + wide viewport: two columns — brand left, form right, split by a
       full-height divider ("small height").
   Same gate the back-office uses (max-height + min-width). The WC "enter the
   code" notice is suppressed in the template.
   (owner: brand-left / form-right, "JUST LIKE THE BACKEND") */
.hw-auth--2fa .hw-auth__panels--single {
	max-width: 470px;
}
.hw-auth__card--2fa {
	text-align: left;
	padding: 2.5rem;
}
.hw-2fa__grid {
	display: block;
}

/* Left: brand / welcome block. */
.hw-2fa__brand {
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var(--hw-accent, #32432d);
	margin-bottom: 0.7rem;
}
.hw-2fa__intro {
	margin-bottom: 1.75rem;
}
.hw-2fa__intro .hw-auth__title { margin: 0 0 0.5rem; text-align: left; }
.hw-2fa__intro .hw-auth__sub { margin: 0; text-align: left; max-width: none; }

/* Right: the two-step form. Heading + sub stay WITH the code, never split off. */
.hw-2fa__heading {
	margin: 0 0 0.35rem;
	font-size: 1.05rem;
	font-weight: 700;
}
.hw-2fa__panel-sub {
	margin: 0 0 1.4rem;
	font-size: 0.9rem;
	opacity: 0.7;
	line-height: 1.5;
}
.hw-2fa__panel .hw-auth__form { margin: 0; }
.hw-auth__card--2fa .hw-auth__row { margin: 0 0 1.25rem; }
.hw-auth__card--2fa .hw-auth__row label {
	display: block;
	text-align: left;
	margin-bottom: 0.6rem;
}
.hw-auth__card--2fa .hw-otp {
	margin-top: 0.35rem;
	justify-content: flex-start;
}
.hw-2fa__panel .hw-auth__alt { text-align: left; }

/* Two columns: brand left, form right, full-height divider — shown only when the
   single column wouldn't fit. It's just math: the card sits a fixed distance
   down the page (header + nav + the container's 80px top margin ≈ 293px) and the
   single-column card is ~540px tall, so one column needs roughly:
       293 (chrome above) + 540 (1-col card) + ~47 (breathing room) ≈ 880px
   of viewport HEIGHT. Above that it fits → one column ("big height"); at/under it
   would run past the fold → the compact two-column card ("small height"). The
   earlier height gate failed only because it used the back-office's number (560),
   which assumes the card owns the whole viewport — this one adds the storefront's
   chrome offset. Two columns also need ~760px of width to breathe; narrower
   screens stay single-column and scroll. (owner: "all it is, is math") */
@media (max-height: 880px) and (min-width: 760px) {
	.hw-auth--2fa .hw-auth__panels--single {
		max-width: 800px;
	}
	.hw-auth__card--2fa { padding: 2rem 2.25rem; }
	.hw-2fa__grid {
		display: grid;
		grid-template-columns: 1fr 1.3fr;
		gap: 2rem;
		align-items: stretch;
	}
	.hw-2fa__intro {
		margin-bottom: 0;
		display: flex;
		flex-direction: column;
		justify-content: center;
		padding-right: 2rem;
		border-right: 1px solid var(--color-border, #e5e0d8);
	}
	.hw-2fa__intro .hw-auth__title { font-size: 1.5rem; }
}
