/**
 * Auth screen.
 *
 * This stylesheet is the only one loaded on this page — the shop's stack is
 * dequeued — so everything the screen needs is declared here, including the
 * reset. Nothing else can override it and nothing here leaks anywhere else.
 */

:root {
	--auth-ink: #10161c;
	--auth-ink-soft: #56646f;
	--auth-line: #dde3e8;
	--auth-accent: #0e3a4d;
	--auth-accent-hover: #145a78;
	--auth-focus: #2e8fb5;
	--auth-panel: #08222e;
	--auth-panel-ink: #ffffff;
	--auth-panel-soft: #9dc4d5;
	--auth-error: #a3231f;
	--auth-radius: 6px;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html,
body.ruo-auth-body {
	margin: 0;
	padding: 0;
	min-height: 100%;
	background: #ffffff;
	color: var(--auth-ink);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 16px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

/* The admin bar would otherwise sit on top of a full-height layout. */
body.ruo-auth-body.admin-bar .ruo-auth {
	min-height: calc(100vh - 32px);
}

.ruo-auth {
	display: grid;
	grid-template-columns: 1fr 1fr;
	min-height: 100vh;
}

/* ---------------------------------------------------------------- brand -- */

.ruo-auth__brand {
	position: relative;
	display: flex;
	align-items: center;
	background-color: var(--auth-panel);
	background-size: cover;
	background-position: center;
	color: var(--auth-panel-ink);
	padding: 4rem 3.5rem;
	overflow: hidden;
}

.ruo-auth__brand-inner {
	position: relative;
	z-index: 1;
	max-width: 30rem;
	margin: 0 auto;
	width: 100%;
}

.ruo-auth__logo {
	display: inline-flex;
	align-items: center;
	gap: 0.85rem;
	text-decoration: none;
	color: inherit;
	margin-bottom: 3rem;
}

.ruo-auth__logo img {
	display: block;
	width: 52px;
	height: 52px;
}

.ruo-auth__wordmark {
	font-size: 1.375rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #fff;
}

.ruo-auth__wordmark em {
	font-style: normal;
	font-weight: 300;
	color: var(--auth-panel-soft);
	margin-left: 0.35em;
}

.ruo-auth__headline {
	font-size: clamp(2rem, 3.2vw, 2.9rem);
	line-height: 1.1;
	font-weight: 700;
	letter-spacing: -0.02em;
	margin: 0 0 1.4rem;
	color: #fff;
}

.ruo-auth__lede {
	font-size: 1rem;
	line-height: 1.7;
	color: #cfe2ea;
	margin: 0 0 1.1rem;
}

.ruo-auth__lede--muted {
	color: var(--auth-panel-soft);
	font-size: 0.9375rem;
}

.ruo-auth__marks {
	list-style: none;
	margin: 2.5rem 0 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem 1.6rem;
}

.ruo-auth__marks li {
	position: relative;
	padding-left: 1.3rem;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var(--auth-panel-soft);
}

.ruo-auth__marks li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.42em;
	width: 0.55rem;
	height: 0.3rem;
	border-left: 2px solid #4fb3d4;
	border-bottom: 2px solid #4fb3d4;
	transform: rotate(-45deg);
}

/* ---------------------------------------------------------------- panel -- */

.ruo-auth__panel {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 3.5rem 2.5rem;
	background: #fff;
}

.ruo-auth__card {
	width: 100%;
	max-width: 30rem;
}

.ruo-auth__eyebrow {
	margin: 0 0 0.5rem;
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--auth-focus);
}

.ruo-auth__title {
	margin: 0 0 0.6rem;
	font-size: 1.875rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.2;
	color: var(--auth-ink);
}

.ruo-auth__sub {
	margin: 0 0 1.5rem;
	color: var(--auth-ink-soft);
	font-size: 0.9375rem;
}

.ruo-auth__progress {
	height: 3px;
	background: var(--auth-line);
	border-radius: 3px;
	overflow: hidden;
	margin: 0 0 1.75rem;
}

.ruo-auth__progress span {
	display: block;
	height: 100%;
	background: var(--auth-focus);
}

/* ----------------------------------------------------------------- form -- */

.ruo-form {
	margin: 0;
}

.ruo-register-fields {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 1rem;
}

.ruo-field {
	margin: 0 0 1.15rem;
	display: flex;
	flex-direction: column;
}

.ruo-field--full,
.ruo-attestations,
.ruo-register-notice {
	grid-column: 1 / -1;
}

.ruo-field label {
	display: block;
	margin: 0 0 0.35rem;
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	color: var(--auth-ink);
}

.ruo-field .required {
	color: var(--auth-error);
	text-decoration: none;
}

.ruo-field input[type="text"],
.ruo-field input[type="email"],
.ruo-field input[type="tel"],
.ruo-field input[type="password"],
.ruo-field select {
	width: 100%;
	padding: 0.72rem 0.85rem;
	font: inherit;
	font-size: 0.9375rem;
	color: var(--auth-ink);
	background: #fff;
	border: 1px solid var(--auth-line);
	border-radius: var(--auth-radius);
	transition: border-color .14s ease, box-shadow .14s ease;
	appearance: none;
	-webkit-appearance: none;
}

.ruo-field select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%2356646f' stroke-width='1.8' d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.85rem center;
	padding-right: 2.4rem;
	cursor: pointer;
}

