@keyframes dd-animate {
	0% {
		display: block;
		position: absolute;
	}

	50%,
	100% {
		top: 50%;
		left: 50%;
		width: 100%;
		height: 100%;
		transform: translate(-50%, -50%) rotateX(360deg);
	}
}

@keyframes timer-animate {
	0% {
		display: block;
		height: 100%;
	}
	100% {
		height: 0;
	}
}

#cover-div {
	position: absolute;
	height: 100%;
	width: 100%;
	top: 0;
	left: 0;
	padding: 1em;
	background-color: white;
	z-index: 10;
}

.game-board,
.live-clue-display,
.fj-response-div {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	grid-template-rows: repeat(6, 1fr);
}

.game-container[data-round='1'],
.board-display-container[data-round='1'] {
	.category-hidden {
		background-image: url('/img/cat_header_1.jpg');
	}
}
.game-container[data-round='2'],
.board-display-container[data-round='2'] {
	.category-hidden {
		background-image: url('/img/cat_header_2.jpg');
	}
}

.game-container[data-round='fj'],
.board-display-container[data-round='fj'] {
	.category-hidden {
		background-image: url('/img/fj.jpg');
	}
}

.category-box.category-hidden {
	background-repeat: no-repeat;
	background-size: contain;
	background-position: center;
	.category-div {
		display: none;
	}
}

.game-container {
	.game-board {
		width: 100%;
		height: 100%;
		text-shadow: 2px 2px #000;

		.clue-box,
		.category-box {
			background-color: var(--blue);
			color: var(--white);
			border: 1px solid var(--white);
		}

		.clue-box {
			font-family: 'Swiss 911 Compressed', serif;
			text-align: center;
			display: flex;
			padding: 10%;
			color: var(--yellow);
			cursor: pointer;

			.clue-value {
				margin: auto;
			}
			@media (max-aspect-ratio: 0.89) {
				.clue-value {
					font-size: 4.5vw;
				}
			}
			@media (aspect-ratio > 0.89) {
				.clue-value {
					font-size: 4.5vh;
				}
			}
		}
		.category-box {
			display: flex;
			flex-direction: column;
			padding: 0 5%;
			text-shadow: 2px 2px #000;

			.category-div {
				font-family: 'Swiss 911 Compressed', sans-serif;
				margin: auto;
				text-align: center;
				text-transform: uppercase;
			}
			.comment-div {
				font-family: 'Korinna Regular BT', serif;
				text-transform: uppercase;
			}
			@media (max-aspect-ratio: 0.89) {
				.category-div {
					font-size: 2.2vw;
				}
			}
			@media (aspect-ratio > 0.89) {
				.category-div {
					font-size: 2vh;
				}
			}
		}

		.dd-div {
			width: 16%;
			height: 16%;
			transform: translate(-50%, -50%);
			position: absolute;
			display: none;
			background-image: url('/img/dd.jpg');
			background-color: var(--blue);
			background-repeat: no-repeat;
			background-size: contain;
			background-position: center;
			z-index: 3;
		}

		.dd-div.animation {
			display: block;
			animation-name: dd-animate;
			animation-duration: 3s;
		}
	}
}
.live-clue-display {
	text-shadow: 2px 2px #000;

	div {
		color: white;
		background-color: var(--blue);
		text-align: center;
		text-transform: uppercase;
		display: flex;
	}

	.side-light {
		background-color: var(--dk-gray);
		grid-row: 1/7;
		display: flex;
		.side-light-inner {
			display: none;
			margin: auto;
			width: 100%;
		}
	}

	.side-light-left {
		grid-column: 1;
	}
	.side-light-right {
		grid-column: 6;
	}
	.category-display {
		grid-row: 1;
		grid-column: 2/6;
		font-family: 'Swiss 911 Compressed', sans-serif;
		border: 1px solid white;
	}
	.value-display {
		grid-row: 2;
		grid-column: 2/6;
		font-family: 'Swiss 911 Compressed', sans-serif;
		border: 1px solid white;

		.value-text {
			color: var(--yellow);
		}
	}
	.clue-display {
		grid-row: 3/7;
		grid-column: 2/6;
		padding: 5%;
		border: 1px solid white;

		font-family: 'Korinna Regular BT', serif;
	}

	.response-display {
		display: none;
	}

	@media (max-aspect-ratio: 0.89) {
		.clue-display,
		.value-display,
		.category-display {
			font-size: 7vw;
		}
	}
	/*
		viewport is wide enough to fit everything - font size determined by the height of the window
	*/
	@media (aspect-ratio > 0.89) {
		.clue-display,
		.value-display {
			font-size: 3.5vh;
		}
		.category-display {
			font-size: 3.5vh;
		}
	}
}

