/* ==========================================================================
   Sign-in screen
   ==========================================================================

   The only publicly reachable page on this site, and therefore the portal's entire first
   impression. Separate from portal.css because wp-login.php does not load the theme's
   front-end styles and should not carry their weight.

   Register: restrained and institutional. The audience is senior lawyers, and consumer-app
   warmth here would invite them to take the whole thing less seriously.
   ========================================================================== */

:root {
	--dab-maroon: #8a100b;
	--dab-maroon-dark: #5e0b07;
	--dab-gold: #b29d6c;
	--dab-tan: #dccaa0;
	--dab-ink: #1a1a1a;
	--dab-ink-muted: #5c5c5c;
	--dab-ink-label: #4a4a4a;
	--dab-line: #dad6d1;
	--dab-control-line: #767676;
	--dab-page: #faf9f7;
	--dab-font-display: "ff-scala", Georgia, "Times New Roman", serif;
	--dab-font-body: "ff-scala-sans-pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body.login {
	background: var(--dab-page);
	color: var(--dab-ink);
	font-family: var(--dab-font-body);
	font-size: 17px;
}

/* A maroon rule across the top, echoing the portal header. */
body.login::before {
	background: var(--dab-maroon);
	content: "";
	display: block;
	height: 6px;
	left: 0;
	position: fixed;
	right: 0;
	top: 0;
	z-index: 10;
}

#login {
	padding: 6% 0 4%;
	width: 27rem;
	max-width: calc(100vw - 2.5rem);
}

/* ---- The BC Law lockup replaces the WordPress mark entirely ---- */

#login h1 a,
.login h1 a {
	background-image: url("../img/bc-law-lockup-416.png");
	background-position: center center;
	background-repeat: no-repeat;
	background-size: contain;
	/* 416x77 source at 52px tall — keep the box at the image's own ratio so `contain` never
	   letterboxes or clips. */
	height: 52px;
	margin: 0 auto 1.75rem;
	width: 281px;
}

/* ---- Intro ---- */

.dab-login__intro {
	margin-bottom: 1.5rem;
	text-align: center;
}

.dab-login__eyebrow {
	color: var(--dab-ink-label);
	font-size: 1rem;
	font-variant-caps: all-small-caps;
	font-weight: 700;
	letter-spacing: 0.1em;
	margin: 0 0 0.35rem;
}

.dab-login__title {
	color: var(--dab-ink);
	font-family: var(--dab-font-display);
	font-size: 2rem;
	font-weight: 700;
	line-height: 1.15;
	margin: 0 0 0.6rem;
}

.dab-login__lead {
	color: var(--dab-ink-muted);
	font-size: 0.9375rem;
	line-height: 1.6;
	margin: 0 auto;
	max-width: 30ch;
}

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

.login form {
	background: #fff;
	border: 1px solid var(--dab-line);
	border-radius: 8px;
	box-shadow: 0 2px 4px rgba(26, 22, 20, 0.05), 0 12px 32px rgba(26, 22, 20, 0.07);
	margin-top: 0;
	padding: 1.75rem 1.75rem 1.5rem;
}

.login form .input,
.login input[type="text"],
.login input[type="password"],
.login input[type="email"] {
	background: #fff;
	border: 1px solid var(--dab-control-line);
	border-radius: 4px;
	color: var(--dab-ink);
	font-family: var(--dab-font-body);
	/* Never below 16px: iOS zooms the viewport on focus for anything smaller, which on a phone
	   throws the whole page sideways at the exact moment someone is typing a password. */
	font-size: 17px;
	line-height: 1.4;
	margin: 0 0 1rem;
	padding: 0.75rem 0.85rem;
}

.login label {
	color: var(--dab-ink);
	font-size: 0.9375rem;
	font-weight: 600;
}

/* WordPress renders the checkbox as a SIBLING of its label, not a child:
   <p class="forgetmenot"><input id="rememberme"><label for="rememberme">…</label></p>
   Making the LABEL a flex container therefore stacked the two, because there was nothing inside
   it to lay out. The row is the flex container. */
.login form .forgetmenot {
	align-items: center;
	display: flex;
	gap: 0.6rem;
	margin: 0 0 0.5rem;
	min-height: 44px;
}

.login form .forgetmenot label {
	color: var(--dab-ink-muted);
	font-size: 0.9375rem;
	font-weight: 400;
	/* The label fills the row, so the whole line is the tap target rather than the box alone. */
	line-height: 1.3;
	margin: 0;
}

.login form .forgetmenot input[type="checkbox"] {
	flex: 0 0 auto;
	height: 24px;
	margin: 0;
	width: 24px;
}

/* The show/hide-password control core renders inside the field. */
.login .wp-hide-pw {
	align-items: center;
	display: flex;
	height: 44px;
	justify-content: center;
	width: 44px;
}

.login input[type="text"]:focus,
.login input[type="password"]:focus,
.login input[type="email"]:focus,
.login input[type="checkbox"]:focus {
	border-color: var(--dab-maroon);
	box-shadow: none;
	outline: 3px solid var(--dab-maroon);
	outline-offset: 1px;
}

.login input[type="checkbox"]:checked::before {
	content: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M14.83%204.89l1.34.94-5.81%208.38H9.02L5.78%209.67l1.34-1.25%202.57%202.4z%22%20fill%3D%22%238a100b%22/%3E%3C/svg%3E");
}

