/* =============================================================
 * ASI — My Account auth (lost-password / confirmation / reset)
 *
 * Stripped, asymmetric layout: a 3-step indicator on the inline-start
 * side of the page anchors the user in the recovery flow; a single
 * baseline-ruled input takes the answer; the only colour is on the
 * active step + primary action. No card, no shadow, no rounded
 * rectangle wrapping the form. The page hero strip provides the
 * chrome; this layer is intentionally bare.
 *
 * Loaded only on /my-account/lost-password/* (see inc/myaccount/
 * assets-enqueue.php).
 * ============================================================= */

.asi-auth {
	--auth-blue:        #0155B7;
	--auth-blue-2:      #013A7A;
	--auth-green:       #72B94A;
	--auth-orange:      #F59E0B;
	--auth-ink:         #0F172A;
	--auth-ink-60:      #475569;
	--auth-ink-40:      #64748B;
	--auth-ink-25:      color-mix(in srgb, #0F172A 25%, transparent);
	--auth-border:      color-mix(in srgb, #0F172A 12%, transparent);
	--auth-border-soft: color-mix(in srgb, #0F172A 7%, transparent);
	--auth-surface:     #FFFFFF;
	--auth-surface-2:   #F8FAFC;
	--auth-radius:      16px;
	--auth-pill:        100px;
	--auth-ease:        cubic-bezier(0.22, 1, 0.36, 1);

	max-inline-size: 880px;
	margin-inline: auto;
	margin-block: clamp(2rem, 4vw, 3rem) clamp(3rem, 6vw, 5rem);
	padding-inline: clamp(0px, 2vw, 16px);
	display: grid;
	gap: clamp(2rem, 4vw, 3rem);
	grid-template-columns: 1fr;
}

@media (min-width: 768px) {
	.asi-auth {
		/* Fixed col1 (steps rail) + flex col2 (form). Earlier we used
		   `minmax(220px, 1fr) minmax(0, 1.8fr)` — but fr distributes
		   *free* space, so col1's 220px base + 1fr share plus a narrow
		   container could leave col2 with as little as 180px. Pin col1
		   so col2 gets every remaining pixel. */
		grid-template-columns: minmax(200px, 240px) minmax(0, 1fr);
		column-gap: clamp(2rem, 5vw, 4rem);
		align-items: start;
	}
}

/* The login / register variant has no step indicator — instead, two tabs
   sit at the top of a single centred column. Reset the asymmetric grid. */
.asi-auth--login {
	grid-template-columns: 1fr;
	max-inline-size: 540px;
}

@media (min-width: 768px) {
	.asi-auth--login {
		grid-template-columns: 1fr;
		column-gap: 0;
	}
}

/* The branded login variant pairs the form with a brand-presence column on
   the inline-start side at ≥1024px so the page reads as part of the ASI
   site — not a generic auth screen. Below 1024px the brand panel collapses
   into a horizontal strip above the form. Below 600px the bullets + trust
   line drop so only the heading + lede remain. */
.asi-auth--branded {
	max-inline-size: 960px;
	grid-template-columns: 1fr;
	gap: clamp(1.75rem, 3vw, 2.5rem);
}

@media (min-width: 1024px) {
	.asi-auth--branded {
		grid-template-columns: minmax(260px, 1fr) minmax(0, 1.5fr);
		column-gap: clamp(2.25rem, 5vw, 4rem);
		align-items: start;
		max-inline-size: 1000px;
	}
}

.asi-auth--account {
	max-inline-size: 620px;
	grid-template-columns: 1fr;
}

@media (min-width: 768px) {
	.asi-auth--account {
		grid-template-columns: 1fr;
		column-gap: 0;
	}
}

/* ─── brand panel (login variant) ───────────────────────────── */

.asi-auth__brand {
	display: grid;
	gap: clamp(1.25rem, 2.5vw, 1.75rem);
	align-content: start;
	padding-block: clamp(0.5rem, 1.5vw, 1rem);
}

@media (min-width: 1024px) {
	.asi-auth__brand {
		padding-inline-end: clamp(1.5rem, 3vw, 2.5rem);
		border-inline-end: 1px solid var(--auth-border-soft);
		min-block-size: 100%;
	}
}

@media (max-width: 1023px) {
	.asi-auth__brand {
		padding-block-end: clamp(1.25rem, 3vw, 2rem);
		border-block-end: 1px solid var(--auth-border-soft);
	}
}

.asi-auth__brand-mark {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.asi-auth__brand-logo {
	inline-size: 96px;
	block-size: auto;
	display: block;
}

.asi-auth__brand-est {
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--auth-blue);
	padding: 4px 10px;
	background: color-mix(in srgb, var(--auth-blue) 8%, transparent);
	border: 1px solid color-mix(in srgb, var(--auth-blue) 16%, transparent);
	border-radius: var(--auth-pill);
	font-variant-numeric: tabular-nums;
}

.asi-auth__brand-body {
	display: grid;
	gap: 12px;
}

.asi-auth__brand-heading {
	margin: 0;
	font-size: clamp(1.375rem, 0.95rem + 1.2vw, 1.75rem);
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.12;
	color: var(--auth-ink);
}

.asi-auth__brand-lede {
	margin: 0;
	font-size: 0.9375rem;
	line-height: 1.5;
	color: var(--auth-ink-60);
	max-inline-size: 32ch;
}

.asi-auth__brand-bullets {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 10px;
}

.asi-auth__brand-bullets li {
	display: grid;
	grid-template-columns: 18px 1fr;
	gap: 10px;
	align-items: start;
	font-size: 0.9375rem;
	color: var(--auth-ink);
	line-height: 1.4;
}

.asi-auth__brand-bullets svg {
	color: var(--auth-green);
	margin-block-start: 3px;
	flex-shrink: 0;
}

.asi-auth__brand-trust {
	margin: 0;
	font-size: 0.75rem;
	letter-spacing: 0.03em;
	color: var(--auth-ink-40);
	padding-block-start: clamp(0.75rem, 2vw, 1rem);
	border-block-start: 1px solid var(--auth-border-soft);
}

@media (min-width: 1024px) {
	.asi-auth__brand-trust {
		margin-block-start: auto;
	}
}

@media (max-width: 599px) {
	.asi-auth__brand-bullets,
	.asi-auth__brand-trust {
		display: none;
	}

	.asi-auth__brand-mark {
		gap: 10px;
	}

	.asi-auth__brand-logo {
		inline-size: 78px;
	}
}

.asi-auth__main {
	display: grid;
	align-content: start;
	min-inline-size: 0;
}

/* ─── edit-account: fieldset groups + 2-col rows ──────────────── */

.asi-auth__group {
	border: 0;
	margin: 0;
	padding: 0;
	display: grid;
	gap: clamp(1rem, 2vw, 1.5rem);
	min-inline-size: 0;
}

.asi-auth__group + .asi-auth__group {
	margin-block-start: clamp(1.5rem, 3vw, 2.25rem);
	padding-block-start: clamp(1.5rem, 3vw, 2.25rem);
	border-block-start: 1px solid var(--auth-border-soft);
}

.asi-auth__group-title {
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--auth-ink-40);
	margin: 0;
	padding: 0;
	float: none;
	inline-size: 100%;
}

.asi-auth__group-desc {
	margin: -8px 0 0;
	font-size: 0.8125rem;
	line-height: 1.5;
	color: var(--auth-ink-60);
	max-inline-size: 38ch;
}

/* 2-column row used for paired fields like First name + Last name. */
.asi-auth__row--cols {
	display: grid;
	grid-template-columns: 1fr;
	gap: clamp(1rem, 2vw, 1.5rem);
	flex-direction: unset;
	align-items: stretch;
	justify-content: stretch;
	flex-wrap: nowrap;
}

@media (min-width: 600px) {
	.asi-auth__row--cols {
		grid-template-columns: 1fr 1fr;
	}
}

.asi-auth__hint {
	display: block;
	margin-block-start: 6px;
	font-size: 0.75rem;
	color: var(--auth-ink-40);
	line-height: 1.4;
}

/* ─── 3-step indicator ──────────────────────────────────────── */

.asi-auth__steps {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0;
	counter-reset: asi-auth-step;
	position: relative;
}

@media (max-width: 767px) {
	.asi-auth__steps {
		grid-template-columns: repeat(3, 1fr);
		gap: 0;
		padding-block-end: 0.5rem;
		border-block-end: 1px solid var(--auth-border-soft);
		margin-block-end: 0.5rem;
	}
}

.asi-auth__step {
	position: relative;
	display: grid;
	grid-template-columns: auto 1fr;
	column-gap: 14px;
	align-items: center;
	padding-block: 14px;
	counter-increment: asi-auth-step;
}

@media (max-width: 767px) {
	.asi-auth__step {
		grid-template-columns: 1fr;
		grid-template-rows: auto auto;
		align-items: center;
		justify-items: center;
		text-align: center;
		gap: 6px;
		padding-inline: 0.5rem;
	}
}

.asi-auth__step-num {
	position: relative;
	display: inline-grid;
	place-items: center;
	inline-size: 30px;
	block-size: 30px;
	border-radius: 50%;
	background: var(--auth-surface-2);
	border: 2px solid var(--auth-border);
	color: var(--auth-ink-40);
	font-size: 0.8125rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	flex-shrink: 0;
	z-index: 1;
	transition:
		background 220ms var(--auth-ease),
		border-color 220ms var(--auth-ease),
		color 220ms var(--auth-ease),
		box-shadow 220ms var(--auth-ease);
}

.asi-auth__step-num::before {
	content: counter(asi-auth-step);
}

.asi-auth__step-num svg {
	display: none;
	color: #fff;
}

.asi-auth__step--completed .asi-auth__step-num {
	background: linear-gradient(135deg, var(--auth-green) 0%, #5A9A38 100%);
	border-color: transparent;
	color: #fff;
	box-shadow: 0 4px 12px color-mix(in srgb, var(--auth-green) 30%, transparent);
}

.asi-auth__step--completed .asi-auth__step-num::before { display: none; }
.asi-auth__step--completed .asi-auth__step-num svg     { display: block; }

.asi-auth__step--current .asi-auth__step-num {
	background: var(--auth-surface);
	border-color: var(--auth-blue);
	color: var(--auth-blue);
	box-shadow:
		0 0 0 4px color-mix(in srgb, var(--auth-blue) 10%, transparent),
		0 4px 12px color-mix(in srgb, var(--auth-blue) 18%, transparent);
	animation: asi-auth-step-pulse 2s ease-in-out infinite;
}

@keyframes asi-auth-step-pulse {
	0%, 100% {
		box-shadow:
			0 0 0 4px color-mix(in srgb, var(--auth-blue) 10%, transparent),
			0 4px 12px color-mix(in srgb, var(--auth-blue) 18%, transparent);
	}
	50% {
		box-shadow:
			0 0 0 10px color-mix(in srgb, var(--auth-blue) 4%, transparent),
			0 4px 16px color-mix(in srgb, var(--auth-blue) 22%, transparent);
	}
}

/* Connectors */
@media (min-width: 768px) {
	/* Vertical connector below each step's number, anchored to the column */
	.asi-auth__step:not(:last-child)::after {
		content: "";
		position: absolute;
		inset-inline-start: 14px; /* halfway down the 30px circle */
		inset-block-start: calc(14px + 30px); /* below the marker */
		inline-size: 2px;
		block-size: calc(100% - 30px);
		background: var(--auth-border);
		z-index: 0;
	}

	.asi-auth__step--completed:not(:last-child)::after {
		background: linear-gradient(180deg,
			var(--auth-green) 0%,
			color-mix(in srgb, var(--auth-green) 60%, transparent) 50%,
			var(--auth-border) 100%);
	}
}

@media (max-width: 767px) {
	/* Horizontal connector between markers, hidden when step is last */
	.asi-auth__step:not(:last-child)::after {
		content: "";
		position: absolute;
		inset-inline-start: 50%;
		inset-block-start: 15px; /* center of 30px num */
		transform: translateX(20px);
		inline-size: calc(100% - 40px);
		block-size: 2px;
		background: var(--auth-border);
		z-index: 0;
	}

	.asi-auth__step--completed:not(:last-child)::after {
		background: linear-gradient(90deg,
			var(--auth-green) 0%,
			color-mix(in srgb, var(--auth-green) 60%, transparent) 60%,
			var(--auth-border) 100%);
	}

	[dir="rtl"] .asi-auth__step:not(:last-child)::after {
		transform: translateX(-20px);
	}
}

.asi-auth__step-body {
	display: grid;
	gap: 2px;
	min-inline-size: 0;
}

.asi-auth__step-label {
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--auth-ink);
	letter-spacing: -0.005em;
	line-height: 1.25;
}

.asi-auth__step--upcoming .asi-auth__step-label {
	color: var(--auth-ink-40);
	font-weight: 500;
}

.asi-auth__step--current .asi-auth__step-label {
	color: var(--auth-blue);
}

.asi-auth__step-meta {
	font-size: 0.8125rem;
	color: var(--auth-ink-40);
	line-height: 1.4;
}

@media (max-width: 767px) {
	.asi-auth__step-meta { display: none; } /* keep mobile rail dense */
}

/* ─── tabs (login variant) ──────────────────────────────────── */

.asi-auth__tabs {
	display: flex;
	gap: clamp(1.5rem, 4vw, 2.5rem);
	margin-block-end: clamp(1.5rem, 3vw, 2.25rem);
	border-block-end: 1px solid var(--auth-border-soft);
	position: relative;
}

.asi-auth__tab {
	-webkit-appearance: none;
	appearance: none;
	border: 0;
	background: transparent;
	font: inherit;
	font-size: clamp(1.0625rem, 0.95rem + 0.4vw, 1.25rem);
	font-weight: 600;
	letter-spacing: -0.01em;
	color: var(--auth-ink-40);
	padding: 14px 0;
	position: relative;
	cursor: pointer;
	transition: color 200ms var(--auth-ease);
}

.asi-auth__tab:hover { color: var(--auth-ink-60); }
.asi-auth__tab.is-active { color: var(--auth-ink); }

.asi-auth__tab::after {
	content: "";
	position: absolute;
	inset-inline: 0;
	inset-block-end: -1px;
	block-size: 2px;
	background: transparent;
	transform: scaleX(0);
	transform-origin: left center;
	transition: background 220ms var(--auth-ease), transform 320ms var(--auth-ease);
}

.asi-auth__tab.is-active::after {
	background: var(--auth-blue);
	transform: scaleX(1);
}

.asi-auth__tab:focus-visible {
	outline: 2px solid var(--auth-blue);
	outline-offset: 4px;
	border-radius: 4px;
}

[dir="rtl"] .asi-auth__tab::after { transform-origin: right center; }

/* ─── panels ────────────────────────────────────────────────── */

.asi-auth__panels {
	position: relative;
}

.asi-auth__panel {
	transition: opacity 240ms var(--auth-ease);
}

.asi-auth__panel[hidden] {
	display: none;
}

.asi-auth__panel.is-leaving {
	opacity: 0;
	pointer-events: none;
}

/* ─── form / content area ───────────────────────────────────── */

.asi-auth__form {
	display: grid;
	gap: clamp(1.25rem, 2.5vw, 1.75rem);
	max-inline-size: 36rem;
	min-inline-size: 0;
}

.asi-auth__head {
	display: grid;
	gap: 8px;
}

.asi-auth__heading {
	margin: 0;
	font-size: clamp(1.625rem, 1rem + 2vw, 2.25rem);
	font-weight: 700;
	line-height: 1.08;
	letter-spacing: -0.022em;
	color: var(--auth-ink);
}

.asi-auth__lede {
	margin: 0;
	font-size: 1rem;
	line-height: 1.5;
	color: var(--auth-ink-60);
	max-inline-size: 38ch;
}

/* ─── field — baseline-ruled input ──────────────────────────── */

.asi-auth__field {
	display: grid;
	gap: 0;
	position: relative;
}

.asi-auth__label {
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--auth-ink-40);
	margin-block-end: 6px;
}

.asi-auth__input-wrap {
	position: relative;
	display: flex;
	align-items: center;
	gap: 8px;
	border-block-end: 2px solid var(--auth-border);
	transition: border-color 220ms var(--auth-ease), box-shadow 220ms var(--auth-ease);
}

.asi-auth__input-wrap:hover {
	border-block-end-color: color-mix(in srgb, var(--auth-ink) 22%, transparent);
}

.asi-auth__input-wrap:has(.asi-auth__input:focus-visible) {
	border-block-end-color: var(--auth-blue);
	box-shadow: 0 1px 0 0 var(--auth-blue); /* doubles the rule into a confident 4px focus stroke */
}

.asi-auth__input {
	-webkit-appearance: none;
	appearance: none;
	border: 0;
	border-block-end: 2px solid var(--auth-border);
	background: transparent;
	border-radius: 0;
	font: inherit;
	font-size: clamp(1.125rem, 0.95rem + 0.5vw, 1.25rem);
	font-weight: 500;
	color: var(--auth-ink);
	padding: 10px 0;
	inline-size: 100%;
	min-inline-size: 0;
	letter-spacing: -0.005em;
	transition: border-color 220ms var(--auth-ease);
}

/* When the input lives inside an input-wrap, the wrap owns the rule. */
.asi-auth__input-wrap > .asi-auth__input {
	border-block-end: 0;
}

.asi-auth__input::placeholder {
	color: var(--auth-ink-25);
	font-weight: 400;
}

.asi-auth__input:focus-visible {
	outline: none;
	border-block-end-color: var(--auth-blue);
}

.asi-auth__input:autofill,
.asi-auth__input:-webkit-autofill {
	-webkit-text-fill-color: var(--auth-ink);
	box-shadow: 0 0 0 1000px var(--auth-surface) inset;
}

/* Show/hide password toggle */
.asi-auth__toggle {
	-webkit-appearance: none;
	appearance: none;
	border: 0;
	background: transparent;
	color: var(--auth-ink-40);
	cursor: pointer;
	padding: 6px;
	border-radius: 8px;
	display: grid;
	place-items: center;
	transition: color 160ms var(--auth-ease), background 160ms var(--auth-ease);
}

.asi-auth__toggle:hover { color: var(--auth-blue); background: color-mix(in srgb, var(--auth-blue) 6%, transparent); }
.asi-auth__toggle:focus-visible { outline: 2px solid var(--auth-blue); outline-offset: 2px; }

.asi-auth__toggle-off { display: none; }
.asi-auth__toggle[data-shown="true"] .asi-auth__toggle-on  { display: none; }
.asi-auth__toggle[data-shown="true"] .asi-auth__toggle-off { display: block; }

/* ─── strength meter (stage 3) ──────────────────────────────── */

.asi-auth__strength {
	display: grid;
	gap: 6px;
	margin-block-start: 12px;
}

.asi-auth__strength-bar {
	display: block;
	block-size: 4px;
	background: var(--auth-border-soft);
	border-radius: 4px;
	overflow: hidden;
	position: relative;
}

.asi-auth__strength-fill {
	display: block;
	block-size: 100%;
	inline-size: var(--strength, 0%);
	background: var(--auth-orange); /* default mid colour; JS sets the kind via data-strength */
	transform-origin: left center;
	transition: inline-size 260ms var(--auth-ease), background 260ms var(--auth-ease);
}

[dir="rtl"] .asi-auth__strength-fill { transform-origin: right center; }

.asi-auth__strength[data-strength="weak"]   .asi-auth__strength-fill { background: #DC2626; }
.asi-auth__strength[data-strength="fair"]   .asi-auth__strength-fill { background: var(--auth-orange); }
.asi-auth__strength[data-strength="good"]   .asi-auth__strength-fill { background: #84CC16; }
.asi-auth__strength[data-strength="strong"] .asi-auth__strength-fill { background: var(--auth-green); }

.asi-auth__strength-label {
	font-size: 0.75rem;
	color: var(--auth-ink-40);
	letter-spacing: 0.01em;
}

.asi-auth__strength[data-strength="weak"]   .asi-auth__strength-label { color: #B91C1C; }
.asi-auth__strength[data-strength="strong"] .asi-auth__strength-label { color: var(--auth-green); }

/* ─── remember-me row (login) ───────────────────────────────── */

.asi-auth__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px;
	justify-content: space-between;
}

/* Custom checkbox — pure CSS, hides the native input but keeps it
   focusable for keyboard + AT users. */
.asi-auth__check {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-size: 0.875rem;
	color: var(--auth-ink-60);
	cursor: pointer;
	user-select: none;
}

.asi-auth__check input[type="checkbox"] {
	position: absolute;
	inline-size: 1px;
	block-size: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.asi-auth__check-mark {
	inline-size: 18px;
	block-size: 18px;
	border-radius: 5px;
	border: 1.5px solid var(--auth-border);
	background: var(--auth-surface);
	display: grid;
	place-items: center;
	color: transparent;
	flex-shrink: 0;
	transition:
		background 160ms var(--auth-ease),
		border-color 160ms var(--auth-ease),
		color 160ms var(--auth-ease);
}

.asi-auth__check input[type="checkbox"]:checked + .asi-auth__check-mark {
	background: var(--auth-blue);
	border-color: var(--auth-blue);
	color: #fff;
}

.asi-auth__check input[type="checkbox"]:focus-visible + .asi-auth__check-mark {
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--auth-blue) 18%, transparent);
}

.asi-auth__check-label {
	font-weight: 500;
	color: var(--auth-ink-60);
}

/* Make the lost-password link in the row align baseline with the
   "Remember me" check label. Without an explicit size, `font: inherit`
   on the link picks up the form's body font-size (which is generous for
   inputs) and renders the link as large as a heading. */
.asi-auth__row .asi-auth__return-link {
	margin-inline-start: 0;
	font-size: 0.875rem;
	line-height: 1.5;
}

/* ─── primary action ────────────────────────────────────────── */

.asi-auth__actions {
	display: grid;
	gap: 14px;
	justify-items: start;
}

.asi-auth__submit {
	-webkit-appearance: none;
	appearance: none;
	border: 0;
	background: var(--auth-blue);
	color: #fff;
	font: inherit;
	font-size: 0.9375rem;
	font-weight: 600;
	letter-spacing: 0.005em;
	padding: 14px 24px;
	border-radius: var(--auth-pill);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-block-size: 48px;
	transition: background 180ms var(--auth-ease), transform 180ms var(--auth-ease), box-shadow 180ms var(--auth-ease);
}

.asi-auth__submit:hover {
	background: color-mix(in srgb, var(--auth-blue) 88%, #000);
	transform: translateY(-1px);
	box-shadow: 0 6px 16px -4px color-mix(in srgb, var(--auth-blue) 40%, transparent);
}

.asi-auth__submit:focus-visible {
	outline: 2px solid var(--auth-blue);
	outline-offset: 3px;
}

.asi-auth__submit-arrow {
	transition: transform 200ms var(--auth-ease);
}

.asi-auth__submit:hover .asi-auth__submit-arrow {
	transform: translateX(2px);
}

[dir="rtl"] .asi-auth__submit-arrow { transform: scaleX(-1); }
[dir="rtl"] .asi-auth__submit:hover .asi-auth__submit-arrow { transform: scaleX(-1) translateX(2px); }

/* Ghost variant for the "Try a different email" action on stage 2 */
.asi-auth__submit--ghost {
	background: transparent;
	color: var(--auth-blue);
	border: 1px solid color-mix(in srgb, var(--auth-blue) 22%, transparent);
	text-decoration: none;
}

.asi-auth__submit--ghost:hover {
	background: color-mix(in srgb, var(--auth-blue) 6%, transparent);
	border-color: var(--auth-blue);
}

/* ─── return / sign-in link ─────────────────────────────────── */

.asi-auth__return {
	margin: 0;
	font-size: 0.875rem;
	color: var(--auth-ink-40);
}

.asi-auth__return-link {
	-webkit-appearance: none;
	appearance: none;
	border: 0;
	background: transparent;
	padding: 0;
	font: inherit;
	color: var(--auth-blue);
	font-weight: 500;
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
	margin-inline-start: 4px;
	cursor: pointer;
}

.asi-auth__return-link:hover {
	text-decoration-thickness: 2px;
}

.asi-auth__return-link:focus-visible {
	outline: 2px solid var(--auth-blue);
	outline-offset: 3px;
	border-radius: 2px;
}

/* ─── hint list (stage 2) ───────────────────────────────────── */

.asi-auth__hints {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 10px;
}

.asi-auth__hints li {
	position: relative;
	padding-inline-start: 22px;
	font-size: 0.9375rem;
	color: var(--auth-ink-60);
	line-height: 1.5;
}

/* Tiny dash "marker" in front of each hint — quiet, intentional, not a bullet */
.asi-auth__hints li::before {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	inset-block-start: 0.65em;
	inline-size: 12px;
	block-size: 2px;
	background: var(--auth-blue);
}

/* ─── entry choreography ────────────────────────────────────── */

.asi-auth__steps,
.asi-auth__head,
.asi-auth__field,
.asi-auth__actions,
.asi-auth__hints {
	transition: opacity 380ms var(--auth-ease), transform 380ms var(--auth-ease);
}

@starting-style {
	.asi-auth__steps   { opacity: 0; transform: translateY(8px); transition-delay:   0ms; }
	.asi-auth__head    { opacity: 0; transform: translateY(8px); transition-delay:  80ms; }
	.asi-auth__field   { opacity: 0; transform: translateY(8px); transition-delay: 160ms; }
	.asi-auth__field + .asi-auth__field { transition-delay: 220ms; }
	.asi-auth__actions { opacity: 0; transform: translateY(8px); transition-delay: 280ms; }
	.asi-auth__hints   { opacity: 0; transform: translateY(8px); transition-delay: 240ms; }
}

@media (prefers-reduced-motion: reduce) {
	.asi-auth__step--current .asi-auth__step-num {
		animation: none;
	}

	.asi-auth__steps,
	.asi-auth__head,
	.asi-auth__field,
	.asi-auth__actions,
	.asi-auth__hints {
		transition: none;
	}

	@starting-style {
		.asi-auth__steps,
		.asi-auth__head,
		.asi-auth__field,
		.asi-auth__actions,
		.asi-auth__hints {
			opacity: 1;
			transform: none;
		}
	}
}

/* ─── kill the inherited theme defaults that fight the layout ── */

/* The global .asi-myaccount .woocommerce-MyAccount-content has rules
   that wrap WC default forms in a card with padding/shadow. Our auth
   layout doesn't want any of that. */
.asi-myaccount .woocommerce-MyAccount-content > .asi-auth {
	margin-block-start: clamp(1rem, 3vw, 2rem);
}

/* If WC injects a notice (ours suppresses success on stage 2, but
   error notices still render), let them be small and ungrand. */
.asi-myaccount .woocommerce-MyAccount-content .woocommerce-notices-wrapper:has(+ .asi-auth) {
	max-inline-size: 880px;
	margin-inline: auto;
	margin-block: clamp(1rem, 3vw, 1.5rem) 0;
	padding-inline: clamp(0px, 2vw, 16px);
}

/* ─── inherited-WC overrides (the polish pass) ─────────────────
   The .asi-myaccount body scope in custom.css ships card / box /
   padded-input styling for legacy .woocommerce-form-* selectors that
   we keep on the form element for plugin compat. Inside .asi-auth,
   we want NONE of that — the design is intentionally bare. These
   rules win because the .asi-auth ancestor adds extra specificity. */

.asi-myaccount .asi-auth .woocommerce-form-login,
.asi-myaccount .asi-auth .woocommerce-form-register,
.asi-myaccount .asi-auth .woocommerce-ResetPassword {
	max-inline-size: none;
	margin: 0;
	background: transparent;
	border: 0;
	border-radius: 0;
	padding: 0;
	box-shadow: none;
	overflow: visible;
}

.asi-myaccount .asi-auth .woocommerce-form-login::before,
.asi-myaccount .asi-auth .woocommerce-form-register::before,
.asi-myaccount .asi-auth .woocommerce-ResetPassword::before {
	display: none;
}

/* Form-row / form-row labels / form-row spacing — the asi-auth__field
   replaces these structurally, but WC's privacy paragraph uses
   form-row siblings, so we still need to tame the legacy spacing. */
.asi-myaccount .asi-auth .woocommerce-form-row,
.asi-myaccount .asi-auth .form-row {
	margin: 0;
	padding: 0;
	display: contents; /* make form-row wrappers visually invisible */
}

/* Native WC inputs/labels — neutralize so the .asi-auth__input rules
   become the single source of truth. */
.asi-myaccount .asi-auth .woocommerce-Input,
.asi-myaccount .asi-auth .input-text {
	font-family: inherit;
	background: transparent;
	border: 0;
	border-radius: 0;
	padding: 0;
	inline-size: 100%;
	box-shadow: none;
	transition: border-color 220ms var(--auth-ease);
}

.asi-myaccount .asi-auth .woocommerce-Input:hover,
.asi-myaccount .asi-auth .input-text:hover {
	border-color: transparent;
}

.asi-myaccount .asi-auth .woocommerce-Input:focus,
.asi-myaccount .asi-auth .input-text:focus {
	border-color: transparent;
	box-shadow: none;
}

.asi-myaccount .asi-auth h2 {
	font-family: inherit;
	margin-block: 0;
	padding: 0;
}

/* Native WC submit buttons — let .asi-auth__submit own everything. */
.asi-myaccount .asi-auth .woocommerce-form-login__submit,
.asi-myaccount .asi-auth .woocommerce-form-register__submit,
.asi-myaccount .asi-auth .woocommerce-Button,
.asi-myaccount .asi-auth .button {
	font-family: inherit;
	background: var(--auth-blue);
	border-radius: var(--auth-pill);
	padding: 14px 24px;
	box-shadow: none;
}

/* WC's privacy policy paragraph (added by woocommerce_register_form
   action via wc_registration_privacy_policy_text). Make it small,
   quiet, and properly aligned with the rest of the form. */
.asi-myaccount .asi-auth .woocommerce-privacy-policy-text,
.asi-myaccount .asi-auth .woocommerce-form-register p:not(.form-row) {
	margin: 0;
	padding: 0;
	font-size: 0.75rem;
	line-height: 1.5;
	color: var(--auth-ink-40);
	max-inline-size: 36rem;
}

.asi-myaccount .asi-auth .woocommerce-privacy-policy-text a,
.asi-myaccount .asi-auth .woocommerce-form-register p:not(.form-row) a {
	color: var(--auth-blue);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
}

/* WC may render a `.lost_password` paragraph as a sibling of the form
   row when a password field exists — kill it inside asi-auth (we have
   our own placement next to Remember-me). */
.asi-myaccount .asi-auth .lost_password {
	display: none;
}

/* ─── tighten the vertical rhythm ──────────────────────────────
   The page-hero strip already has its own bottom margin; the auth
   container adds another top margin; the tabs add yet another
   bottom margin. Stack of three is too generous. Compress the auth
   container's margins for both auth flows so the form sits closer
   to the hero. */
.asi-myaccount.woocommerce-lost-password .asi-page-hero,
.asi-myaccount.woocommerce-account .asi-page-hero {
	margin-block-end: clamp(0.75rem, 2vw, 1.25rem);
}

.asi-auth {
	margin-block: clamp(1rem, 2.5vw, 1.75rem) clamp(2rem, 5vw, 3.5rem);
}

.asi-auth--login {
	margin-block-start: clamp(1rem, 2.5vw, 1.75rem);
}

/* The login variant in particular had ~200px of empty space above
   the form because the panel container was loose. Compress. */
.asi-auth--login .asi-auth__panels {
	margin-block-start: 0;
}

.asi-auth--login .asi-auth__panel {
	padding: 0;
	margin: 0;
}

.asi-auth--login .asi-auth__form {
	gap: clamp(1rem, 2vw, 1.5rem);
}

.asi-auth__head {
	gap: 6px;
}

.asi-auth__heading {
	font-size: clamp(1.5rem, 1rem + 1.6vw, 2rem);
}

.asi-auth__lede {
	font-size: 0.9375rem;
	line-height: 1.5;
	max-inline-size: 36ch;
}

.asi-auth__tabs {
	margin-block-end: clamp(1rem, 2vw, 1.5rem);
}

.asi-auth__tab {
	padding: 12px 0;
}

.asi-auth__field + .asi-auth__field {
	margin-block-start: 4px;
}

.asi-auth__actions {
	gap: 12px;
	margin-block-start: 4px;
}

/* Stack remember-me + forgot-password vertically on narrow screens
   so the row doesn't feel cramped at small widths. */
@media (max-width: 460px) {
	.asi-auth__row {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}
}

/* =============================================================
 * /overdrive — Edit Account
 * Profile hero card + paper-sheet sections + halo CTA + form-dirty state +
 * "SAVED" stamp on success. Layered ON TOP of the existing .asi-auth--account
 * baseline so removing this block falls back gracefully to plain styling.
 * ============================================================= */

@property --asi-acct-halo {
	syntax: "<angle>";
	initial-value: 0deg;
	inherits: false;
}
@property --asi-acct-stamp-tilt {
	syntax: "<angle>";
	initial-value: -8deg;
	inherits: false;
}

.asi-auth--account {
	max-inline-size: 720px;
}

/* ─── Profile hero card ────────────────────────────────────── */
.asi-auth__hero {
	position: relative;
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: clamp(14px, 2vw, 22px);
	padding: clamp(20px, 3vw, 28px) clamp(22px, 3.5vw, 32px);
	background:
		radial-gradient(ellipse at 0% 0%, color-mix(in srgb, var(--auth-blue) 7%, transparent), transparent 55%),
		radial-gradient(ellipse at 100% 100%, color-mix(in srgb, var(--auth-orange) 6%, transparent), transparent 55%),
		oklch(98.5% 0.004 250);
	border: 1px solid var(--auth-border-soft);
	border-radius: 18px;
	box-shadow:
		0 1px 0 rgba(255,255,255,0.6) inset,
		0 12px 28px -16px rgba(15,23,42,0.18);
	overflow: hidden;
	margin-block-end: clamp(20px, 3vw, 28px);
	isolation: isolate;
}

.asi-auth__hero-stripe {
	position: absolute;
	inset-inline: 0;
	inset-block-start: 0;
	block-size: 3px;
	background: linear-gradient(135deg, var(--auth-blue) 0%, var(--auth-blue-2) 100%);
	z-index: 1;
}

/* paper grain — subtle */
.asi-auth__hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.4' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.03 0'/></filter><rect width='240' height='240' filter='url(%23n)'/></svg>");
	pointer-events: none;
	mix-blend-mode: multiply;
	z-index: 0;
}
.asi-auth__hero > * { position: relative; z-index: 2; }

/* avatar — gradient circle with initials */
.asi-auth__hero-avatar {
	inline-size: 64px;
	block-size: 64px;
	border-radius: 50%;
	background:
		linear-gradient(135deg, var(--auth-blue) 0%, var(--auth-blue-2) 100%);
	display: grid;
	place-items: center;
	color: white;
	font-weight: 700;
	font-size: 22px;
	letter-spacing: 0.04em;
	box-shadow:
		0 1px 0 rgba(255,255,255,0.4) inset,
		0 6px 16px -6px color-mix(in srgb, var(--auth-blue) 65%, transparent);
	flex-shrink: 0;
}
.asi-auth__hero-initials { line-height: 1; user-select: none; }

.asi-auth__hero-body { min-inline-size: 0; display: grid; gap: 4px; }
.asi-auth__hero-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding-inline: 10px;
	padding-block: 4px;
	border-radius: 100px;
	background: color-mix(in srgb, var(--auth-blue) 6%, white);
	border: 1px solid color-mix(in srgb, var(--auth-blue) 18%, transparent);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.06em;
	color: var(--auth-ink-60);
	width: fit-content;
}
.asi-auth__hero-chip-dot {
	inline-size: 6px;
	block-size: 6px;
	border-radius: 50%;
	background: var(--auth-green);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--auth-green) 18%, transparent);
}
.asi-auth__hero-name {
	margin: 0;
	font-size: clamp(20px, 2.4vw, 24px);
	font-weight: 700;
	color: var(--auth-ink);
	letter-spacing: -0.01em;
	line-height: 1.15;
}
.asi-auth__hero-email {
	font-size: 13px;
	color: var(--auth-ink-60);
	font-variant-numeric: tabular-nums;
}

