/**
 * Smarter Guides sign-in form.
 *
 * Its own small stylesheet rather than a section of reader.css, because this
 * form lands on a page the site laid out — a Divi page, usually — and the
 * reader stylesheet is a whole reading environment. Loading that around a
 * six-field form would restyle the page it was dropped on.
 *
 * Deliberately short and deliberately unopinionated about the page around it:
 * no background, no card, no width beyond a readable measure. The site's own
 * design is the design here. What this file exists to do is one thing, and it
 * is the thing the design brief actually turns on.
 *
 * THE TWO BUTTONS HAVE EQUAL WEIGHT.
 *
 * A reader who bought a guide eight months ago does not know their password.
 * If "email me a sign-in link" is a grey link under a blue button, they will
 * not see it, and they will attempt a password reset instead — which on a bad
 * day, for somebody in treatment, is where the session ends. So the two are the
 * same size, on the same row, and the only difference between them is fill
 * against outline. Anyone tempted to demote the second one should read the
 * MagicLink class docblock first.
 */

.smartg-login {
	max-width: 26rem;
}

.smartg-login__title {
	margin: 0 0 0.75rem;
}

.smartg-login__notice,
.smartg-login__error {
	margin: 0 0 1rem;
	padding: 0.7rem 0.9rem;
	border-radius: 4px;
	border: 1px solid;
	font-size: 0.95rem;
}

.smartg-login__notice {
	border-color: #b8cbe6;
	background: #eef3fb;
	color: #1f2933;
}

/*
 * #8c1d16 on #fdf1f0 measures 7.6:1. The message is also the only one this form
 * ever gives for a failed password, so it has to be readable rather than merely
 * present — see LoginForm::failure_message() for why there is only one.
 */
.smartg-login__error {
	border-color: #e0b4b0;
	background: #fdf1f0;
	color: #8c1d16;
}

.smartg-login__field {
	margin: 0 0 0.9rem;
}

.smartg-login__field label {
	display: block;
	margin-bottom: 0.25rem;
	font-size: 0.92rem;
}

.smartg-login__input {
	box-sizing: border-box;
	width: 100%;
	padding: 0.55rem 0.7rem;
	font: inherit;
	border: 1px solid #cfc9c0;
	border-radius: 4px;
	background: #fff;
	color: #1f2933;
}

.smartg-login__remember {
	margin: 0 0 1.1rem;
	font-size: 0.92rem;
}

.smartg-login__remember label {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	cursor: pointer;
}

/* One row, two buttons, wrapping together rather than one dropping below. */
.smartg-login__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin: 0 0 0.9rem;
}

.smartg-login__actions .smartg-button {
	flex: 1 1 11rem;
	display: inline-block;
	padding: 0.6rem 1rem;
	font: inherit;
	text-align: center;
	text-decoration: none;
	border: 1px solid #004aad;
	border-radius: 4px;
	background: #004aad;
	color: #fff;
	cursor: pointer;
}

/*
 * Outline, not "smaller and greyer". White on #004aad is 9.2:1 and #004aad on
 * white is the same figure inverted, so both buttons clear AAA and neither
 * reads as the afterthought.
 */
.smartg-login__actions .smartg-button--secondary {
	background: #fff;
	color: #004aad;
}

.smartg-login__actions .smartg-button:hover,
.smartg-login__actions .smartg-button:focus {
	border-color: #003a87;
	background: #003a87;
	color: #fff;
}

.smartg-login :focus-visible {
	outline: 2px solid #004aad;
	outline-offset: 2px;
}

.smartg-login__hint,
.smartg-login__lost {
	margin: 0 0 0.6rem;
	font-size: 0.9rem;
	color: #52606d;
}

.smartg-login__signed-in {
	margin: 0 0 0.9rem;
}

.smartg-login--done .smartg-login__actions .smartg-button {
	flex: 0 0 auto;
}

.smartg-login__logout {
	align-self: center;
	font-size: 0.9rem;
}
