/****************************
 *
 * MEC page
 * Loaded after the site-wide style.css and ../dashboard.css. Only adds what they don't cover.
 * One table of twelve schools fits the 500px column, so there is no two-column grid.
 *
 ****************************/

/****************************
 *
 * View toggle
 * Sits on the title row, right-aligned, in the same type as the key.
 *
 ****************************/
.dashboard > header.with-toggle {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 5px 20px;
}
.toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 0 auto; /* stays on the right even if the row wraps */
	color: var(--color-text-muted); /* same as the key */
	font-size: clamp(0.75em, 3.6vw, 1em);
	text-transform: lowercase;
	cursor: pointer;
	user-select: none;
}
.toggle input { /* drawn by hand: a native checkbox can't be filled gray when empty */
	appearance: none;
	position: relative; /* the check mark is positioned inside the box, so it never changes the box's own layout */
	flex: none;
	width: 1em;
	height: 1em;
	margin: 0;
	border: 0;
	border-radius: 2px;
	background-color: var(--color-line); /* Change the empty box color */
	cursor: pointer;
}
.toggle input:checked {
	background-color: var(--color-accent); /* Change the checked box color */
}
.toggle input:checked::after { /* the check mark */
	content: "";
	position: absolute; /* out of flow: a child in flow would shift the box's baseline and move it when checked */
	left: 50%;
	top: 50%;
	width: 0.28em;
	height: 0.52em;
	border-style: solid;
	border-width: 0 2px 2px 0;
	border-color: var(--color-surface); /* Change the check mark color */
	transform: translate(-50%, -60%) rotate(45deg);
}
.toggle input:focus-visible { /* keyboard users only; a mouse click shows no outline */
	outline: 2px solid var(--color-accent);
	outline-offset: 2px;
}
