/* ================================== Page Areas ======================== */

body {
	overscroll-behavior-block: none;
}

.pageContainer {
	display: grid;
	/* position: relative; */
	grid-template-columns: 1fr;
	grid-template-rows: 50px 1fr 50px;
	width: 100vw;
	max-width: 1200px;
	height: 100vh;
	max-height: -moz-available;
	max-height: -webkit-fill-available;
	max-height: fill-available;
	margin: 0 auto;
	/* padding: 0 10px; */
	/* overflow-x: hidden; */
	overflow: hidden;
}

.pageContainer nav {
	background-color: burlywood;
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
}

.pageContainer .navLeft {
	margin-left: 10px;
}

.pageContainer .navRight {
	margin-right: 5px;
}

.pageContainer .navCenter {
	font-weight: 800;
	font-size: 1.25rem;
	padding: 0 0.25rem;
}

.pageContainer nav > *:last-child {
	text-align: right;
}

.pageContainer main {
	background-color: cadetblue;
	overflow-x: auto;
	padding: 0 10px;
}

.pageContainer footer {
	background-color: burlywood;
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
}

.pageContainer footer > div {
	padding: 0 8px;
}

.pageContainer .footerCenter {
	text-align: center;
}

.pageContainer footer > *:last-child {
	text-align: right;
}

/* ====================================== Tables ================================ */
.players {
	margin: 3px auto;
	border-collapse: collapse;
	overflow-x: auto;
	overflow-y: auto;
	user-select: none;
}

.players.twoPlayers {
	font-size: 1.5rem;
}

.players.threePlayers {
	font-size: 1.25rem;
}

.players thead {
	position: sticky;
	top: 0px;
}

.players th,
.players td {
	border: 2px solid #000;
	text-align: center;
	min-width: 7ch;
	padding: 0 0.8rem;
	white-space: nowrap;
}

.players tr > :first-child {
	min-width: 2ch;
	background-color: rgb(64, 224, 208);
}

.tablePlayerName {
	position: relative;
	background-color: black;
	color: white;
}

.tablePlayerName .ranking {
	position: absolute;
	top: 0;
	right: 0;
	font-size: 0.8em;
	color: white;
	line-height: 0.8em;
	background-color: green;
	padding: 0.25em;
	border-radius: 50%;
}

.players thead > :nth-child(2) {
	font-weight: 900;
	font-size: 1.25em;
	color: green;
}

.players td {
	background-color: rgb(202, 202, 202);
}

.players td.lowlightCell {
	color: white;
	background-color: rgba(184, 67, 67);
}

.players td.highlightCell {
	color: inherit;
	background-color: rgb(238, 238, 87);
}

.players tr .tableBlankCell {
	background-color: black;
	/* border: none; */
}

.backgroundFlash {
	animation-name: flashBackground;
	animation-duration: 500ms;
	animation-delay: 100ms;
	animation-timing-function: ease-out;
	animation-iteration-count: 1;
}

@keyframes flashBackground {
	50% {
		background-color: white;
	}
}

/* =================================== Slide out Menu ========================================== */
.slideOutMenu {
	position: fixed;
	top: 0;
	line-height: 3rem;
	transform: translateX(-100%);
	position: fixed;
	top: 0;
	color: rgb(248, 248, 248);
	background-color: rgba(0, 0, 0, 0.8);
	padding: 1rem 0;
	transition: transform 500ms ease-in-out;
	border-top: 2px solid rgba(0, 0, 0, 0.9);
	border-bottom: 2px solid rgba(0, 0, 0, 0.9);
	border-left: 2px solid rgba(0, 0, 0, 0.9);
	border-radius: 0px 20px 20px 0px;
}

.slideOutMenuShow {
	transform: translateX(0%);
}

.slideOutMenu .closeBtnContainer {
	text-align: right;
}

.slideOutMenu .slideOutCloseBtn {
	height: 2rem;
	width: auto;
	margin-right: 1rem;
}

.slideOutMenu .slideOutMenuItems > * {
	display: block;
	padding: 0 1.5rem;
	border: none;
	background: transparent;
	color: lightgray;
	font-size: 1.2rem;
	font-weight: bolder;
	margin: 0 0 0 auto;
	text-align: right;
}

.slideOutMenu .slideOutMenuItems > *:hover {
	color: white;
}

.slideOutToggleBtn {
	color: rgba(0, 0, 0, 0.55);
	height: 30px;
	width: auto;
}

.slideOutMenu input[type="checkbox"] {
	width: 1.5rem;
	height: 1.5rem;
}

/* ============================================================================ */
/* ========================= Dot Counter ====================================== */
/* ============================================================================ */

/* =================== Dot Counter Container =================================== */

#dotCounter {
	height: 100%;
	display: grid;
	grid-template-columns: 1fr;
	grid-template-rows: 1fr auto auto;
}

/* #dotCounter > * {
	border: 3px solid red;
} */

/* ==================== Dot Counter Image ======================================= */

#dotCounter #dcImage {
	position: relative;
}