/* SAVED stamp — only visible when [data-asi-saved="true"] is set on hero */
.asi-auth__hero-stamp {
	width: 92px;
	height: 92px;
	border: 3px solid var(--auth-green);
	border-radius: 50%;
	display: grid;
	place-items: center;
	color: var(--auth-green);
	transform: rotate(var(--asi-acct-stamp-tilt)) scale(0);
	opacity: 0;
	mix-blend-mode: multiply;
	pointer-events: none;
	flex-shrink: 0;
}
.asi-auth__hero[data-asi-saved="true"] .asi-auth__hero-stamp {
	animation: asi-acct-stamp 700ms var(--auth-ease) 250ms forwards;
}
.asi-auth__hero-stamp::before {
	content: "";
	position: absolute;
	inset: 5px;
	border: 1.5px solid currentColor;
	border-radius: 50%;
	opacity: 0.55;
}
.asi-auth__hero-stamp::after {
	content: "";
	position: absolute;
	inset: -2px;
	border-radius: 50%;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='2.4' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.7 0'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
	mix-blend-mode: lighten;
	opacity: 0.35;
	pointer-events: none;
}
.asi-auth__hero-stamp-text {
	font-size: 14px;
	font-weight: 800;
	letter-spacing: 0.18em;
	line-height: 1;
	text-align: center;
}
.asi-auth__hero-stamp-text small {
	display: block;
	font-size: 7.5px;
	font-weight: 600;
	letter-spacing: 0.2em;
	margin-block-start: 4px;
	opacity: 0.78;
}
@keyframes asi-acct-stamp {
	0%   { transform: rotate(0deg)  scale(2.4); opacity: 0;    }
	60%  { transform: rotate(-12deg) scale(1.04); opacity: 0.95; }
	100% { transform: rotate(-8deg)  scale(1);   opacity: 0.9;  }
}