/* Primary action. Full width, generous target — this is the only button on the page. */
.login .button-primary,
.wp-core-ui .button-primary {
	background: var(--dab-maroon);
	border: 1px solid var(--dab-maroon);
	border-radius: 4px;
	box-shadow: none;
	color: #fff;
	float: none;
	font-family: var(--dab-font-body);
	font-size: 17px;
	font-weight: 700;
	height: auto;
	line-height: 1.2;
	margin-top: 0.35rem;
	/* 48px minimum. Measured at 40px before this — under the 44px floor, on the single control
	   that matters most on this page. */
	min-height: 48px;
	padding: 0.85rem 1.5rem;
	text-shadow: none;
	transition: background-color 0.16s ease;
	width: 100%;
}

.login .button-primary:hover,
.login .button-primary:focus,
.wp-core-ui .button-primary:hover,
.wp-core-ui .button-primary:focus {
	background: var(--dab-maroon-dark);
	border-color: var(--dab-maroon-dark);
	color: #fff;
}

.login .submit { text-align: center; }

/* ---- Links under the form ---- */

.login #nav,
.login #backtoblog {
	padding: 0;
	text-align: center;
}

.login #nav { margin: 1.1rem 0 0; }
.login #backtoblog { margin: 0.45rem 0 0; }

.login #nav a,
.login #backtoblog a {
	align-items: center;
	color: var(--dab-maroon);
	display: inline-flex;
	font-size: 0.9375rem;
	justify-content: center;
	/* Was an 18px-tall inline link. Members reach for this precisely when they are already
	   frustrated; it should not also be hard to hit. */
	min-height: 44px;
	padding: 0 0.75rem;
	text-decoration: none;
}

.login #nav a:hover,
.login #backtoblog a:hover {
	color: var(--dab-maroon-dark);
	text-decoration: underline;
}

/* Every other page redirects here, so "Go to <site>" is a loop dressed up as an exit. */
.login #backtoblog { display: none; }

/* ---- Messages and errors ---- */

.login .message,
.login #login_error,
.login .notice {
	background: #fff;
	border-radius: 4px;
	border-left: 4px solid var(--dab-maroon);
	box-shadow: 0 1px 2px rgba(26, 22, 20, 0.06);
	color: var(--dab-ink);
	font-size: 0.9375rem;
	line-height: 1.55;
	padding: 0.9rem 1rem;
}

/* ---- Help and legal ---- */

.dab-login__help {
	border-top: 1px solid var(--dab-line);
	margin: 1.75rem auto 0;
	max-width: 27rem;
	padding-top: 1.25rem;
	text-align: center;
	width: calc(100vw - 2.5rem);
}

.dab-login__help-title {
	color: var(--dab-ink);
	font-size: 0.9375rem;
	font-weight: 600;
	margin: 0 0 0.3rem;
}

.dab-login__help-body {
	color: var(--dab-ink-muted);
	font-size: 0.9375rem;
	line-height: 1.6;
	margin: 0;
}

.dab-login__help-body a {
	color: var(--dab-maroon);
	text-decoration: none;
}

.dab-login__help-body a:hover { text-decoration: underline; }

.dab-login__legal {
	color: var(--dab-ink-muted);
	font-size: 0.8125rem;
	line-height: 1.55;
	margin: 1.25rem auto 2rem;
	max-width: 27rem;
	text-align: center;
	width: calc(100vw - 2.5rem);
}

/* WordPress's language switcher is noise on a single-language board portal. */
.login .language-switcher { display: none; }

@media (max-width: 480px) {
	#login { padding-top: 10%; }
	.dab-login__title { font-size: 1.75rem; }
}


/* --------------------------------------------------------------------------
   Touch targets — specificity note
   --------------------------------------------------------------------------
   WordPress enqueues buttons.css AFTER this stylesheet, so `.login .button-primary` and core's
   `.wp-core-ui .button-large` tie on specificity and core wins on order. Measured result: the
   Sign in button computed to height 40px, line-height 38px, padding 0 — none of the sizing above
   applied. These rules use the id, which core does not, so they win without !important.
   -------------------------------------------------------------------------- */

.login #wp-submit,
.login #wp-submit.button-large {
	font-size: 17px;
	height: auto;
	line-height: 1.2;
	min-height: 48px;
	padding: 0.85rem 1.5rem;
}

.login #loginform .wp-hide-pw,
.login #loginform .wp-hide-pw.button {
	align-items: center;
	display: flex;
	height: 44px;
	justify-content: center;
	min-height: 44px;
	width: 44px;
}


/* --------------------------------------------------------------------------
   Sign-in screen — mobile fixes (UX review, 2026-08-21)
   -------------------------------------------------------------------------- */

/* The help contact is the escape hatch for someone locked out, and it was the smallest thing on
   the page: an 18px-tall mailto and a 73px-wide tel. The lost-password link above it already got
   a 44px target for exactly this reason; these are what a member reaches for when that fails. */
.dab-login__help-body a {
	align-items: center;
	display: inline-flex;
	justify-content: center;
	min-height: 44px;
	padding: 0 0.5rem;
}

@media (max-width: 480px) {
	/* Stacked, so two 44px targets are never adjacent on a small screen. */
	.dab-login__help-body a {
		display: flex;
		width: 100%;
	}

	.dab-login__help-body span[aria-hidden="true"] { display: none; }
}

/* Core's forms.css paints the checkbox WordPress admin blue (#3858E9) and loads after this
   stylesheet, so only a higher-specificity selector wins — the same collision documented for the
   submit button above. The maroon tick was being drawn on blue at roughly 1.6:1. */
.login form .forgetmenot input[type="checkbox"],
.login #loginform input[type="checkbox"] {
	background: #fff;
	border: 1px solid var(--dab-control-line);
	border-radius: 3px;
}

.login form .forgetmenot input[type="checkbox"]:checked,
.login #loginform input[type="checkbox"]:checked {
	background: #fff;
	border-color: var(--dab-maroon);
}