#dotCounter #dcImage > video,
canvas {
	object-fit: contain;
	width: 100%;
	border: 2px solid white;
	margin-top: 0.5rem;
}

#dotCounter #dcImage .imgHint {
	position: absolute;
	top: 15px;
	left: 5px;
	padding: 0 5px;
	background-color: rgba(245, 245, 95, 0.3);
	/* font-weight: bold; */
	color: rgba(0, 0, 0, 0.5);
	border-radius: 5px;
}

/* ================== Dot Counter Controls ====================================== */

#dotCounter #dcControl {
	display: grid;
	grid-template-columns: auto auto auto;
	gap: 2px;
}

#dotCounter #dcControl button {
	background-color: rgb(86, 86, 194);
	color: white;
	font-weight: bold;
	font-size: 1.5rem;
}

#dotCounter #dcControl button.btnIcon {
	font-size: 2.5rem;
}

#dotCounter #dcCameraSelect {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 2px;
	margin-top: 1rem;
}

#dotCounter #dcCameraSelect button.btnIcon {
	font-size: 1.5rem;
}

#dotCounter #dcCameraSelect select,
button {
	background-color: rgb(86, 86, 194);
	color: white;
	font-weight: bold;
}

#dotCounter #dcControl #numDotsFound {
	text-align: center;
	font-size: 2rem;
	font-weight: bold;
}

/* ============================================================================================== */
/* ================================== Calc. Number Input ======================================== */
/* ============================================================================================== */

#calcNumInputBackdrop {
	display: flex;
	align-items: center;
	justify-content: center;
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background-color: rgba(0, 0, 0, 0.5);
	transition: 300ms;
	overflow: hidden;
}

#calcNumInput {
	width: 80%;
	min-width: 250px;
	max-width: 350px;
	background-color: darkturquoise;
	padding: 8px;
	border: 5px solid white;
	border-radius: 10px;
}

/* ================================== Calculator Input Display ================================= */

#calcNumInput .display .equation {
	height: 30px;
	line-height: 30px;
	text-align: right;
	margin-bottom: 2px;
	color: white;
	background-color: black;
	border-top-left-radius: 3px;
	border-top-right-radius: 3px;
	padding: 0 5px;
}

#calcNumInput .display .result {
	height: 50px;
	line-height: 50px;
	text-align: right;
	margin-bottom: 10px;
	color: white;
	background-color: black;
	font-size: 2.25rem;
	font-weight: bold;
	border-bottom-left-radius: 3px;
	border-bottom-right-radius: 3px;
	padding: 0 5px;
}

/* ================================== Calculator Input Keyboard ================================= */

#calcNumInput .keyboard {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	grid-template-rows: repeat(5, minmax(50px, auto));
	gap: 8px;
}

#calcNumInput .keyboard > * {
	display: inline-flex;
	color: white;
	background-color: darkslateblue;
	align-items: center;
	justify-content: center;
	text-align: center;
	border-radius: 3px;
	font-size: 1.5rem;
}

#calcNumInput .keyboard > *:active {
	background-color: dodgerblue;
}

#calcNumInput .keyOK {
	grid-row: 2 / 6;
	grid-column: 5 / 6;
}

#calcNumInput .keyDotCounter {
	grid-column: 1 / 5;
	display: flex;
	justify-content: space-around;
}

/* So the svg or spans will not catch the click and it will fall to the button */
#calcNumInput .keyboard svg,
span {
	pointer-events: none;
}

/* =================================== Open From Database ========================================== */
.showDbList.backdrop {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	display: grid;
	place-items: center;
	background-color: rgba(0, 0, 0, 0.5);
	overflow: hidden;
	transform: scale(0);
	transition: 300ms;
}

.showDbList.backdrop.show {
	transform: scale(1);
}

.showDbListCard {
	max-width: 90vw;
	max-height: 80vh;
	background-color: lightgray;
	padding: 0.25rem;
	border-radius: 0.25rem;
	border: 2px solid black;
	overflow: auto;
}

.showDbListCard .header {
	font-size: 1.5rem;
	font-weight: bolder;
	text-align: center;
}

.showDbListCard .body {
	overflow: auto;
}

.showDbListCard .footer {
	text-align: right;
}

.showDbListCard table {
	margin: 3px auto;
	border-collapse: collapse;
	overflow: auto;
	user-select: none;
}

.showDbListCard thead {
	position: sticky;
	top: 0px;
}

.showDbListCard th,
.showDbListCard td {
	border: 2px solid #000;
	text-align: center;
	/* min-width: 7ch; */
	padding: 0 0.25rem;
	white-space: nowrap;
}

.showDbListCard th {
	background-color: black;
	color: white;
}

.showDbListCard tbody tr {
	background-color: white;
	color: black;
}

.showDbListCard tbody tr.selected {
	background-color: yellow;
}

.showDbListCard td {
	background-color: inherit;
	color: black;
}

.showDbListCard td span.winner {
	text-decoration: underline;
}