/* On narrow screens drop the avatar to keep the row readable */
@media (max-width: 540px) {
	.asi-auth__hero {
		grid-template-columns: 1fr auto;
		gap: 12px;
	}
	.asi-auth__hero-avatar {
		grid-column: 1 / -1;
		inline-size: 56px;
		block-size: 56px;
		font-size: 19px;
	}
	.asi-auth__hero-stamp {
		width: 76px;
		height: 76px;
	}
}

/* ─── Heading row below the hero ──────────────────────────── */
.asi-auth__head--account {
	margin-block-end: clamp(16px, 2.5vw, 22px);
}
.asi-auth__head--account .asi-auth__heading {
	font-size: clamp(28px, 3.4vw, 34px);
	letter-spacing: -0.022em;
	background: linear-gradient(90deg, var(--auth-ink) 60%, var(--auth-blue) 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

/* ─── Halo on Save button — ambient slow-rotating conic glow ─── */
.asi-auth__submit--halo {
	position: relative;
	isolation: isolate;
	transition:
		transform 220ms var(--auth-ease),
		box-shadow 220ms var(--auth-ease),
		background 220ms var(--auth-ease),
		opacity 220ms var(--auth-ease);
}
.asi-auth__submit--halo::before {
	content: "";
	position: absolute;
	inset: -3px;
	border-radius: inherit;
	background: conic-gradient(
		from var(--asi-acct-halo),
		transparent 0deg,
		color-mix(in srgb, var(--auth-blue) 65%, transparent) 70deg,
		transparent 150deg,
		color-mix(in srgb, var(--auth-orange) 55%, transparent) 200deg,
		transparent 290deg,
		color-mix(in srgb, var(--auth-blue) 65%, transparent) 360deg
	);
	filter: blur(10px);
	z-index: -1;
	opacity: 0;
	animation: asi-acct-halo 9s linear infinite;
	transition: opacity 320ms var(--auth-ease);
}
@keyframes asi-acct-halo { to { --asi-acct-halo: 360deg; } }

/* halo only shows when form is dirty */
form[data-asi-dirty-form][data-asi-dirty="true"] .asi-auth__submit--halo::before {
	opacity: 0.7;
}

/* "No changes yet" / "Save changes" label swap based on form-dirty state */
.asi-auth__submit-label-clean { display: none; }
form[data-asi-dirty-form]:not([data-asi-dirty="true"]) .asi-auth__submit--halo {
	background: oklch(95% 0.005 250);
	color: var(--auth-ink-60);
	cursor: default;
	box-shadow: 0 0 0 1px var(--auth-border) inset;
}
form[data-asi-dirty-form]:not([data-asi-dirty="true"]) .asi-auth__submit--halo .asi-auth__submit-arrow {
	opacity: 0.4;
}
form[data-asi-dirty-form]:not([data-asi-dirty="true"]) [data-asi-save-label-default] { display: none; }
form[data-asi-dirty-form]:not([data-asi-dirty="true"]) [data-asi-save-label-clean]   { display: inline; }

/* Discard button reveal */
.asi-auth__actions--account {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}
form[data-asi-dirty-form][data-asi-dirty="true"] [data-asi-discard] {
	display: inline-flex;
	animation: asi-acct-fade-in 240ms var(--auth-ease);
}
@keyframes asi-acct-fade-in {
	from { opacity: 0; transform: translateY(2px); }
	to   { opacity: 1; transform: none; }
}

/* ─── Reduced motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
	.asi-auth__hero[data-asi-saved="true"] .asi-auth__hero-stamp {
		animation: none;
		transform: rotate(-8deg) scale(1);
		opacity: 0.9;
	}
	.asi-auth__submit--halo::before { animation: none; }
}

/* ============================================================== *
 *  ACCOUNT EDIT — POLISH PASS                                      *
 *  Scoped to .asi-auth--account only. Login / register / lost-pw   *
 *  pages keep their minimal bare-underline aesthetic.              *
 * ============================================================== */

/* Hero — quieter sizing, no orphan email duplicate */
.asi-auth--account .asi-auth__hero {
	padding: clamp(18px, 2.5vw, 24px) clamp(20px, 3vw, 28px);
	margin-block-end: clamp(14px, 2vw, 20px);
}
.asi-auth--account .asi-auth__hero-name {
	font-size: clamp(17px, 1.8vw, 20px);
	line-height: 1.25;
	letter-spacing: -0.005em;
	overflow-wrap: anywhere;
}
.asi-auth--account .asi-auth__hero-email {
	font-size: 12px;
	letter-spacing: 0;
	overflow-wrap: anywhere;
}

/* Heading + lede — tighter rhythm */
.asi-auth--account .asi-auth__head--account {
	margin-block: clamp(8px, 1.5vw, 14px) clamp(14px, 2vw, 18px);
}
.asi-auth--account .asi-auth__head--account .asi-auth__heading {
	font-size: clamp(20px, 2.4vw, 26px) !important;
	line-height: 1.15;
	letter-spacing: -0.015em;
	margin-block-end: 6px;
}
.asi-auth--account .asi-auth__head--account .asi-auth__lede {
	font-size: 13px;
	line-height: 1.55;
	max-inline-size: 56ch;
	color: var(--auth-ink-60);
	margin: 0;
}

/* Form sections — soft cards instead of bare stacked text */
.asi-auth--account .asi-auth__group {
	background: white;
	border: 1px solid var(--auth-border-soft, color-mix(in srgb, var(--auth-blue, #0155B7) 8%, #e2e8f0));
	border-radius: 14px;
	padding: clamp(16px, 2.4vw, 22px);
	box-shadow:
		0 1px 0 rgba(255, 255, 255, 0.6) inset,
		0 1px 2px rgba(15, 23, 42, 0.04);
	margin-block-end: clamp(14px, 2vw, 18px);
}
.asi-auth--account .asi-auth__group + .asi-auth__group {
	margin-block-start: 0;
}
.asi-auth--account .asi-auth__group-title {
	display: block;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--auth-blue, #0155B7);
	margin: 0 0 4px;
	padding: 0;
}
.asi-auth--account .asi-auth__group-desc {
	font-size: 13px;
	color: var(--auth-ink-60);
	margin: 0 0 18px;
	line-height: 1.55;
}

/* Field rows — proper boxed inputs */
.asi-auth--account .asi-auth__field {
	margin-block-end: 14px;
}
.asi-auth--account .asi-auth__field:last-child {
	margin-block-end: 0;
}
.asi-auth--account .asi-auth__row--cols {
	display: flex;
	gap: 12px;
	margin-block-end: 14px;
	align-items: flex-start;
}
.asi-auth--account .asi-auth__row--cols > .asi-auth__field {
	flex: 1 1 0;
	min-inline-size: 0;
	align-self: flex-start;
	margin-block-end: 0;
}
/* Disable the per-field transition-delay stagger inside two-column rows —
   the 60ms offset between siblings was leaving the second column visibly
   lower than the first when the entrance transition wasn't quite synced. */
.asi-auth--account .asi-auth__row--cols > .asi-auth__field,
.asi-auth--account .asi-auth__row--cols > .asi-auth__field + .asi-auth__field {
	transition-delay: 0ms !important;
}
@starting-style {
	.asi-auth--account .asi-auth__row--cols > .asi-auth__field,
	.asi-auth--account .asi-auth__row--cols > .asi-auth__field + .asi-auth__field {
		transition-delay: 0ms;
	}
}
@media (max-width: 540px) {
	.asi-auth--account .asi-auth__row--cols {
		flex-direction: column;
	}
}

.asi-auth--account .asi-auth__label {
	display: block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	color: var(--auth-ink-60);
	margin-block-end: 6px;
	text-transform: uppercase;
}

/* Boxed input — replaces bare-underline */
.asi-auth--account .asi-auth__input-wrap {
	display: flex;
	align-items: center;
	gap: 4px;
	background: oklch(99% 0.003 250);
	border: 1px solid var(--auth-border, #e2e8f0) !important;
	border-radius: 10px !important;
	padding-inline-end: 6px !important;
	transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
.asi-auth--account .asi-auth__input {
	-webkit-appearance: none;
	appearance: none;
	background: oklch(99% 0.003 250) !important;
	border: 1px solid var(--auth-border, #e2e8f0) !important;
	border-radius: 10px !important;
	font-size: 14.5px !important;
	font-weight: 500 !important;
	line-height: 1.4 !important;
	letter-spacing: -0.005em !important;
	color: var(--auth-ink, #0f172a) !important;
	padding-block: 11px !important;
	padding-inline: 14px !important;
	inline-size: 100%;
	transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
.asi-auth--account .asi-auth__input-wrap > .asi-auth__input {
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	padding-inline-end: 4px !important;
}

.asi-auth--account .asi-auth__input:hover:not(:focus) {
	border-color: color-mix(in srgb, var(--auth-blue, #0155B7) 40%, var(--auth-border, #e2e8f0)) !important;
}
.asi-auth--account .asi-auth__input:focus,
.asi-auth--account .asi-auth__input:focus-visible {
	outline: none !important;
	border-color: var(--auth-blue, #0155B7) !important;
	background: white !important;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--auth-blue, #0155B7) 15%, transparent) !important;
}
.asi-auth--account .asi-auth__input-wrap:has(.asi-auth__input:focus-visible) {
	border-color: var(--auth-blue, #0155B7) !important;
	background: white !important;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--auth-blue, #0155B7) 15%, transparent) !important;
}

/* Helper text under fields */
.asi-auth--account .asi-auth__hint {
	display: block;
	margin-block-start: 6px;
	font-size: 12px;
	color: var(--auth-ink-60);
	line-height: 1.5;
	letter-spacing: 0;
}

/* Password toggle stays inline-end inside the boxed wrap */
.asi-auth--account .asi-auth__toggle {
	flex-shrink: 0;
	color: var(--auth-ink-40);
}

/* Strength meter — tighter spacing under the new password field */
.asi-auth--account .asi-auth__strength {
	margin-block-start: 8px;
}

/* Action row — pin to bottom of last card visually, not floating */
.asi-auth--account .asi-auth__actions--account {
	display: flex;
	gap: 12px;
	align-items: center;
	flex-wrap: wrap;
	margin-block-start: clamp(14px, 2vw, 18px);
	padding: 0;
}
.asi-auth--account .asi-auth__submit {
	flex: 0 0 auto;
}

/* Edit-account lives INSIDE the my-account two-column layout (sidebar nav +
   content area). Don't cap or auto-center the form — let it fill the right
   column. The earlier 620px cap + margin: auto from the base .asi-auth was
   producing huge empty space on both sides. */
.asi-auth--account {
	max-inline-size: none;
	margin-inline: 0;
	margin-block-start: 0;
	padding-inline: 0;
}
@media (min-width: 1024px) {
	.asi-auth--account {
		max-inline-size: 760px;
	}
}

/* ---- Polish v2 — alignment + spacing fixes ---- */

/* Fix input overflow: padding was adding to width because the browser default
   box-sizing wins over WC's reset for our scoped class. */
.asi-auth--account .asi-auth__input,
.asi-auth--account .asi-auth__input-wrap {
	box-sizing: border-box !important;
	max-inline-size: 100%;
}

/* Hide the SAVED stamp grid cell when not in success state — its empty
   container was reserving horizontal space and producing the mystery dash
   to the left of the avatar. Drop to a 2-column grid in idle state. */
.asi-auth--account .asi-auth__hero {
	grid-template-columns: auto 1fr;
	margin-block-end: clamp(12px, 1.8vw, 16px);
}
.asi-auth--account .asi-auth__hero:not([data-asi-saved="true"]) .asi-auth__hero-stamp {
	display: none;
}
.asi-auth--account .asi-auth__hero[data-asi-saved="true"] {
	grid-template-columns: auto 1fr auto;
}

/* Tighten the heading row above the form */
.asi-auth--account .asi-auth__head--account {
	margin-block: 0 clamp(10px, 1.5vw, 14px);
}
.asi-auth--account .asi-auth__head--account .asi-auth__heading {
	margin-block-end: 4px;
}
.asi-auth--account .asi-auth__head--account .asi-auth__lede {
	margin: 0;
}

/* Strength meter — quiet down the empty-state track so it doesn't read as a
   visual divider when the user hasn't typed anything yet */
.asi-auth--account .asi-auth__strength {
	margin-block-start: 10px;
}
.asi-auth--account .asi-auth__strength:not([data-strength]) .asi-auth__strength-bar {
	background: color-mix(in srgb, var(--auth-border, #e2e8f0) 50%, transparent);
}
.asi-auth--account .asi-auth__strength-label {
	font-size: 11.5px;
	color: var(--auth-ink-60);
}

/* Action buttons sit in a matching card so they don't float orphaned below
   the form sections */
.asi-auth--account .asi-auth__actions--account {
	background: white;
	border: 1px solid var(--auth-border-soft, color-mix(in srgb, var(--auth-blue, #0155B7) 8%, #e2e8f0));
	border-radius: 14px;
	padding: clamp(14px, 2vw, 18px) clamp(16px, 2.4vw, 22px);
	box-shadow:
		0 1px 0 rgba(255, 255, 255, 0.6) inset,
		0 1px 2px rgba(15, 23, 42, 0.04);
	display: flex;
	gap: 12px;
	align-items: center;
	flex-wrap: wrap;
	margin-block-start: 0;
}

/* =============================================================
 * Edit-account — polish + alignment pass
 * One decisive set of overrides that wins over parent theme + WC
 * defaults so the form renders consistently. Each section is a
 * card with uniform padding; inputs all share the same height,
 * border-radius, and focus state; vertical rhythm is fixed.
 *
 * Specificity is `.asi-auth--account .asi-auth__*` so it only
 * scopes to this page — login/register/lost-password keep the
 * baseline-ruled aesthetic.
 * ============================================================= */

/* ─── Section cards ─────────────────────────────────────── */
.asi-auth--account .asi-auth__group {
	border: 0;
	padding: clamp(20px, 2.5vw, 26px) clamp(20px, 2.5vw, 28px);
	margin: 0;
	background: var(--auth-surface);
	border: 1px solid var(--auth-border-soft);
	border-radius: 16px;
	display: grid;
	gap: clamp(14px, 2vw, 18px);
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
	min-inline-size: 0;
}
.asi-auth--account .asi-auth__group + .asi-auth__group {
	margin-block-start: clamp(14px, 2vw, 18px);
	padding-block-start: clamp(20px, 2.5vw, 26px);
	border-block-start: 1px solid var(--auth-border-soft);
}

/* Section title — clean blue label at the top of the card */
.asi-auth--account .asi-auth__group-title {
	display: block;
	float: none;
	inline-size: auto;
	margin: 0;
	padding: 0;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--auth-blue);
	line-height: 1;
}

/* Description sits right under the title with tight gap */
.asi-auth--account .asi-auth__group-desc {
	margin: -6px 0 0;
	font-size: 13px;
	line-height: 1.5;
	color: var(--auth-ink-60);
	max-inline-size: 52ch;
}

/* ─── Field row ────────────────────────────────────────── */
.asi-auth--account .asi-auth__field {
	display: grid;
	gap: 6px;
	min-inline-size: 0;
}

.asi-auth--account .asi-auth__label {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--auth-ink-40);
	margin: 0;
	line-height: 1.2;
}

/* Two-column row (First name + Last name) */
.asi-auth--account .asi-auth__row--cols {
	display: grid;
	grid-template-columns: 1fr;
	gap: clamp(14px, 2vw, 18px);
}
@media (min-width: 600px) {
	.asi-auth--account .asi-auth__row--cols {
		grid-template-columns: 1fr 1fr;
	}
}

/* ─── Inputs (boxed, consistent) ───────────────────────── */
.asi-auth--account .asi-auth__input {
	-webkit-appearance: none;
	appearance: none;
	border: 1px solid var(--auth-border);
	background: oklch(99% 0.002 250);
	border-radius: 10px;
	padding: 12px 14px;
	font-size: 15px;
	font-weight: 500;
	font-family: inherit;
	color: var(--auth-ink);
	inline-size: 100%;
	min-inline-size: 0;
	line-height: 1.4;
	letter-spacing: -0.005em;
	box-shadow: none;
	transition:
		border-color 200ms var(--auth-ease),
		box-shadow 200ms var(--auth-ease),
		background 200ms var(--auth-ease);
}
.asi-auth--account .asi-auth__input:hover:not(:focus) {
	border-color: color-mix(in srgb, var(--auth-blue) 25%, var(--auth-border));
}
.asi-auth--account .asi-auth__input:focus,
.asi-auth--account .asi-auth__input:focus-visible {
	outline: none;
	border-color: var(--auth-blue);
	background: white;
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--auth-blue) 14%, transparent);
}
.asi-auth--account .asi-auth__input::placeholder {
	color: var(--auth-ink-25);
	font-weight: 400;
}

/* ─── Input-wrap (password fields with eye toggle) ─────── */
.asi-auth--account .asi-auth__input-wrap {
	display: flex;
	align-items: stretch;
	gap: 0;
	border: 1px solid var(--auth-border);
	background: oklch(99% 0.002 250);
	border-radius: 10px;
	box-shadow: none;
	padding-inline-end: 4px;
	transition:
		border-color 200ms var(--auth-ease),
		box-shadow 200ms var(--auth-ease),
		background 200ms var(--auth-ease);
}
.asi-auth--account .asi-auth__input-wrap:hover {
	border-color: color-mix(in srgb, var(--auth-blue) 25%, var(--auth-border));
}
.asi-auth--account .asi-auth__input-wrap:has(.asi-auth__input:focus) {
	border-color: var(--auth-blue);
	background: white;
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--auth-blue) 14%, transparent);
}
/* The input inside the wrap drops its own border + bg so the wrap owns them */
.asi-auth--account .asi-auth__input-wrap > .asi-auth__input {
	border: 0;
	background: transparent;
	border-radius: 0;
	box-shadow: none;
	flex: 1;
	min-inline-size: 0;
}
.asi-auth--account .asi-auth__input-wrap > .asi-auth__input:focus,
.asi-auth--account .asi-auth__input-wrap > .asi-auth__input:focus-visible {
	box-shadow: none;
	background: transparent;
}

/* Eye toggle — properly centred inside the input-wrap */
.asi-auth--account .asi-auth__toggle {
	flex-shrink: 0;
	align-self: center;
	margin-inline-end: 6px;
	inline-size: 32px;
	block-size: 32px;
	border-radius: 8px;
	color: var(--auth-ink-40);
	background: transparent;
	border: 0;
	display: grid;
	place-items: center;
	cursor: pointer;
	transition: color 160ms var(--auth-ease), background 160ms var(--auth-ease);
}
.asi-auth--account .asi-auth__toggle:hover {
	color: var(--auth-blue);
	background: color-mix(in srgb, var(--auth-blue) 8%, transparent);
}

/* ─── Hint text under field ────────────────────────────── */
.asi-auth--account .asi-auth__hint {
	display: block;
	margin-block-start: 4px;
	font-size: 12px;
	line-height: 1.4;
	color: var(--auth-ink-40);
}

/* ─── Strength meter spacing inside the boxed field ────── */
.asi-auth--account .asi-auth__strength {
	margin-block-start: 8px;
}

/* Confirm-mismatch ring on the second password field */
.asi-auth--account .asi-auth__input[data-mismatch="true"] {
	border-color: #DC2626;
	background: color-mix(in srgb, #DC2626 5%, white);
}

/* ─── Heading + lede above the form ────────────────────── */
.asi-auth--account .asi-auth__head--account {
	margin-block-end: clamp(14px, 2.5vw, 20px);
}
.asi-auth--account .asi-auth__heading {
	margin: 0 0 6px;
}
.asi-auth--account .asi-auth__lede {
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
	color: var(--auth-ink-60);
	max-inline-size: 56ch;
}

/* ─── Form vertical rhythm ─────────────────────────────── */
.asi-auth--account .asi-auth__form {
	display: grid;
	gap: clamp(14px, 2vw, 18px);
}

/* ─── Actions row at the bottom ────────────────────────── */
.asi-auth--account .asi-auth__actions--account {
	margin-block-start: clamp(8px, 1.5vw, 14px);
	padding-block-start: clamp(14px, 2vw, 18px);
	border-block-start: 1px solid var(--auth-border-soft);
}

/* =============================================================
 * Edit-account meta strip — mirrors the view-order header
 * Pill chip + copy icon · meta facts · right-side label + big
 * value. Same vocabulary as asi-vo__head so the two pages feel
 * like part of the same family.
 * ============================================================= */

.asi-acct-meta {
	margin-block-end: clamp(18px, 2.5vw, 24px);
}

.asi-acct-meta__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px 24px;
	padding: clamp(14px, 2vw, 18px) clamp(18px, 2.5vw, 24px);
	background: var(--auth-surface);
	border: 1px solid var(--auth-border-soft);
	border-radius: 16px;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.asi-acct-meta__left {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 10px;
	min-inline-size: 0;
	flex: 1 1 auto;
}

/* Pill chip with copy icon */
.asi-acct-meta__copy {
	-webkit-appearance: none;
	appearance: none;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 5px 12px;
	background: oklch(96.5% 0.008 250);
	border: 1px solid var(--auth-border);
	border-radius: 100px;
	cursor: pointer;
	font: inherit;
	font-size: 13px;
	font-weight: 500;
	color: var(--auth-ink);
	min-inline-size: 0;
	max-inline-size: 100%;
	transition:
		background 200ms var(--auth-ease),
		border-color 200ms var(--auth-ease),
		color 200ms var(--auth-ease);
}
.asi-acct-meta__copy:hover {
	background: white;
	border-color: var(--auth-blue);
	color: var(--auth-blue);
}
.asi-acct-meta__copy:focus-visible {
	outline: 2px solid var(--auth-blue);
	outline-offset: 2px;
}

.asi-acct-meta__copy-text {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-inline-size: 32ch;
}

.asi-acct-meta__copy-icon { color: var(--auth-ink-40); flex-shrink: 0; }
.asi-acct-meta__copy-tick { display: none; color: var(--auth-green); flex-shrink: 0; }

.asi-acct-meta__copy[data-copied="true"] {
	background: color-mix(in srgb, var(--auth-green) 10%, transparent);
	border-color: color-mix(in srgb, var(--auth-green) 30%, transparent);
	color: var(--auth-green);
}
.asi-acct-meta__copy[data-copied="true"] .asi-acct-meta__copy-icon { display: none; }
.asi-acct-meta__copy[data-copied="true"] .asi-acct-meta__copy-tick { display: inline-block; }

.asi-acct-meta__sep {
	color: var(--auth-ink-25);
	font-size: 14px;
	user-select: none;
}

.asi-acct-meta__fact {
	font-size: 13px;
	color: var(--auth-ink-60);
}

/* Right side — small label + big value + sub */
.asi-acct-meta__right {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px 10px;
	justify-content: flex-end;
	text-align: end;
}

.asi-acct-meta__label {
	font-size: 0.75rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--auth-ink-40);
	font-weight: 600;
}

.asi-acct-meta__value {
	font-size: 1.375rem;
	font-weight: 700;
	letter-spacing: -0.01em;
	color: var(--auth-ink);
	line-height: 1.1;
	white-space: nowrap;
}

.asi-acct-meta__sub {
	font-size: 0.8125rem;
	color: var(--auth-ink-60);
}

@media (max-width: 599px) {
	.asi-acct-meta__row {
		flex-direction: column;
		align-items: stretch;
	}
	.asi-acct-meta__right {
		justify-content: flex-start;
		text-align: start;
	}
	.asi-acct-meta__copy-text { max-inline-size: 22ch; }
}

/* =============================================================
 * /polish — Set / Reset Password (asi-auth--reset)
 * Layered ON TOP of the recovery baseline. Adds:
 *   - Quieter strength meter (label only until typing begins)
 *   - Live password requirements list with check-on-pass icons
 *   - Confirm-field tick-on-match + mismatch state
 *   - Submit button: nowrap label so "Save and sign in" never breaks
 *   - Reset header rhythm (no h2 inside form — page H1 owns the title)
 * ============================================================= */

.asi-auth--reset .asi-auth__head--reset {
	margin-block-end: 4px;
}

.asi-auth--reset .asi-auth__head--reset .asi-auth__lede {
	font-size: 1rem;
	color: var(--auth-ink-60);
	max-inline-size: 44ch;
}

/* ─── Strength meter: hide the bar until they start typing ─── */

.asi-auth__strength {
	margin-block-start: 12px;
}

/* When the meter has no [data-strength] (initial state) the bar is
   collapsed — just the label sits beneath the input as a hint. As soon
   as JS sets data-strength="weak|fair|good|strong" the bar grows in. */
.asi-auth__strength:not([data-strength]) .asi-auth__strength-bar {
	block-size: 2px;
	background: var(--auth-border-soft);
	opacity: 0.5;
}

.asi-auth__strength[data-strength] .asi-auth__strength-bar {
	transition: block-size 220ms var(--auth-ease);
}

/* ─── Password requirements checklist ─────────────────────── */

.asi-auth__rules {
	list-style: none;
	margin: 10px 0 0;
	padding: 0;
	display: grid;
	gap: 6px;
}

.asi-auth__rule {
	display: grid;
	grid-template-columns: 18px 1fr;
	gap: 8px;
	align-items: center;
	font-size: 0.8125rem;
	line-height: 1.4;
	color: var(--auth-ink-40);
	transition: color 180ms var(--auth-ease);
}

.asi-auth__rule-icon {
	inline-size: 18px;
	block-size: 18px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	color: transparent;
	background: var(--auth-border-soft);
	padding: 2px;
	transition:
		background 220ms var(--auth-ease),
		color 220ms var(--auth-ease),
		transform 220ms var(--auth-ease);
}

.asi-auth__rule[data-pass="true"] {
	color: var(--auth-ink);
}

.asi-auth__rule[data-pass="true"] .asi-auth__rule-icon {
	background: var(--auth-green);
	color: #fff;
	transform: scale(1.05);
}

@media (prefers-reduced-motion: reduce) {
	.asi-auth__rule,
	.asi-auth__rule-icon {
		transition: none;
	}
}

/* ─── Confirm field: tick-on-match, mismatch state ────────── */

.asi-auth__confirm-mark {
	color: transparent;
	background: var(--auth-border-soft);
	border-radius: 50%;
	padding: 2px;
	flex-shrink: 0;
	transition:
		color 200ms var(--auth-ease),
		background 200ms var(--auth-ease),
		transform 200ms var(--auth-ease);
}

.asi-auth__input-wrap:has([data-asi-confirm][data-match="true"]) .asi-auth__confirm-mark {
	color: #fff;
	background: var(--auth-green);
	transform: scale(1.05);
}

.asi-auth__input-wrap:has([data-asi-confirm][data-mismatch="true"]) {
	border-block-end-color: #DC2626;
}

.asi-auth__input-wrap:has([data-asi-confirm][data-mismatch="true"]) .asi-auth__confirm-mark {
	display: none;
}

.asi-auth__confirm-msg {
	margin: 6px 0 0;
	font-size: 0.75rem;
	line-height: 1.4;
	color: var(--auth-ink-40);
	min-block-size: 1.05em;
}

.asi-auth__confirm-msg[data-state="mismatch"] {
	color: #B91C1C;
}

.asi-auth__confirm-msg[data-state="match"] {
	color: var(--auth-green);
}

/* ─── Suppress WC's bundled password strength meter ───────
   We dequeue `wc-password-strength-meter` in PHP (see
   inc/myaccount/assets-enqueue.php), but that script can be
   re-enqueued by other plugins (WooPayments, Subscriptions)
   that declare it as an inline dependency. If any of these
   inject the WC chrome, hide it — our own meter + rules list
   cover the same ground without sitting INSIDE the input row. */
.asi-auth .woocommerce-password-strength,
.asi-auth .woocommerce-password-hint,
.asi-auth #password_strength {
	display: none !important;
}

/* ─── Submit button — defensive nowrap ────────────────────── */

.asi-auth--reset .asi-auth__submit > span {
	white-space: nowrap;
}

.asi-auth--reset .asi-auth__submit {
	min-inline-size: 0;
}

/* ─── Actions row: button + recovery exit link inline ─────── */

.asi-auth--reset .asi-auth__actions {
	gap: 8px 18px;
	grid-auto-flow: row;
}

@media (min-width: 540px) {
	.asi-auth--reset .asi-auth__actions {
		grid-auto-flow: column;
		grid-template-columns: auto 1fr;
		align-items: center;
	}
	.asi-auth--reset .asi-auth__actions .asi-auth__return {
		margin: 0;
	}
}

/* Account edit: align paired fields + tighten spacing */
.asi-auth--account .asi-auth__form {
	gap: 12px;
}

.asi-auth--account .asi-auth__group {
	gap: 10px;
	padding: 18px 22px;
}

.asi-auth--account .asi-auth__group + .asi-auth__group {
	margin-block-start: 12px;
	padding-block-start: 18px;
}

.asi-auth--account .asi-auth__row--cols {
	gap: 12px;
	align-items: start;
}

.asi-auth--account .asi-auth__row--cols > .asi-auth__field,
.asi-auth--account .asi-auth__row--cols > .asi-auth__field + .asi-auth__field {
	margin-block-start: 0;
	margin-block-end: 0;
	align-self: start;
}

.asi-auth--account .asi-auth__field {
	gap: 5px;
	margin-block-end: 10px;
}

.asi-auth--account .asi-auth__group-desc {
	margin: -4px 0 0;
}

.asi-auth--account .asi-auth__input {
	padding-block: 10px;
}