.ruo-field input:focus,
.ruo-field select:focus {
	outline: none;
	border-color: var(--auth-focus);
	box-shadow: 0 0 0 3px rgba(46, 143, 181, 0.16);
}

.ruo-field input::placeholder {
	color: #9aa6b0;
}

.ruo-field-help {
	margin-top: 0.35rem;
	font-size: 0.75rem;
	color: var(--auth-ink-soft);
}

/* The "please specify" companion only exists once Other is chosen. It ships
   visible so the form still works without JavaScript; the script hides it. */
.ruo-other {
	margin-top: 0.5rem;
}

.ruo-other[hidden] {
	display: none;
}

/* --------------------------------------------------------- attestations -- */

.ruo-attestations {
	border: 1px solid var(--auth-line);
	border-radius: var(--auth-radius);
	background: #f7f9fa;
	padding: 1.1rem 1.15rem 0.4rem;
	margin: 0.5rem 0 1.35rem;
}

.ruo-attestations legend {
	padding: 0 0.45rem;
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--auth-ink-soft);
}

.ruo-attestation {
	margin: 0 0 0.85rem;
}

.ruo-attestation label {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.65rem;
	align-items: start;
	cursor: pointer;
	font-size: 0.8125rem;
	line-height: 1.5;
	color: #33404a;
}

.ruo-attestation input[type="checkbox"] {
	width: 1rem;
	height: 1rem;
	margin: 0.15rem 0 0;
	accent-color: var(--auth-accent);
	flex: none;
}

.ruo-register-notice {
	font-size: 0.75rem;
	color: var(--auth-ink-soft);
	margin: 0 0 1.35rem;
}

/* --------------------------------------------------------------- button -- */

.ruo-btn {
	display: block;
	width: 100%;
	padding: 0.85rem 1.25rem;
	font: inherit;
	font-size: 0.9375rem;
	font-weight: 650;
	letter-spacing: 0.01em;
	color: #fff;
	background: var(--auth-accent);
	border: 0;
	border-radius: var(--auth-radius);
	cursor: pointer;
	transition: background .14s ease, transform .06s ease;
}

.ruo-btn:hover {
	background: var(--auth-accent-hover);
}

.ruo-btn:active {
	transform: translateY(1px);
}

.ruo-btn:focus-visible {
	outline: 3px solid rgba(46, 143, 181, 0.45);
	outline-offset: 2px;
}

/* ---------------------------------------------------------------- links -- */

.ruo-auth__alt {
	margin: 0.9rem 0 0;
	text-align: center;
	font-size: 0.8125rem;
}

.ruo-auth__switch {
	margin: 1.4rem 0 0;
	text-align: center;
	font-size: 0.875rem;
	color: var(--auth-ink-soft);
}

.ruo-auth__alt a,
.ruo-auth__switch a {
	color: var(--auth-accent);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.ruo-auth__alt a:hover,
.ruo-auth__switch a:hover {
	color: var(--auth-accent-hover);
}

.ruo-auth__marks--panel {
	margin-top: 2rem;
	padding-top: 1.4rem;
	border-top: 1px solid var(--auth-line);
	gap: 0.5rem 1.3rem;
}

.ruo-auth__marks--panel li {
	color: var(--auth-ink-soft);
}

.ruo-auth__marks--panel li::before {
	border-color: var(--auth-focus);
}

.ruo-auth__legal {
	margin: 1rem 0 0;
	font-size: 0.6875rem;
	line-height: 1.6;
	color: #7d8892;
}

/* -------------------------------------------------------------- notices -- */

.woocommerce-error,
.woocommerce-message,
.woocommerce-info,
.woocommerce-notice {
	list-style: none;
	margin: 0 0 1.25rem;
	padding: 0.85rem 1rem;
	border-radius: var(--auth-radius);
	font-size: 0.8125rem;
	line-height: 1.5;
	border-left: 3px solid var(--auth-focus);
	background: #eef5f8;
	color: #24404e;
}

.woocommerce-error {
	border-left-color: var(--auth-error);
	background: #fdf1f0;
	color: #6d1e1b;
}

.woocommerce-error li,
.woocommerce-message li,
.woocommerce-info li {
	margin: 0 0 0.3rem;
}

.woocommerce-error li:last-child,
.woocommerce-message li:last-child,
.woocommerce-info li:last-child {
	margin-bottom: 0;
}

.woocommerce-error a,
.woocommerce-info a,
.woocommerce-message a {
	color: inherit;
	font-weight: 600;
}

/* ------------------------------------------------------------ responsive -- */

@media (max-width: 900px) {
	.ruo-auth {
		grid-template-columns: 1fr;
		min-height: 0;
	}

	/* On a phone the brand panel is a banner, not half the screen — the form
	   should be reachable without scrolling past a hero. */
	.ruo-auth__brand {
		padding: 2.5rem 1.5rem;
	}

	.ruo-auth__logo {
		margin-bottom: 1.75rem;
	}

	.ruo-auth__headline {
		font-size: 1.75rem;
	}

	.ruo-auth__lede--muted,
	.ruo-auth__marks {
		display: none;
	}

	.ruo-auth__panel {
		padding: 2.25rem 1.5rem 3rem;
	}

	.ruo-register-fields {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 400px) {
	.ruo-auth__marks--panel {
		flex-direction: column;
		gap: 0.4rem;
	}
}
