/*
 * TGD Client Portal: wp-login.php (0.1.23).
 *
 * The approved mockup ("thisgals.com Login Redesign", 2026-11-06): the band
 * page, the intro on the left, the white sign-in card on the right, the
 * footer strip under both. On top of core's login stylesheet, after
 * assets/portal.css, whose token rule `body.login` shares: every colour below
 * is a --tp-* token, the type is the portal's self-hosted Raleway and Lato.
 *
 * Two of the portal's rules are broken here on purpose, on this page only:
 * the card has a shadow (the design system's shadow-lg; the portal is
 * otherwise shadow-free), and the primary button is coral (the only coral on
 * the page).
 *
 * There is no wrapper around core's markup: `body.login.tgdcp-login` is the
 * grid, and the intro (login.php, `login_header`), `#login` (the card) and
 * the footer (login.php, `login_footer`) are its items. Core's other body
 * children are hidden or are scripts. The interim login (wp-admin's
 * session-expired modal) has no `tgdcp-login` class: card only.
 *
 * Every state of wp-login.php: log in, lost password, reset password, check
 * your email, errors, logged out, and the interim login.
 */

body.login {
	/* Login-only tokens, with their design-system names. Contrast as measured. */
	--tp-band: #5a6199;            /* the page (band): white on it 5.83, white focus ring 5.83 */
	--tp-on-band-eyebrow: #d5f0ec; /* the eyebrow (teal-t80): 4.86 on the band; the back link's hover, 6.34 on the footer */
	--tp-link: #217e71;            /* links in the card (teal-s30): 4.90 on white */
	--tp-link-box: var(--tp-good-ink); /* links inside a message box (teal-s40): 5.59 on the error wash, 5.53 on the teal wash; teal-s30 would be 4.39 / 4.35 */
	--tp-rule: #e1e3ef;            /* the rule above the card's links (border-plan), decorative */
	--tp-shadow-card: 0 14px 40px rgba(64, 68, 96, 0.1); /* the card (shadow-lg): the login's one shadow */
	--tp-error-wash: #fbf0ef;      /* an error box: ink on it 12.65 */
	--tp-error-border: #e8c9c8;    /* its border, decorative */
	--tp-error-icon: #a84e4c;      /* its alert icon: 4.87 on the wash */
	--tp-success-wash: #e4f5f1;    /* a success or info box (teal-wash): ink on it 12.53; border --tp-good-chip, check icon --tp-link (4.35, non-text) */
	/* Reused: --tp-primary-hover (the footer, the card heading: 7.60), --tp-neutral (the headline's second line: 4.24 on the band, large text only),
	   --tp-panel (the lede: 5.03 on the band; footer text: 6.56), --tp-coral / --tp-coral-hover / --tp-on-coral (the button: 5.11 / 5.85),
	   --tp-field-border (fields and their icons: 4.12, non-text), --tp-accent (focus rings, the eye: 6.17), --tp-ink, --tp-ink-2 (labels: 6.35). */
	--tp-login-side: 48px;         /* the page's sides (16 on phones) */
	background: var(--tp-bg);
	color: var(--tp-ink);
	font-family: var(--tp-font-body);
	font-size: 16px;
	line-height: 1.5;
}

/* ---------- The page: band, two columns, footer ---------- */

body.login.tgdcp-login {
	display: grid;
	grid-template-columns: minmax(var(--tp-login-side), 1fr) minmax(0, 1104px) minmax(var(--tp-login-side), 1fr);
	grid-template-rows: 1fr auto;
	height: auto;
	min-height: 100vh;
	background: var(--tp-band);
	color: var(--tp-on-dark);
}

/* Anything else core or a plugin adds to the body gets a row of its own. */
body.tgdcp-login > * {
	grid-column: 1 / -1;
}

/* The headline is the page's h1 (login.php); core's screen-reader h1 would make two. */
body.tgdcp-login > h1.screen-reader-text {
	display: none;
}