.live-clue-display.live {
	.side-light-left,
	.side-light-right {
		/* background-color: var(--white); */
		.side-light-inner {
			display: block;
			background-color: var(--white);
			animation-name: timer-animate;
			animation-timing-function: linear;
		}
	}
}

.category-scroll-container {
	overflow: hidden;
	background-color: var(--blue);
}
.category-scroll {
	width: 600%;
	height: 100%;
	position: absolute;
	left: 0;
	transition: left 0.5s;
	overflow: hidden;
	display: flex;
	flex-direction: row;
	font-family: 'Swiss 911 Compressed', sans-serif;
	text-shadow: 2px 2px #000;

	.category-box {
		height: 100%;
		width: 16.667%;
		background-color: var(--blue);
		color: white;
		/* display: flex; */
		padding: 1%;
		align-content: center;
		.category-div,
		.comment-div {
			width: 100%;
			margin: auto;
			text-align: center;
			text-transform: uppercase;
		}

		.comment-div {
			font-family: 'Korinna Regular BT', serif;
		}

		.category-div {
			font-size: min(72px, 12vw);
		}
	}

	.category-box:has(.comment-div:not(:empty)) {
		.category-div {
			font-size: min(36px, 6vw);
		}
		.comment-div {
			font-size: min(24px, 4vw);
		}
	}

	.category-box.category-hidden {
		.category-div,
		.comment-div {
			display: none;
		}
	}
}

