/*
   Board layout: its controls in the scores' place, the colour rows, Reset and Done.
   Loaded in order with the others (see index.html): a later rule wins. */

/* Settings > Board layout: the controls take the place of the scores and
   keypad, and the board beside them is the preview. The rest of the screen
   sleeps until Done. */
body.visuals-open :is(.scores-card, .calc-section) {
	display: none;
}

/* Only the board and the menu button stay: nothing here can touch the game. */
body.visuals-open :is(.ctrl-section, .btn-section) > :not(.settings-btn) {
	visibility: hidden;
}


/* A colour row with its name above it (Highlight). */
.swatch-group {
	display: flex;
	flex-direction: column;
	gap: calc(1 * var(--m));
	color: var(--text-soft);
}

.visuals-panel {
	display: flex;
	flex-direction: column;
	gap: calc(2 * var(--m));
	height: 100%;
	box-sizing: border-box;
	padding: calc(1 * var(--m)) calc(2 * var(--m)) calc(2 * var(--m));
	color: var(--text);
	font-family: var(--font-condensed);
	font-size: calc(2.8 * var(--m));
	overflow-y: auto;
	scrollbar-width: none;
	outline: none;
	animation: fade-in var(--medium) var(--ease-out);
}

.visuals-panel .settings-heading {
	margin: 0;
}

.visuals-controls {
	display: flex;
	flex-direction: column;
	gap: calc(1.7 * var(--m));
	padding: 0 calc(1 * var(--m));
}

/* Reset and Done side by side at the bottom. */
.visuals-actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: calc(2 * var(--m));
	margin-top: auto;
}

.range {
	display: grid;
	grid-template-columns: 1fr auto;
	row-gap: calc(0.3 * var(--m));
	color: var(--text-soft);
}

.range output {
	color: var(--text);
	font-variant-numeric: tabular-nums;
}

.range input {
	grid-column: 1 / -1;
	width: 100%;
	margin: 0;
	accent-color: var(--checkout);
}

.swatches {
	display: flex;
	gap: calc(1.5 * var(--m));
}

.swatch {
	width: calc(4.5 * var(--m));
	height: calc(4.5 * var(--m));
	padding: 0;
	border: var(--border-muted);
	border-radius: 50%;
	cursor: pointer;
	transition: transform var(--fast) var(--ease-out);
}

.swatch[aria-pressed="true"] {
	border-color: var(--checkout);
	transform: scale(1.15);
}

.visuals-panel .settings-check {
	display: flex;
	align-items: center;
	gap: calc(1 * var(--m));
	cursor: pointer;
}

.visuals-panel .settings-check input {
	width: calc(2.6 * var(--m));
	height: calc(2.6 * var(--m));
	margin: 0;
	accent-color: var(--checkout);
}
