/**
 * r25m (2026-08-27) — logged-out My Account: "set up your password" +
 * "log in" cards, per the owner-approved mock.
 *
 * Loaded ONLY on logged-out account screens, and (for now) only behind the
 * td_login_preview gate — see inc/td-login.php. Everything is scoped to
 * body.td-loginx, which that gate adds, so nothing here can reach the
 * logged-in dashboard, the checkout login toggle or wp-login.php.
 *
 * Why the !important storm: myaccount-shopify.css deliberately hammers
 * `.woocommerce-account form .input-text` and `.woocommerce-account
 * .woocommerce .button` with !important to beat the parent theme's glossy
 * gold gradient button. Those rules win on specificity here too, so the
 * dark-canvas versions below have to answer in kind. Kept narrow: only the
 * properties that actually differ.
 *
 * Palette matches cart-checkout-shopify.css (the site's other dark surface)
 * so the login screen and checkout read as the same product.
 */

body.td-loginx {
	--tdl-bg: #0c0c0c;
	--tdl-surface: #161616;
	--tdl-surface-2: #0c0c0c;
	--tdl-border: rgba(255, 255, 255, .08);
	--tdl-border-input: rgba(255, 255, 255, .25);
	--tdl-text: #fff;
	--tdl-text-dim: rgba(255, 255, 255, .75);
	--tdl-text-faint: rgba(255, 255, 255, .45);
	--tdl-label: rgba(255, 255, 255, .6);
	--tdl-yellow: #fee100;
	--tdl-ink: #0c0c0c;
	--tdl-error: #ff5b4d;
	--tdl-ok: #7ddc7d;
	--tdl-radius: 14px;
}

/* ============ dark canvas ============
 * myaccount-shopify.css forces the whole account area white
 * (`body.woocommerce-account{background:#fff!important}`). That rule is
 * (0,1,1); the doubled class below is (0,2,1) so it wins outright rather
 * than relying on load order. */
body.td-loginx.woocommerce-account,
body.td-loginx.woocommerce-account .boxed-container {
	background: var(--tdl-bg) !important;
	color: var(--tdl-text);
}
body.td-loginx .breadcrumbs { background: transparent !important; }
body.td-loginx .breadcrumbs,
body.td-loginx .breadcrumbs a,
body.td-loginx .breadcrumbs span {
	color: rgba(255, 255, 255, .45) !important;
}
body.td-loginx .breadcrumbs a:hover { color: var(--tdl-yellow) !important; }

/* ============ shell ============ */
/* r25o: font stack mirrors .woocommerce-cart/.woocommerce-checkout in
 * cart-checkout-shopify.css exactly. Dropped the leading `system-ui` this
 * had before: the site's established stack starts at -apple-system, and
 * system-ui resolves per-platform (Segoe UI Variable on Win11 vs Segoe UI
 * on Win10), so keeping it meant the login screen could pick a different
 * face than checkout on the very machines it matters on. */
.td-loginx-wrap {
	max-width: 960px;
	margin: 0 auto;
	padding: 8px 0 56px;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	color: var(--tdl-text);
}
/* No font-weight here on purpose (r25o): the theme renders this H1 in Anton,
 * which ships a single 400 face. Declaring 800 was dead code — the theme's
 * own h1 rule wins — but had it ever won, it would have faux-bolded Anton
 * and produced exactly the jagged edges r25o fixes elsewhere. Weight is
 * left to the theme. */