/* Intro and card share the middle cell, at either end: the intro takes what the card and the 64px gap leave, up to 540px. */
.tgdcp-login .tgdcp-login-intro {
	grid-column: 2;
	grid-row: 1;
	justify-self: start;
	align-self: center;
	box-sizing: border-box;
	width: min(540px, 100% - 484px);
	margin: 72px 0;
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.tgdcp-login #login {
	grid-column: 2;
	grid-row: 1;
	justify-self: end;
	align-self: center;
	width: min(420px, 100%);
	margin: 72px 0;
}

.tgdcp-login .tgdcp-login-footer {
	grid-column: 1 / -1;
	grid-row: 2;
}

/* ---------- The intro ---------- */

.tgdcp-login-intro__logo {
	display: inline-block;
	align-self: flex-start;
}

.tgdcp-login-intro__logo img {
	display: block;
	width: auto;
	height: 64px;
}

.login .tgdcp-login-intro__eyebrow {
	margin-top: 24px;
	color: var(--tp-on-band-eyebrow);
	font-family: var(--tp-font-display);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.18em;
	line-height: 1.5;
	text-transform: uppercase;
}

.login .tgdcp-login-intro__headline {
	margin: 0;
	color: var(--tp-on-dark);
	font-family: var(--tp-font-display);
	font-size: 52px;
	font-weight: 300;
	line-height: 1.08;
	text-align: left;
}

.tgdcp-login-intro__headline span {
	display: block;
	color: var(--tp-neutral);
}

.login .tgdcp-login-intro__lede {
	max-width: 460px;
	color: var(--tp-panel);
	font-size: 19px;
	line-height: 1.6;
}

/* ---------- The footer ---------- */

.tgdcp-login-footer {
	background: var(--tp-primary-hover);
	color: var(--tp-panel);
	font-size: 15px;
	line-height: 1.5;
}

.login .tgdcp-login-footer__row {
	box-sizing: border-box;
	max-width: 1200px;
	margin: 0 auto;
	padding: 18px 48px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 32px;
}

.login .tgdcp-login-footer__back {
	color: var(--tp-on-dark);
	font-family: var(--tp-font-display);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-decoration: none;
	text-transform: uppercase;
}

.login .tgdcp-login-footer__back:hover {
	color: var(--tp-on-band-eyebrow);
}

.tgdcp-login-footer__contact {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 28px;
}

.login .tgdcp-login-footer__contact a {
	color: var(--tp-panel);
	text-decoration: underline;
}

.login .tgdcp-login-footer__contact a:hover {
	color: var(--tp-on-dark);
}

/* ---------- The card ---------- */

.login #login {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding: 40px;
	background: var(--tp-card);
	border-radius: 12px;
	box-shadow: var(--tp-shadow-card);
	color: var(--tp-ink);
}

/* Core's logo (the intro carries it), its "Go to" link and its privacy link (both in the footer now). */
.login h1.wp-login-logo,
.login #backtoblog,
.login #login .privacy-policy-page-link {
	display: none;
}

.login .tgdcp-login-heading {
	margin: 0 0 4px;
	color: var(--tp-primary-hover);
	font-family: var(--tp-font-display);
	font-size: 30px;
	font-weight: 300;
	line-height: 1.2;
}

/* The form is the card's content, not a panel of its own. */
.login form {
	margin: 0;
	padding: 0;
	overflow: visible;
	background: transparent;
	border: 0;
	box-shadow: none;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.login form label {
	display: block;
	margin: 0 0 var(--tp-gap-label);
	color: var(--tp-ink-2);
	font-family: var(--tp-font-display);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.04em;
	line-height: 1.4;
}

.login form .indicator-hint,
.login .description {
	color: var(--tp-ink-2);
	font-size: 16px;
	line-height: 1.6;
}

#login form .indicator-hint,
#login #reg_passmail {
	margin: 0;
}

/* Fields: 48px, 5px corners, an 18px line icon at 15px from the left. */
.login form .input,
.login input[type="text"],
.login input[type="password"],
.login input[type="email"],
.login input.password-input {
	box-sizing: border-box;
	width: 100%;
	height: 48px;
	min-height: 48px;
	margin: 0;
	padding: 0 14px 0 44px;
	background-color: var(--tp-card);
	background-position: 15px center;
	background-repeat: no-repeat;
	background-size: 18px 18px;
	border: 1px solid var(--tp-field-border);
	border-radius: 5px;
	box-shadow: none;
	color: var(--tp-ink);
	font-family: var(--tp-font-body);
	font-size: 17px;
	line-height: 1.4;
}

