/* Circuit Bloom: game styles. Every class starts with "bloom-". The page around it is Bootstrap 4. */

.bloom {
	max-width: 560px;
	margin-left: auto;
	margin-right: auto;
	font-family: inherit;
}

/* reward panel */
.bloom-panel {
	padding: .6rem .75rem;
	border: 1px solid #d9dee8;
	border-left: 4px solid #04a8fb;
	border-radius: .35rem;
	background: #f7f9fc;
	color: #1d2433;
}
.bloom-panel-text,
.bloom-panel-note {
	color: #3c4658;
}
.bloom-panel-row {
	gap: .5rem .75rem;
	margin-top: .4rem;
}
.bloom-panel-row:empty {
	display: none;
}
.bloom-panel-time {
	color: #3c4658;
	font-variant-numeric: tabular-nums;
}
.bloom-ring {
	width: 1.5rem;
	height: 1.5rem;
	flex: none;
}
.bloom-ring-track,
.bloom-ring-arc {
	fill: none;
	stroke-width: 3;
}
.bloom-ring-track {
	stroke: #d5dbe6;
}
.bloom-ring-arc {
	stroke: #871faf;
	stroke-linecap: round;
}
.bloom-msg .bloom-alert {
	margin: .5rem 0 0;
}
.bloom-net {
	margin-top: .35rem;
}

/* status line above the board */
.bloom-head {
	gap: .15rem 1rem;
}
.bloom-stat {
	font-variant-numeric: tabular-nums;
}

/* the board: a dark night-garden panel inside the light card */
.bloom-stage {
	width: 100%;
	max-width: 560px;
	margin: 0 auto .6rem;
	line-height: 0;
}
.bloom-canvas {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	margin: 0 auto;
	border-radius: .6rem;
	background: #111a33;
	box-shadow: 0 2px 10px rgba(17, 26, 51, .35);
	touch-action: manipulation;
	-webkit-user-select: none;
	user-select: none;
	-webkit-touch-callout: none;
	-webkit-tap-highlight-color: transparent;
	cursor: pointer;
	outline: 0;          /* the focused tile gets its own outline, drawn on the canvas after keyboard use */
}

.bloom-result {
	font-weight: 600;
	color: #1d2433;
}

/* toolbar: wraps below the board on narrow screens */
.bloom-tools {
	gap: .5rem;
}
.bloom-size {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
}
.bloom-size-select {
	width: auto;
}

.bloom [hidden],
.bloom-claim[hidden] {
	display: none;
}
.bloom-claim {
	max-width: 560px;
	margin: .75rem auto 0;
}

/* visually hidden text for screen readers */
.bloom-sr {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	margin: -1px !important;
	padding: 0 !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

@media (prefers-reduced-motion: reduce) {
	.bloom,
	.bloom * {
		transition: none;
		animation: none;
		scroll-behavior: auto;
	}
}

/* Phones: the board borrows a little of the card's padding, so an 8 x 8 tile stays at least 40 px wide at 390 px. */
@media (max-width: 420px) {
	.bloom-stage {
		width: auto;
		margin-left: -.5rem;
		margin-right: -.5rem;
	}
}