.lecterns {
	flex: 1;
	display: flex;
	justify-content: space-between;
	margin-top: 1em;
	.lectern.control {
		border-bottom: 4px solid var(--white);
	}
	.lectern {
		width: 31%;
		display: flex;
		flex-direction: column;
		justify-content: flex-start;
		.timer {
			margin: 0 auto;
			width: 55%;
			display: flex;
			flex-direction: row;
			.timer-light {
				flex: 1;
				height: 100%;
				border: 1px solid var(--lt-gray);
				background-color: #332c42;
			}
		}
		.light {
			background-image: url('/img/light-bg.png');
			background-repeat: no-repeat;
			background-position: 0 0;
			background-size: 105% 105%;
		}

		.lectern-body {
			color: white;
			flex: 1;
			display: flex;
			flex-direction: row;
			border-top: 3px solid var(--lt-gray);
			.lectern-center > div {
				border-top: 1px solid black;
				box-sizing: border-box;
			}
			.lectern-center {
				width: 55%;
				display: flex;
				flex-direction: column;
				border: 3px solid black;
				box-sizing: border-box;
				.score-display {
					height: 20%;
					background-color: var(--blue);
					font-family: Arial, Helvetica, sans-serif;
					font-weight: bold;
					text-align: center;
				}
				.score.neg {
					color: red;
				}
				.score.neg::before {
					content: '-';
					color: red;
					margin-right: 0.1em;
				}

				.light-top {
					height: 13.33%;
				}

				.light-bottom {
					flex: 1;
				}
				.name-display {
					background-color: var(--blue);
					text-align: center;
				}
				.name-container {
					max-width: 100%;
					overflow-wrap: break-word;
					cursor: pointer;
				}
			}
			.lectern-right,
			.lectern-left {
				position: relative;
				flex: 1;
				display: flex;
				flex-direction: column;
				justify-content: end;
				background: linear-gradient(to right, var(--brown-1), var(--brown-2));
				.lectern-image {
					border-image: linear-gradient(to left, #fff, #999) 5;
					border-width: 2px;
					border-style: solid;
					height: 67%;
					width: 90%;
					background-repeat: no-repeat;
					background-size: cover;
				}
			}
			.lectern-left > .lectern-image {
				background-image: url('/img/lectern-left.png');
			}
			.lectern-right {
				.lectern-image {
					background-image: url('/img/lectern-right.png');
				}
				-webkit-transform: scaleX(-1);
				transform: scaleX(-1);
			}
			.lectern-left::before,
			.lectern-right::before,
			.lectern-left::after,
			.lectern-right::after {
				content: '';
				width: 90%;
				height: 2.3%;
				position: absolute;
				left: 0%;
				z-index: 2;
				background-color: white;
				border-radius: 0 2px 2px 0;
			}

			/*
				viewport is tall and narrow, and font size will be determined by the width of the window
			*/
			@media (max-aspect-ratio: 0.89) {
				.name-display {
					font-size: 2vw;
				}
				.score-display {
					font-size: 2.8vw;
				}
			}
			/*
				viewport is wide enough to fit everything - font size determined by the height of the window
			*/
			@media (aspect-ratio > 0.89) {
				.name-display {
					font-size: 2vh;
				}
				.score-display {
					font-size: 2.75vh;
				}
			}

			.lectern-left::before,
			.lectern-right::before {
				top: 10%;
			}
			.lectern-left::after,
			.lectern-right::after {
				top: 20%;
			}
		}
	}
	.lectern.lit {
		.light {
			background-image: unset;
			background-color: white;
		}
	}
	.lectern.lit[data-time='4'] {
		.timer-light {
			background-color: red;
		}
	}
	.lectern.lit[data-time='3'] {
		.timer-light[data-time='3'],
		.timer-light[data-time='2'],
		.timer-light[data-time='1'],
		.timer-light[data-time='0'] {
			background-color: red;
		}
	}
	.lectern.lit[data-time='2'] {
		.timer-light[data-time='2'],
		.timer-light[data-time='1'],
		.timer-light[data-time='0'] {
			background-color: red;
		}
	}
	.lectern.lit[data-time='1'] {
		.timer-light[data-time='1'],
		.timer-light[data-time='0'] {
			background-color: red;
		}
	}
	.lectern.lit[data-time='0'] {
		.timer-light[data-time='0'] {
			background-color: red;
		}
	}
}

.fj-category {
	width: 100%;
	height: 100%;
	align-content: center;
	font-family: 'Swiss 911 Compressed', sans-serif;
	text-shadow: 2px 2px #000;

	.category-box {
		height: 100%;
		width: 100%;
		background-color: var(--blue);
		color: var(--white);
		border: 1px solid var(--white);
		padding: 5%;
		display: flex;
		.category-div {
			margin: auto;
			text-align: center;
			text-transform: uppercase;
		}
	}

	.category-div {
		font-size: min(12vw, 72px);
	}
}

div.fj-prefix {
	text-wrap: nowrap;
	margin-right: 1em;
}

.fj-response-div {
	width: 100%;
	height: 100%;
	.fj-response-display,
	.fj-wager-display {
		display: flex;
		font-family: 'Shadows Into Light Two', cursive;
		font-weight: 400;
		font-style: normal;
		background-color: var(--blue);
		color: white;
	}
	.fj-response-display {
		grid-column: 2/6;
		grid-row: 2/4;
	}
	.fj-wager-display {
		grid-column: 2/6;
		grid-row: 4/6;
	}

	.display-inner {
		height: 0%;
		width: 100%;
		padding: 5%;
		text-align: center;
		margin: auto;
	}

	.display-inner.animate {
		transition: 0.5s;
	}

	.display-inner.revealed {
		height: 100%;
	}

	.display-inner {
		font-size: min(18px, 3vw);
	}
}
