* {
	padding: 0;
	margin: 0;
	box-sizing: border-box;
}

html,
body {
	font-family: Arial, Helvetica, sans-serif;
}

img {
	float: left;
	/* border: 2px solid black; */
	margin: 0.5rem;
	max-width: 50%;
}

ul {
	margin: 0 0 0 1rem;
}

li {
	list-style-type: square;
	/* list-style-position: inside; */
}

.container {
	display: grid;
	grid-template-rows: auto auto auto minmax(200px, 1fr);
	padding: 0.5em;
	max-width: 850px;
	margin-left: auto;
	margin-right: auto;
	max-height: 100dvh;
	/* overflow: hidden; */
}

header {
	color: white;
	background-color: black;
	text-align: center;
	margin-bottom: 0.25rem;
}

.instructionWrapper {
	border: 1px solid;
	padding: 0.5rem;
	width: fit-content;
}

.instructionWrapper:hover {
	cursor: pointer;
}

#gameBoard {
	display: grid;
	grid-template-rows: repeat(5, 1fr);
	grid-template-columns: repeat(9, 1fr);
	max-width: 500px;
	margin-left: auto;
	margin-right: auto;
	margin-top: 1rem;
	align-items: center;
	justify-content: center;
	/* row-gap: 10px; */
}

#gameBoard .peg {
	display: flex;
	justify-content: center;
	align-items: center;
	border: 2px solid black;
	border-radius: 9999px;
	aspect-ratio: 1/1;
	user-select: none;
}

#gameBoard .peg[data-selected] {
	border-style: dashed;
}

#gameBoard .peg[data-selected="1"] {
	background-color: yellow;
}

#gameBoard div:hover {
	cursor: pointer;
}

.resultFilterWrapper {
	display: grid;
	grid-template-columns: auto 1fr auto;
	/* gap: 1rem; */
	padding: 0.25rem;
	align-items: center;
}

.resultFilterWrapper .filterLabelWrapper,
.resultFilterWrapper .tableCountWrapper {
	text-wrap: nowrap;
}

.resultFilterWrapper #resultRange {
	margin: 0 0.25rem;
}

.resultWrapper {
	/* margin: 0 auto; */
	/* min-width: 100%; */
	overflow: auto;
}

#peg0 {
	grid-row: 1;
	grid-column: 5;
}

#peg1 {
	grid-row: 2;
	grid-column: 4;
}

#peg2 {
	grid-row: 2;
	grid-column: 6;
}

#peg3 {
	grid-row: 3;
	grid-column: 3;
}

#peg4 {
	grid-row: 3;
	grid-column: 5;
}

#peg5 {
	grid-row: 3;
	grid-column: 7;
}

#peg6 {
	grid-row: 4;
	grid-column: 2;
}
#peg7 {
	grid-row: 4;
	grid-column: 4;
}
#peg8 {
	grid-row: 4;
	grid-column: 6;
}
#peg9 {
	grid-row: 4;
	grid-column: 8;
}

#peg10 {
	grid-row: 5;
	grid-column: 1;
}
#peg11 {
	grid-row: 5;
	grid-column: 3;
}
#peg12 {
	grid-row: 5;
	grid-column: 5;
}
#peg13 {
	grid-row: 5;
	grid-column: 7;
}
#peg14 {
	grid-row: 5;
	grid-column: 9;
}

.btn {
	font-size: large;
	border-radius: 5px;
}

.btn:hover {
	cursor: pointer;
}

.btn-primary {
	background-color: blue;
	color: white;
	font-weight: bolder;
	padding: 10px;
}

.btn-primary:hover {
	background-color: darkblue;
}

.btn-danger {
	/* display: block; */
	width: 100%;
	background-color: red;
	color: white;
	font-weight: bolder;
	padding: 10px;
}

.btn-danger:hover {
	background-color: darkred;
}

table {
	border-collapse: collapse;
	margin: 0 auto;
}

table,
th,
td {
	border: 1px solid black;
	font-size: small;
}

th,
td {
	padding: 5px;
}

th {
	background-color: #297b2c;
	color: white;
}

td {
	/* white-space: nowrap; */
	text-wrap: balance;
}

tr:nth-child(even) {
	background-color: #f2f2f2;
}
/* Could not get this to work reliably */

/* This class is added to the even rows when the HTML is generated. */
.highlightRow {
	background-color: #f2f2f2;
}

table td.pegsRemaining,
table td.gameNumber {
	text-align: center;
	width: 10%;
}

table td.moveLog {
	width: 80%;
}

input[type="number"] {
	font-size: 1.25rem;
	width: 10ch;
	text-align: center;
}

label {
	font-size: 1.25rem;
}

.pegIn {
	background-color: lightslategrey;
	/* transition: background-color 0.2s ease-in; */
}

.pegOut {
	background-color: transparent;
	/* transition: background-color 0.75s ease-out; */
}

.pegOutSlow {
	background-color: transparent;
	animation-name: showMoveToPegOut;
	animation-duration: 2s;
}

.pegInSlow {
	background-color: slategrey;
	animation-name: showMoveToPegIn;
	animation-duration: 2s;
}

@keyframes showMoveToPegOut {
	from {
		background-color: slategrey;
	}
	to {
		background-color: transparent;
	}
}

@keyframes showMoveToPegIn {
	from {
		background-color: transparent;
	}
	to {
		background-color: slategrey;
	}
}

.lead {
	font-weight: bolder;
	font-size: 1.5rem;
	padding: 0.2rem;
	border-radius: 5px;
}

.lead.zeroMoves {
	background-color: red;
	color: white;
}
