/*
 * The login screen (inc/login-screen.php), in the design of the e-Library mail admin pages
 * (css/elibrary-mail-admin.css): ash grey page, white panel with a fine line, Industry
 * Insight navy, a signal blue for what you can act on, wood for warnings. Schibsted Grotesk.
 * Loaded after WordPress's login.css and overrides only what it needs to.
 */
body.login {
	--paper: #ffffff;
	--ash: #f3f4f2;
	--line: #e1e3e0;
	--line-strong: #cfd2ce;
	--steel: #5b6472;
	--graphite: #1e2533;
	--birch: #efe4d3;
	--oak: #c8a47e;
	--oak-deep: #8a6a48;
	--navy: #2f3169;
	--blue: #2f6fe0;
	--blue-soft: #e6eefc;
	--ok: #2e7d4f;
	--bad: #b3261e;
	--radius-panel: 10px;
	--radius-control: 6px;
	--wp-admin-theme-color: var(--blue);
	background: var(--ash);
	color: var(--graphite);
	font-family: "Schibsted Grotesk", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	font-size: 14px;
	line-height: 1.5;
}
body.login *, body.login *::before, body.login *::after { box-sizing: border-box; }

#login { width: 380px; max-width: calc(100% - 32px); padding: 7vh 0 32px; }

/* The site's logo (set inline from the theme option), linked to the home page. */
.login h1.wp-login-logo a {
	width: 150px;
	height: 83px;
	margin: 0 auto 22px;
	background-image: none;
	background-size: contain;
	background-position: center;
	/* The PNG has a white background: multiply lets the grey page through it. */
	mix-blend-mode: multiply;
}
.login h1.wp-login-logo a:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }

/* The title on the page, as the headings of the mail pages; messages and the form below. */
.login .grc-login-title { padding: 0 2px 14px; }
.login .grc-login-title h2 { margin: 0; font-size: 26px; line-height: 1.15; font-weight: 700; letter-spacing: -0.015em; color: var(--navy); }
.login .grc-login-title p { margin: 4px 0 0; color: var(--steel); font-size: 14px; }

.login form {
	margin: 0 0 20px;
	padding: 22px 26px 24px;
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: var(--radius-panel);
	box-shadow: none;
}
/* #login, as WordPress's own "#login form p { margin-bottom: 0 }", which would otherwise win. */
#login form p { margin: 0 0 14px; }
#login form .user-pass1-wrap p { margin: 0; }
.login form .user-pass-wrap { margin: 0 0 14px; }

.login label { margin-bottom: 5px; color: var(--steel); font-size: 13px; font-weight: 500; }
.login form .input,
.login input[type="text"],
.login input[type="email"],
.login input[type="password"] {
	width: 100%;
	min-height: 42px;
	margin: 0;
	padding: 8px 12px;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius-control);
	background: var(--paper);
	color: var(--graphite);
	font: inherit;
	font-size: 15px;
	box-shadow: none;
}
.login form .input:focus,
.login input[type="text"]:focus,
.login input[type="email"]:focus,
.login input[type="password"]:focus { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); outline: none; }
.login .wp-pwd input.password-input { padding-right: 44px; }

/* Show password: a quiet icon in the field. */
.login .button.wp-hide-pw { top: 1px; right: 1px; min-height: 40px; color: var(--steel); border-radius: var(--radius-control); }
.login .button.wp-hide-pw:hover { color: var(--navy); }
.login .button.wp-hide-pw:focus { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }

/* Caps Lock: a wood note under the field, like the warnings on the mail pages. */
.login .wp-pwd .caps-warning {
	top: 0;
	margin-top: 8px;
	padding: 7px 10px;
	background: var(--birch);
	border: 0;
	border-left: 3px solid var(--oak);
	border-radius: 0 var(--radius-control) var(--radius-control) 0;
	color: var(--graphite);
	font-size: 13px;
}
.login .wp-pwd .caps-icon { width: 16px; height: 16px; }
.login .wp-pwd .caps-icon svg { width: 16px; height: 16px; fill: var(--oak-deep); stroke: var(--oak-deep); }