body.td-loginx .td-account-title.td-loginx-title {
	color: var(--tdl-text);
	font-size: 30px;
	letter-spacing: .3px;
	margin: 0 0 26px;
}
.td-loginx-cols {
	display: grid;
	gap: 24px;
	align-items: start;
}
@media (min-width: 992px) {
	/* primary card is first in the DOM, so it lands left with no ordering
	 * tricks; mobile stacking below 992px is then automatic and keeps the
	 * same primary-first order. */
	.td-loginx-cols { grid-template-columns: 1fr 1fr; }
	.td-loginx-cols--single { grid-template-columns: minmax(0, 480px); justify-content: center; }

	/* r25p: equal-height cards on desktop. The two cards carry different
	 * amounts of copy, so `align-items: start` left the login card visibly
	 * short next to the primary one. Stretching is scoped to --pair and to
	 * this breakpoint only: below 992px the cards stack, where stretching
	 * would just pad one of them with dead space.
	 *
	 * The cards stay display:block, so their content keeps flowing from the
	 * top — only the box grows. border-box is stated explicitly because the
	 * primary card has a 2px border against the login card's 1px, and with
	 * content-box `height: 100%` would push the primary 2px taller. */
	.td-loginx-cols--pair { align-items: stretch; }
	.td-loginx-cols--pair > .td-loginx-card {
		height: 100%;
		box-sizing: border-box;
	}
}

/* ============ cards ============ */
.td-loginx-card {
	position: relative;
	background: var(--tdl-surface);
	border: 1px solid var(--tdl-border);
	border-radius: var(--tdl-radius);
	padding: 28px;
}
.td-loginx-card--primary {
	border: 2px solid var(--tdl-yellow);
	padding: 28px 26px;
}
.td-loginx-badge {
	position: absolute;
	top: -13px;
	left: 24px;
	background: var(--tdl-yellow);
	color: var(--tdl-ink);
	/* 700, not 800 — see the r25o note on .td-loginx-btn. At 12px the
	 * synthesized weight was the worst offender: the counters of O/D/R
	 * closed up almost completely. */
	font-family: inherit;
	font-weight: 700;
	font-size: 12px;
	line-height: 1;
	padding: 6px 12px;
	border-radius: 999px;
	letter-spacing: .4px;
	text-transform: uppercase;
	white-space: nowrap;
	max-width: calc(100% - 48px);
	overflow: hidden;
	text-overflow: ellipsis;
}
body.td-loginx .td-loginx-h2 {
	font-family: inherit;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.25;
	color: var(--tdl-text);
	margin: 6px 0 10px;
}
.td-loginx-lead {
	color: var(--tdl-text-dim);
	font-size: 14.5px;
	line-height: 1.55;
	margin: 0 0 18px;
}
.td-loginx-note {
	font-size: 12.5px;
	color: var(--tdl-text-faint);
	line-height: 1.5;
	margin: 12px 0 0;
}
.td-loginx-note--center { text-align: center; margin-top: 14px; }
.td-loginx-tinylink {
	color: rgba(255, 255, 255, .55);
	font-size: 13px;
	text-decoration: underline;
	text-underline-offset: 2px;
}
.td-loginx-tinylink:hover { color: var(--tdl-yellow); }

/* ============ numbered steps ============ */
.td-loginx-steps {
	margin: 0 0 6px;
	padding-left: 0;
	list-style: none;
	font-size: 13.5px;
	color: rgba(255, 255, 255, .7);
}
.td-loginx-steps li {
	margin-bottom: 7px;
	padding-left: 28px;
	position: relative;
	line-height: 1.45;
}
.td-loginx-steps li::before {
	content: attr(data-n);
	position: absolute;
	left: 0;
	top: 0;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--tdl-yellow);
	color: var(--tdl-ink);
	/* 700: same faux-bold reason as the buttons, and worse at 11px */
	font-weight: 700;
	font-size: 11px;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* ============ fields ============ */