/* Envelope (username or email), in --tp-field-border. */
.login #user_login,
.login #user_email {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23727aac' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='M3 7l9 6 9-6'/%3E%3C/svg%3E");
}

/* Padlock (every password field, shown or hidden), in --tp-field-border. */
.login input[type="password"],
.login input.password-input {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23727aac' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='10' width='16' height='11' rx='2'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E");
}

.login form .input:hover,
.login input[type="text"]:hover,
.login input[type="password"]:hover {
	border-color: var(--tp-accent);
}

/* The password field and its show / hide toggle, inside the field at the right. */
.login .wp-pwd {
	position: relative;
}

.login .wp-pwd input.input,
.login .wp-pwd input.password-input {
	padding-right: 52px;
}

.login .button.wp-hide-pw {
	top: 2px;
	right: 2px;
	width: 44px;
	min-width: 44px;
	height: 44px;
	min-height: 44px;
	margin: 0;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 5px;
	box-shadow: none;
	color: var(--tp-accent);
}

.login .button.wp-hide-pw .dashicons {
	color: var(--tp-accent);
}

.login .button.wp-hide-pw:hover .dashicons {
	color: var(--tp-ink);
}

/* Remember me: 20px box, 10px gap, Lato 16px ink. */
.login form .forgetmenot {
	float: none;
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 24px;
	margin: 0;
}

.login form .forgetmenot label,
.login form .pw-weak label {
	display: inline;
	margin: 0;
	color: var(--tp-ink);
	font-family: var(--tp-font-body);
	font-size: 16px;
	font-weight: 400;
	letter-spacing: normal;
	line-height: 1.5;
}

.login form .pw-weak {
	margin: 12px 0 0;
}

.login form .pw-weak label {
	margin-left: 10px;
}

.login input[type="checkbox"] {
	width: 20px;
	height: 20px;
	min-width: 20px;
	margin: 0;
	vertical-align: middle;
	border: 1px solid var(--tp-field-border);
	border-radius: 4px;
	box-shadow: none;
}

.login input[type="checkbox"]:checked::before {
	/* Core's tick is an SVG in its own colour; recolour it with the accent. */
	content: "";
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	background: var(--tp-accent);
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M14.83 4.89l1.34.94-5.81 8.38H9.02L5.78 9.67l1.34-1.25 2.57 2.4z'/%3E%3C/svg%3E") center / 100% no-repeat;
}

/* The primary button: full width, coral, ink label (the page's only coral). */
.login .submit,
#login form p.submit {
	margin: 0;
	padding: 0;
}

.login .button-primary,
.login .button.button-primary {
	float: none;
	width: 100%;
	min-height: 48px;
	height: 48px;
	margin: 0;
	padding: 0 18px;
	background: var(--tp-coral);
	border: 0;
	border-radius: 5px;
	box-shadow: none;
	color: var(--tp-on-coral);
	font-family: var(--tp-font-display);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.1em;
	line-height: 1.25;
	text-shadow: none;
	text-transform: uppercase;
}

.login .button-primary:hover,
.login .button-primary:focus,
.login .button.button-primary:hover,
.login .button.button-primary:focus {
	background: var(--tp-coral-hover);
	color: var(--tp-on-coral);
}

/* Disabled (Save Password, until a weak password is confirmed): no coral, ink-2 on mauve-t90 (5.83). */
.login .button-primary:disabled,
.login .button-primary.disabled,
.login .button.button-primary:disabled,
.login .button.button-primary.disabled,
.login .button.button-primary:disabled:hover,
.login .button.button-primary.disabled:hover {
	/* Core's .wp-core-ui .button-primary:disabled sets its greys with !important (2.66), so these must too. */
	background: var(--tp-tint) !important;
	border: 1px dashed var(--tp-field-border) !important;
	color: var(--tp-ink-2) !important;
	cursor: not-allowed;
}