/* Remember me, and the button beside it. */
.login form .forgetmenot { display: flex; align-items: center; gap: 4px; float: none; margin: 4px 0 18px; }
.login form .forgetmenot label { margin: 0; color: var(--graphite); font-size: 14px; font-weight: 400; }
.login input[type="checkbox"] { width: 18px; height: 18px; margin: 0 6px 0 0; accent-color: var(--navy); border-color: var(--line-strong); border-radius: 4px; }
.login input[type="checkbox"]:checked::before { content: none; }
.login .forgetmenot .wp-tooltip__toggle { color: var(--steel); }

.login .submit { margin: 0; }
.login .button-primary,
.login .button.button-large {
	float: none;
	width: 100%;
	min-height: 42px;
	padding: 0 18px;
	border: 1px solid var(--blue);
	border-radius: var(--radius-control);
	background: var(--blue);
	color: #fff;
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	box-shadow: none;
	text-shadow: none;
}
.login .button-primary:hover,
.login .button-primary:focus { background: var(--navy); border-color: var(--navy); color: #fff; }
.login .button-primary:focus-visible { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--blue); outline: none; }
.login .button-secondary:not(.wp-hide-pw) { border-color: var(--line-strong); border-radius: var(--radius-control); color: var(--navy); background: var(--paper); }

/* New password: Generate Password and Save Password stacked, both the panel's width. */
.login .reset-pass-submit { flex-direction: column; gap: 10px; }
.login .reset-pass-submit .button { width: 100%; margin: 0; }
.login .button.wp-generate-pw {
	min-height: 42px;
	padding: 0 18px;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius-control);
	background: var(--paper);
	color: var(--navy);
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	box-shadow: none;
}
.login .button.wp-generate-pw:hover { border-color: var(--navy); background: var(--ash); color: var(--navy); }
.login .button.wp-generate-pw:focus { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); color: var(--navy); outline: none; }

/* Messages: a white strip with a coloured edge, as the notices on the mail pages. */
.login .message,
.login .notice,
.login .success,
.login #login_error {
	margin: 0 0 16px;
	padding: 10px 14px;
	background: var(--paper);
	border: 1px solid var(--line);
	border-left: 3px solid var(--blue);
	border-radius: 0 var(--radius-control) var(--radius-control) 0;
	box-shadow: none;
	color: var(--graphite);
	font-size: 14px;
}
.login #login_error, .login .notice-error { border-left-color: var(--bad); }
.login .success, .login .notice-success { border-left-color: var(--ok); background: var(--paper); }
.login .message p, .login .notice p, .login .success p { font-size: 14px; }
.login #login_error a, .login .message a { color: var(--blue); }

/* Password strength (new password). */
.login #pass-strength-result { border-radius: var(--radius-control); font-size: 13px; }
.login .pw-weak label { color: var(--graphite); }

/* Links under the panel. */
.login #nav, .login #backtoblog { margin: 10px 0 0; padding: 0 4px; font-size: 14px; }
.login #nav a, .login #backtoblog a { color: var(--blue); text-decoration: none; }
.login #nav a:hover, .login #backtoblog a:hover { color: var(--navy); text-decoration: underline; text-underline-offset: 2px; }
.login #nav a:focus-visible, .login #backtoblog a:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; box-shadow: none; }
.login #backtoblog { margin-top: 6px; }

/* Language switcher at the foot, lined up with the panel and the links above it. */
.login .language-switcher { width: 380px; max-width: calc(100% - 32px); margin: 8px auto 0; padding: 0 4px 24px; text-align: left; }
.login .language-switcher label { color: var(--steel); }
.login .language-switcher select { min-height: 36px; border: 1px solid var(--line-strong); border-radius: var(--radius-control); font: inherit; color: var(--graphite); }
.login .language-switcher .button { min-height: 36px; border-color: var(--line-strong); border-radius: var(--radius-control); color: var(--navy); background: var(--paper); }

/* Privacy policy link, if one is set. */
.login .privacy-policy-page-link a { color: var(--steel); }
@media screen and (max-width: 400px) {
	.login .language-switcher .button { margin: 5px 0 0; }
}