.td-loginx-form { margin: 0; }
body.td-loginx .td-loginx-row { margin: 0 0 4px; }
body.td-loginx .td-loginx-label {
	display: block;
	font-size: 13px;
	font-weight: 400;
	color: var(--tdl-label);
	margin: 14px 0 6px;
}
body.td-loginx .td-loginx-input,
body.td-loginx .td-loginx-form .input-text {
	width: 100%;
	background: var(--tdl-surface-2) !important;
	border: 1px solid var(--tdl-border-input) !important;
	border-radius: 10px !important;
	padding: 12px 14px !important;
	color: var(--tdl-text) !important;
	font-size: 15px !important;
	box-shadow: none !important;
	box-sizing: border-box;
}
body.td-loginx .td-loginx-input::placeholder { color: rgba(255, 255, 255, .32); opacity: 1; }
body.td-loginx .td-loginx-input:focus,
body.td-loginx .td-loginx-form .input-text:focus {
	border-color: var(--tdl-yellow) !important;
	outline: none;
}
/* WebKit autofill repaints the field near-white; keep it on-brand */
body.td-loginx .td-loginx-input:-webkit-autofill,
body.td-loginx .td-loginx-input:-webkit-autofill:hover,
body.td-loginx .td-loginx-input:-webkit-autofill:focus {
	-webkit-text-fill-color: var(--tdl-text) !important;
	-webkit-box-shadow: 0 0 0 1000px var(--tdl-surface-2) inset !important;
	caret-color: var(--tdl-text);
}

/* WooCommerce's JS wraps the password field in .password-input and injects
 * a show/hide button; myaccount-shopify.css styles it for the white page. */
body.td-loginx .td-loginx-form .password-input { position: relative; display: block; }
body.td-loginx .td-loginx-form .password-input .input-text { padding-right: 42px !important; }
/* r25q: the eye/eye-off icon is a currentColor mask (see the note in
 * myaccount-shopify.css), so on the dark cards it only needs a colour —
 * no opacity dimming, which was what made it muddy before. */