/* Secondary buttons (Generate Password on the reset screen): outlined, full width. */
.login .button:not(.button-primary):not(.wp-hide-pw):not(.wp-tooltip__toggle):not(.wp-tooltip__close) {
	min-height: 48px;
	padding: 0 16px;
	background: var(--tp-card);
	border: 1px solid var(--tp-accent);
	border-radius: 5px;
	box-shadow: none;
	color: var(--tp-accent);
	font-family: var(--tp-font-display);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.1em;
	line-height: 46px;
	text-transform: uppercase;
}

.login .button:not(.button-primary):not(.wp-hide-pw):not(.wp-tooltip__toggle):not(.wp-tooltip__close):hover {
	background: var(--tp-tint);
	color: var(--tp-ink);
}

.login .reset-pass-submit {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.login .reset-pass-submit .button {
	width: 100%;
	margin: 0;
}

/* The card's links (core's #nav), under a rule, centred. */
.login #nav {
	margin: 0;
	padding: 18px 0 0;
	border-top: 1px solid var(--tp-rule);
	font-size: 16px;
	line-height: 1.5;
	text-align: center;
}

.login #login a {
	color: var(--tp-link);
	text-decoration: underline;
}

.login #login a:hover {
	color: var(--tp-ink);
}

/* ---------- WordPress's messages: a box with an 18px icon at the left ---------- */

.login .message,
.login .notice,
.login .success,
.login #login_error {
	box-sizing: border-box;
	margin: 0;
	padding: 12px 14px 12px 42px;
	background-color: var(--tp-success-wash);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23217e71' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
	background-position: 14px 15px;
	background-repeat: no-repeat;
	background-size: 18px 18px;
	border: 1px solid var(--tp-good-chip);
	border-radius: 5px;
	box-shadow: none;
	color: var(--tp-ink);
	font-size: 16px;
	line-height: 1.5;
	word-wrap: break-word;
}

.login #login_error,
.login .notice-error {
	background-color: var(--tp-error-wash);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a84e4c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 8v5'/%3E%3Cpath d='M12 16h.01'/%3E%3C/svg%3E");
	border-color: var(--tp-error-border);
}

.login .message p,
.login .notice p,
.login .success p,
.login #login_error p,
.login .login-error-list li {
	margin: 0;
	padding: 0;
	font-size: 16px;
	line-height: 1.5;
}

.login .login-error-list li + li {
	margin-top: 6px;
}

.login #login .message a,
.login #login .notice a,
.login #login #login_error a {
	color: var(--tp-link-box);
}

.login #login .message a:hover,
.login #login .notice a:hover,
.login #login #login_error a:hover {
	color: var(--tp-ink);
}

/* The password strength meter on the reset screen: ink text on tokens. */
.login #pass-strength-result {
	box-sizing: border-box;
	width: 100%;
	margin: 8px 0 0;
	padding: 8px 12px;
	background: var(--tp-tint);
	border: 1px solid var(--tp-border);
	border-radius: 5px;
	color: var(--tp-ink);
	font-weight: 600;
}

.login #pass-strength-result.short,
.login #pass-strength-result.bad {
	background: var(--tp-warn-wash);
	border-color: var(--tp-warning);
}

.login #pass-strength-result.good {
	background: var(--tp-neutral);
	border-color: var(--tp-field-border);
}

.login #pass-strength-result.strong {
	background: var(--tp-good-chip);
	border-color: var(--tp-teal);
}

/* Remember Me's help (WordPress 7.1): a toggle and a popover bubble. */
.login .wp-tooltip__toggle,
.login .wp-tooltip__close {
	min-width: 24px;
	min-height: 24px;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 4px;
	box-shadow: none;
	color: var(--tp-accent);
	cursor: pointer;
}

.login .wp-tooltip__toggle .dashicons,
.login .wp-tooltip__close .dashicons {
	color: var(--tp-accent);
}

.login .wp-tooltip__toggle:hover .dashicons,
.login .wp-tooltip__close:hover .dashicons {
	color: var(--tp-ink);
}

