/*
 * The framework's own web pages in Starpoint's brand (decision 0510): the sign-in page, setting
 * a new password, the framework's message pages and its page for an address that does not exist. Taken onto every web page of the site
 * (`web_include_css`, starpoint/feature_hooks/brand_pages.py) and scoped here to those pages.
 *
 * The colours are the owner's, as frontend/src/brand/tokens.css names them; that file is built
 * into the screens and cannot be served on its own, so they are written here again, and
 * starpoint/tests/test_brand_pages.py fails if any of them differs from tokens.css.
 */
:root {
	--sp-ink: #012350;
	--sp-ink-raised: #0b3267;
	--sp-star: #ecbb70;
	--sp-paper: #faf9f6;
	--sp-on-ink: #ffffff;
	/* tokens.css's quieter grey, at least 4.5 to 1 on white and on the paper (decision 0222). */
	--sp-text-quiet: oklch(0.5 0 0);
}

body[data-path="login"],
body[data-path="update-password"],
body[data-path="message"],
body[data-path="404"] {
	background: var(--sp-paper);
}

body[data-path="login"] .page-card,
body[data-path="update-password"] .page-card,
body[data-path="message"] .page-card {
	border-top: 4px solid var(--sp-ink);
	border-radius: 10px;
	box-shadow: 0 1px 3px rgb(1 35 80 / 12%);
}

body[data-path="login"] .app-logo,
body[data-path="update-password"] .app-logo {
	height: 40px;
	width: auto;
	max-width: 220px;
}

body[data-path="login"] .page-card-head h4,
body[data-path="update-password"] .page-card-head h4 {
	color: var(--sp-ink);
	font-family: "Montserrat", "Inter", system-ui, sans-serif;
	letter-spacing: -0.01em;
}

body[data-path="login"] .btn-primary,
body[data-path="login"] .es-button[data-variant="solid"],
body[data-path="update-password"] .btn-primary,
body[data-path="update-password"] .es-button[data-variant="solid"],
body[data-path="message"] .btn-primary,
body[data-path="message"] .es-button[data-variant="solid"] {
	background-color: var(--sp-ink);
	border-color: var(--sp-ink);
	color: var(--sp-on-ink);
}

body[data-path="login"] .btn-primary:hover,
body[data-path="login"] .es-button[data-variant="solid"]:hover,
body[data-path="login"] .btn-primary:focus-visible,
body[data-path="login"] .es-button[data-variant="solid"]:focus-visible,
body[data-path="update-password"] .btn-primary:hover,
body[data-path="update-password"] .es-button[data-variant="solid"]:hover,
body[data-path="update-password"] .btn-primary:focus-visible,
body[data-path="update-password"] .es-button[data-variant="solid"]:focus-visible,
body[data-path="message"] .btn-primary:hover,
body[data-path="message"] .es-button[data-variant="solid"]:hover,
body[data-path="message"] .btn-primary:focus-visible,
body[data-path="message"] .es-button[data-variant="solid"]:focus-visible {
	background-color: var(--sp-ink-raised);
	border-color: var(--sp-ink-raised);
}

body[data-path="login"] .btn-primary:focus-visible,
body[data-path="update-password"] .btn-primary:focus-visible {
	outline: 2px solid var(--sp-star);
	outline-offset: 2px;
}

/* The framework writes quiet text in a grey that is too light to read (decision 0222): labels,
 * the line under a heading, "Forgot password?", a message's words and "Back to Home". */
body[data-path="login"] :is(label, .text-muted, .page-card-subtitle, a[href$="#forgot"]),
body[data-path="update-password"] :is(label, .text-muted, .page-card-subtitle),
body[data-path="message"] :is(.text-muted, .page-card-subtitle, .page-card-body p, p),
body[data-path="404"] :is(.text-muted, .details, .details a, p) {
	color: var(--sp-text-quiet);
}

/* The framework's own .text-muted is marked important, so only that one is answered in kind. */
body[data-path="login"] .text-muted,
body[data-path="update-password"] .text-muted,
body[data-path="message"] .text-muted,
body[data-path="404"] .text-muted {
	color: var(--sp-text-quiet) !important;
}

body[data-path="message"] h4,
body[data-path="404"] h4 {
	color: var(--sp-ink);
	font-family: "Montserrat", "Inter", system-ui, sans-serif;
}
