/* Branded wp-login.php. Loaded by includes/classes/LoginScreen.php. */

@font-face {
	font-family: "Barlow";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("../fonts/barlow/barlow-500-latin.woff2") format("woff2");
}

@font-face {
	font-family: "Barlow";
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("../fonts/barlow/barlow-600-latin.woff2") format("woff2");
}

:root {
	--gl-primary: rgb(79 107 133);
	--gl-primary-dark: rgb(24 32 40);
	--gl-tarawera: rgb(10 69 89);
	--gl-tertiary: rgb(207 194 143);
	--gl-ecru: rgb(244 241 229);
	--gl-text: rgb(24 32 40);
	--gl-radius: 4px;
}

body.login {
	font-family: "Barlow", system-ui, sans-serif;
	font-weight: 500;
	color: var(--gl-text);
	/* Texture band across the bottom 40% of the screen, primary colour
	   throughout. The light section texture is multiplied over the primary,
	   so its white drops out and the pattern reads as a darker tone of the
	   same colour rather than a different hue. */
	background:
		url("../images/section-texture.webp") bottom / cover no-repeat,
		var(--gl-primary);
	background-size: 100% 40vh, auto;
	background-blend-mode: multiply, normal;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	min-height: 100vh;
	padding: 32px 0;
	box-sizing: border-box;
}

body.login #login {
	width: min(400px, calc(100% - 32px));
	padding: 0;
	margin: 0 auto;
}

/* The site logo is the white (negative) version, so it sits on the dark
   background above the card rather than inside it. */
body.login h1 {
	padding: 0 0 32px;
}

body.login h1 a {
	background-image: var(--gresham-login-logo, none);
	background-size: contain;
	background-position: center;
	background-repeat: no-repeat;
	width: 100%;
	max-width: 240px;
	height: 64px;
	margin: 0 auto;
	text-indent: -9999px;
	outline-offset: 4px;
}

/* No custom logo set: show the site name as text instead. */
body.login.gresham-login-no-logo h1 a {
	background: none;
	text-indent: 0;
	height: auto;
	font-size: 28px;
	font-weight: 600;
	color: #fff;
}

body.login .message,
body.login .notice,
body.login #login_error {
	margin: 0 0 16px;
	border-radius: var(--gl-radius);
	box-shadow: none;
	border-left-color: var(--gl-tertiary);
	background: var(--gl-ecru);
}

body.login #login_error {
	border-left-color: #b32d2e;
}

body.login form {
	margin: 0;
	padding: 32px;
	border: 0;
	border-top: 4px solid var(--gl-tertiary);
	border-radius: var(--gl-radius);
	box-shadow: 0 24px 48px rgb(0 0 0 / 35%);
	overflow: hidden;
}

body.login label {
	font-size: 14px;
	font-weight: 600;
	color: var(--gl-text);
}

body.login input[type="text"],
body.login input[type="password"],
body.login input[type="email"] {
	font-family: inherit;
	font-size: 18px;
	border: 1px solid rgb(167 181 194);
	border-radius: var(--gl-radius);
	padding: 6px 12px;
	box-shadow: none;
}

body.login input[type="text"]:focus,
body.login input[type="password"]:focus,
body.login input[type="email"]:focus,
body.login input[type="checkbox"]:focus {
	border-color: var(--gl-primary);
	box-shadow: 0 0 0 2px rgb(79 107 133 / 35%);
}

body.login .button.wp-hide-pw {
	color: var(--gl-primary);
}

body.login .button.wp-hide-pw:focus {
	border-color: var(--gl-primary);
	box-shadow: 0 0 0 2px rgb(79 107 133 / 35%);
}

body.login .button-primary {
	font-family: inherit;
	font-weight: 600;
	font-size: 15px;
	letter-spacing: 0.02em;
	background: var(--gl-tarawera);
	border-color: var(--gl-tarawera);
	border-radius: var(--gl-radius);
	padding: 2px 20px;
	min-height: 40px;
	text-shadow: none;
	box-shadow: none;
	transition: background-color 0.15s ease;
}

body.login .button-primary:hover,
body.login .button-primary:focus {
	background: var(--gl-primary-dark);
	border-color: var(--gl-primary-dark);
}

body.login .button-primary:focus {
	box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--gl-tertiary);
}

/* Links under the card. */
body.login #nav,
body.login #backtoblog {
	text-align: center;
	padding: 0;
	margin: 16px 0 0;
}

body.login #nav a,
body.login #backtoblog a,
body.login .privacy-policy-page-link a {
	color: rgb(255 255 255 / 80%);
	text-decoration: none;
}

body.login #nav a:hover,
body.login #backtoblog a:hover,
body.login #nav a:focus,
body.login #backtoblog a:focus {
	color: var(--gl-tertiary);
	text-decoration: underline;
	box-shadow: none;
}

/* The site root is the audience gateway, so "Go to site" is unhelpful here. */
body.login #backtoblog {
	display: none;
}

.gresham-login-note {
	text-align: center;
	margin: 24px 0 0;
	font-size: 12px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--gl-tertiary);
}

body.interim-login {
	min-height: 0;
}
