/*
 * chess-frame.css: the frame round the CSS chess game and the chess puzzles (templates/chess.html, chessPuzzle.html).
 * Cosmetic only: a page background like the sudoku pages, and the links under the board as buttons. It sets no
 * position or size on the board, the pieces or the clocks (the game is absolutely positioned from the page corner),
 * so it can't change how a move works. The size rules centre the page (see body) and keep the footer inside a phone screen.
 */
html { background: hsl(240, 24%, 90%); }
body { font-family: "Open Sans", system-ui, sans-serif; color: #1d1b2e; }

/* Centring: the board, clocks and footer are absolutely positioned from the page's top left. Making <body> a centred,
   positioned box moves that corner to the box's corner, so everything moves together and nothing inside changes.
   12 squares wide: the board (8), the clocks beside it (to 11) and the footer (12). */
body {
	position: relative;
	width: min(calc(var(--block) * 12), calc(100vw - 16px));
	margin: 8px auto;
}

#footer {
	max-width: calc(100vw - 2rem);
	display: flex;
	flex-wrap: wrap;
	gap: .4rem;
	align-items: center;
	padding-bottom: 1.5rem;
}
#footer > a, #footer > label {
	display: inline-block;
	font-size: .9rem;
	line-height: 1.2;
	height: auto;
	padding: .35rem .7rem;
	border: 1px solid #1d1b2e;
	border-radius: 6px;
	background: #fff;
	color: #000080;
	text-decoration: none;
}
/* the game's own CSS positions every label absolutely (the board's squares); the help switch sits in the row */
#footer > label { position: static; z-index: auto; transform: none; }
#footer > a:hover, #footer > label:hover { background: #000080; color: #fff; }
#footer > a:first-of-type { background: #000080; color: #fff; }

#help {
	flex-basis: 100%;
	background: #fff;
	border: 1px solid #1d1b2e !important;
	border-radius: 6px;
	padding: 0 1rem;
	font-size: .95rem;
	line-height: 1.5;
}