body.td-loginx .td-loginx-form .show-password-input {
	color: rgba(255, 255, 255, .55);
	opacity: 1;
}
body.td-loginx .td-loginx-form .show-password-input:hover { color: #fff; }
body.td-loginx .td-loginx-form .show-password-input:focus-visible {
	outline: 2px solid var(--tdl-yellow);
	outline-offset: 2px;
	border-radius: 6px;
}

/* remember me */
body.td-loginx .td-loginx-remember { margin: 14px 0 0; }
body.td-loginx .td-loginx-check {
	display: inline-flex !important;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-size: 13px;
	font-weight: 400;
	color: var(--tdl-label);
	cursor: pointer;
}
/* Same custom checkbox as cart/checkout's .td-checkbox: appearance:none so
 * this doesn't depend on the browser's own dark form-control support, and
 * a border-segment tick rather than an SVG mask (mask-image renders blank
 * in headless QA — see the note on .td-checkbox in
 * cart-checkout-shopify.css). Re-stated here rather than shared because
 * that file is only enqueued on cart/checkout. */
body.td-loginx .td-loginx-check input[type="checkbox"] {
	appearance: none !important;
	-webkit-appearance: none !important;
	width: 18px !important;
	height: 18px !important;
	min-width: 18px !important;
	margin: 0 !important;
	border: 1.5px solid var(--tdl-border-input) !important;
	border-radius: 5px !important;
	background: var(--tdl-surface-2) !important;
	display: inline-block !important;
	position: relative !important;
	cursor: pointer;
	flex: 0 0 auto;
	vertical-align: middle;
	transition: background .12s ease, border-color .12s ease;
}
body.td-loginx .td-loginx-check input[type="checkbox"]:hover { border-color: var(--tdl-text-dim) !important; }
body.td-loginx .td-loginx-check input[type="checkbox"]:checked {
	background: var(--tdl-yellow) !important;
	border-color: var(--tdl-yellow) !important;
}
body.td-loginx .td-loginx-check input[type="checkbox"]:checked::before {
	content: '';
	position: absolute;
	left: 5px;
	top: 1px;
	width: 6px;
	height: 10px;
	border: solid var(--tdl-ink);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}
body.td-loginx .td-loginx-check input[type="checkbox"]:focus-visible {
	outline: 2px solid var(--tdl-yellow);
	outline-offset: 2px;
}

/* ============ buttons ============
 * Beats both the parent theme's gold gradient `.woocommerce .button` and
 * myaccount-shopify.css's flat-black override.
 *
 * r25o — why 700 and not 800:
 * The only webfonts this site loads are Anton 400 and Lato 400/700; the
 * card UI text uses the system stack, which on Windows resolves to Segoe
 * UI (Regular 400 / Semibold 600 / Bold 700). There is no 800 face, so
 * `font-weight: 800` made the engine SYNTHESIZE one by dilating the 700
 * glyphs. Measured: the same string renders 195.25px at 700 but 204.25px
 * at both 800 and 900 — identical widths at two different weights is the
 * signature of faux-bold, and the smeared, uneven stems are the
 * "pixelated" edges reported. 700 is a real installed face, so it is
 * hinted and rasterized properly.
 *
 * font-family/weight/letter-spacing/smoothing below now match the site's
 * reference primary buttons (.checkout-button "Proceed to checkout" and
 * #place_order "Place order": -apple-system stack, 700, .2px, antialiased)
 * exactly; only font-size differs, which the approved mock sets. */
body.td-loginx .woocommerce .td-loginx-btn,
body.td-loginx .td-loginx-btn {
	display: block;
	width: 100%;
	text-align: center;
	margin: 18px 0 0;
	padding: 14px 18px !important;
	border: 0 !important;
	border-radius: 999px !important;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
	font-weight: 700 !important;
	letter-spacing: .2px !important;
	-webkit-font-smoothing: antialiased;
	font-size: 15.5px !important;
	line-height: 1.2;
	cursor: pointer;
	background-image: none !important;
	box-shadow: none !important;
	text-shadow: none !important;
	transition: transform .12s ease, filter .12s ease;
}
body.td-loginx .woocommerce .td-loginx-btn--yellow,
body.td-loginx .td-loginx-btn--yellow {
	background: var(--tdl-yellow) !important;
	color: var(--tdl-ink) !important;
}
body.td-loginx .woocommerce .td-loginx-btn--white,
body.td-loginx .td-loginx-btn--white {
	background: #fff !important;
	color: var(--tdl-ink) !important;
}
body.td-loginx .td-loginx-btn:hover { filter: brightness(.92); }
body.td-loginx .td-loginx-btn:active { transform: translateY(1px); }
body.td-loginx .td-loginx-btn:focus-visible {
	outline: 2px solid var(--tdl-yellow);
	outline-offset: 3px;
}
body.td-loginx .td-loginx-row--submit { margin: 0; }

/* ============ notices on the dark canvas ============ */
body.td-loginx .woocommerce-error,
body.td-loginx .woocommerce-message,
body.td-loginx .woocommerce-info {
	background: rgba(255, 255, 255, .05) !important;
	border: 1px solid var(--tdl-border-input) !important;
	border-left: 3px solid var(--tdl-yellow) !important;
	border-radius: 10px !important;
	color: var(--tdl-text) !important;
	font-size: 13.5px;
	line-height: 1.5;
	list-style: none;
	margin: 0 0 16px !important;
	padding: 12px 14px !important;
}
body.td-loginx .woocommerce-error {
	border-left-color: var(--tdl-error) !important;
	color: #ffd9d4 !important;
}
body.td-loginx .woocommerce-error li,
body.td-loginx .woocommerce-message li,
body.td-loginx .woocommerce-info li { margin: 0; padding: 0; list-style: none; }
body.td-loginx .woocommerce-error::before,
body.td-loginx .woocommerce-message::before,
body.td-loginx .woocommerce-info::before { display: none !important; }
body.td-loginx .woocommerce-error a,
body.td-loginx .woocommerce-message a,
body.td-loginx .woocommerce-info a { color: var(--tdl-yellow) !important; }
body.td-loginx .woocommerce-notices-wrapper:empty { display: none; }

/* ============ confirmation ("check your email") state ============ */
.td-loginx-card--sent { text-align: center; }
.td-loginx-card--sent .td-loginx-badge { left: 50%; transform: translateX(-50%); }
.td-loginx-tick {
	width: 46px;
	height: 46px;
	margin: 12px auto 14px;
	border-radius: 50%;
	background: var(--tdl-yellow);
	color: var(--tdl-ink);
	font-size: 24px;
	font-weight: 700;
	line-height: 46px;
}
.td-loginx-card--sent .td-loginx-lead { margin-bottom: 0; }

/* ============ r25n (2026-08-27): full-width fields in BOTH cards ============
 * Bug: on desktop the "Log in" card's inputs and button rendered at ~40% of
 * the card, centered, while the yellow card's rendered full width.
 *
 * Cause: the parent theme ships
 *   @media (min-width: 992px) .woocommerce-account .woocommerce-form-login
 *     { width: 40%; margin: 0 auto; }
 * (plus `margin: 0 30% 2.25rem` on .woocommerce-form-login at the same
 * breakpoint). That is sized for the theme's own full-page-width login
 * screen, where 40% of the content column is a sensible form width. Inside
 * a 410px card it collapses the form to 164px. The yellow card's form
 * escaped only because it carries .woocommerce-ResetPassword, which is not
 * in the selector group of the CSS actually served here — the source theme
 * DOES list it, so the rule below covers both forms rather than only the
 * one currently breaking, otherwise the lost-password and reset-password
 * cards would regress the moment that build changes.
 *
 * Specificity (0,3,2) + !important, because the parent rule is (0,2,0)
 * inside a media query and load order between the aggregated theme CSS and
 * this file is not guaranteed (Autoptimize concatenates). */
body.td-loginx .td-loginx-card form.td-loginx-form {
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	float: none !important;
	font-size: inherit !important;
}

/* Every field and button spans the card interior, matching the mock. */
body.td-loginx .td-loginx-card .td-loginx-row,
body.td-loginx .td-loginx-card .td-loginx-input,
body.td-loginx .td-loginx-card .td-loginx-btn {
	width: 100% !important;
	max-width: none !important;
	float: none !important;
	box-sizing: border-box;
}
body.td-loginx .td-loginx-card .td-loginx-input,
body.td-loginx .td-loginx-card .td-loginx-btn {
	margin-left: 0 !important;
	margin-right: 0 !important;
}
/* the JS-injected .password-input wrapper sits between form and field */
body.td-loginx .td-loginx-card .td-loginx-form .password-input {
	width: 100% !important;
	max-width: none !important;
}

/* ============ r25n: mobile card order ============
 * Owner's call: below 992px the "Log in" card comes first and the yellow
 * "moved from our old store" card second; desktop keeps primary-left.
 *
 * Done with `order` rather than by reordering the markup so that DOM order
 * stays primary-first, which is what desktop shows left-to-right and what
 * keyboard/screen-reader users follow there. The trade-off is that on
 * mobile the visual order and the DOM order differ (WCAG 2.4.3 focus
 * order); putting the mismatch on mobile rather than desktop keeps tab
 * order honest on the viewport where tabbing actually happens. Only the
 * two-card login screen gets this - the single-card lost-password,
 * confirmation and reset screens use .td-loginx-cols without --pair. */
@media (max-width: 991.98px) {
	.td-loginx-cols--pair .td-loginx-card--login { order: 1; }
	.td-loginx-cols--pair .td-loginx-card--primary { order: 2; }
}

/* ============ mobile ============ */
@media (max-width: 480px) {
	.td-loginx-wrap { padding: 4px 0 40px; }
	body.td-loginx .td-account-title.td-loginx-title { font-size: 25px; margin-bottom: 22px; }
	.td-loginx-card { padding: 24px 18px; }
	.td-loginx-card--primary { padding: 24px 18px; }
	.td-loginx-badge { left: 16px; font-size: 11px; max-width: calc(100% - 32px); }
	.td-loginx-cols { gap: 30px; }
}