.login .wp-tooltip__bubble {
	padding: 12px 16px;
	background: var(--tp-card);
	border: 1px solid var(--tp-border);
	border-radius: 7px;
	box-shadow: none;
	color: var(--tp-ink);
	font-size: 14px;
	line-height: 1.5;
}

.login .wp-tooltip__text {
	color: var(--tp-ink);
}

/* The language switcher is hidden. */
.login .language-switcher {
	display: none;
}

/* ---------- Focus ---------- */

/* In the card: the portal's 3px ring, 3px clear, on every field, box, link and button. */
.login input:focus,
.login input:focus-visible,
.login .button:focus,
.login .button:focus-visible,
.login a:focus,
.login a:focus-visible,
.login #pass1:focus,
.login #pass1-text:focus,
.login input.password-input:focus {
	border-color: var(--tp-accent);
	box-shadow: none;
	outline: 3px solid var(--tp-accent);
	outline-offset: 3px;
}

.login .button.wp-hide-pw:focus,
.login .button.wp-hide-pw:focus-visible,
.login .wp-tooltip__toggle:focus,
.login .wp-tooltip__toggle:focus-visible,
.login .wp-tooltip__close:focus,
.login .wp-tooltip__close:focus-visible,
.login button:focus-visible {
	border: 0;
	box-shadow: none;
	outline: 3px solid var(--tp-accent);
	outline-offset: 3px;
}

/* On the band and the footer: a white ring (the mauve one would vanish there). */
.login .tgdcp-login-intro a:focus,
.login .tgdcp-login-intro a:focus-visible,
.login .tgdcp-login-footer a:focus,
.login .tgdcp-login-footer a:focus-visible {
	outline: 3px solid var(--tp-on-dark);
	outline-offset: 3px;
}

/* ---------- Narrower ---------- */

/* Below 1000px the intro and the card no longer fit side by side (420 + 64 + 420 inside the sides), so they stack, intro first. */
@media (max-width: 999px) {
	body.login.tgdcp-login {
		grid-template-rows: auto 1fr auto;
	}

	.tgdcp-login .tgdcp-login-intro {
		grid-row: 1;
		align-self: start;
		width: auto;
		max-width: 540px;
		margin: 72px 0 0;
	}

	.tgdcp-login #login {
		grid-row: 2;
		justify-self: start;
		align-self: start;
		margin: 64px 0 72px;
	}

	.tgdcp-login .tgdcp-login-footer {
		grid-row: 3;
	}
}

/* Phones. */
@media (max-width: 600px) {
	body.login {
		--tp-login-side: 16px;
	}

	.tgdcp-login .tgdcp-login-intro {
		gap: 14px;
		margin-top: 40px;
	}

	.tgdcp-login-intro__logo img {
		height: 52px;
	}

	.login .tgdcp-login-intro__eyebrow {
		margin-top: 16px;
	}

	.login .tgdcp-login-intro__headline {
		font-size: 34px;
		line-height: 1.1;
	}

	/* One sentence on a phone: no forced break. */
	.tgdcp-login-intro__headline span {
		display: inline;
	}

	.login .tgdcp-login-intro__lede {
		display: none;
	}

	.tgdcp-login #login {
		margin: 28px 0 32px;
	}

	.login #login {
		gap: 18px;
		padding: 24px 20px;
	}

	.login .tgdcp-login-heading {
		margin: 0;
		font-size: 26px;
	}

	.login #nav {
		padding-top: 16px;
	}

	.login .tgdcp-login-footer__row {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
		padding: 18px 16px;
	}

	.tgdcp-login-footer__contact {
		flex-direction: column;
		gap: 10px;
	}

	.tgdcp-login-footer__studio {
		display: none;
	}
}

/* ---------- The interim login: card only, sized for wp-admin's modal ---------- */

body.interim-login {
	background: var(--tp-bg);
}

.interim-login #login {
	width: auto;
	max-width: 420px;
	margin: 0 auto;
	padding: 24px 20px;
	gap: 18px;
}

.interim-login .tgdcp-login-heading {
	margin: 0;
	font-size: 26px;
}
