/*
	This file was created by running 

	```
	deno --allow-read --allow-write ./scripts/build.ts
	```

	All of the source code here corresponds to the files ending in `.css` that
	were found in the `./styles` directory.
*/

/*
	styles/body.css
*/
body {
	padding: 0;
	margin: 0;
	font-family: 'Space Mono', monospace;
	--greeen: rgb(126, 252, 130);
	cursor: url(img/crosshairs_cursor.png) 17.5 17.5, auto;
}


/*
	styles/button.css
*/
button {
	margin: 10px 10px;
	font-family: 'Zen Dots', monospace;
	font-size: 1.75rem;
	width: auto;
	background-color: rgba(0, 0, 0, 0);
	color: #eee;
	border: 0;
	transition: color 400ms;
	text-transform: uppercase;
}

button:hover {
	cursor: url(img/crosshairs_cursor_active.png) 17.5 17.5, auto;

	color: var(--greeen);
}


/*
	styles/coverage.css
*/
#coverage {
	top: 1rem;
	right: 15px;
}

#coverage-display::before {
	content: 'COVERAGE'
}


/*
	styles/gl-canvas.css
*/
#gl-canvas {
	width: 100vw;
	height: 100vh;
	margin: 0;
	padding: 0;
	position: fixed;
	top: 0;
	left: 0;
}


/*
	styles/instructions.css
*/
#instructions {
	box-sizing: border-box;

	--info-panel-width: clamp(500px, 70%, 750px);
	--info-panel-height: clamp(400px, 80vh, 700px);
	width: var(--info-panel-width);
	height: var(--info-panel-height);
	position: fixed;
	z-index: 4;
	top: calc(100vh + 50px);
	left: calc(50vw - 0.5 * var(--info-panel-width));
	display: flex;
	flex-direction: column;
	justify-content: center;
	transition: transform 400ms ease-in-out;
	border: 2px solid;
	border-color: var(--greeen);
	border-radius: 15px;
	background-color: #000;
	color: white;
	padding: 10px;
}

#instructions-inner {
	overflow-y: scroll;
	padding: 1rem;
	display: flex;
	flex-direction: column;
}

#instructions table {
	width: min(100%, 550px);
	align-self: center;
}

#instructions tr {
	display: flex;
	flex-direction: row;
	justify-content: space-evenly;
	align-items: center;
}

#instructions td {
	flex-grow: 1;
	display: flex;
	flex-direction: row;
	justify-content: flex-end;
	align-items: center;
}

#instructions tr td:first-child {
	justify-content: flex-start;
}

#instructions-return-button {
	position: absolute;
	bottom: -60px;
	right: 0;
	border-bottom: 2px solid var(--greeen);
}

.red {
	color: rgb(189, 0, 0);
}


/*
	styles/key.css
*/
.key {
	width: 30px;
	height: 30px;
	text-align: center;
	padding: 3px;
	text-transform: uppercase;
	border: 1px white solid;
	color: white;
	border-radius: 3px;
	font-size: 24px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	position: relative;
	transition: all 400ms;
	top: 0;
	margin: 5px;
}

.key::after {
	width: 30px;
	height: 30px;
	position: absolute;
	border-bottom: 1px white solid;
	border-right: 1px white solid;
	border-left: 1px white solid;
	border-radius: 4px;
	padding: 5px;
	content: '';
	bottom: -5px;
}

.key:hover {
	cursor: url(img/crosshairs_cursor_active.png) 17.5 17.5, auto;

	top: 2px;
	color: var(--greeen);
}

.key.esc {
	width: 50px;
	margin-right: 50px;
}
.key.esc::after {
	width: 50px;
}

.key.space {
	width: 160px;
}
.key.space::after {
	width: 160px;
}

.key.q:hover {
	color: rgb(74, 216, 255);
}


/*
	styles/lose-screen.css
*/
#lose-screen {
	box-sizing: border-box;

	--lose-screen-width: clamp(300px, 70%, 550px);
	--lose-screen-height: clamp(200px, 80%, 300px);
	width: var(--lose-screen-width);
	height: var(--lose-screen-height);
	position: fixed;
	z-index: 4;
	top: calc(100vh + 50px);
	left: calc(50vw - var(--lose-screen-width) / 2);
	display: flex;
	flex-direction: column;
	justify-content: center;
	transition: transform 400ms ease-in-out;
	border: 2px solid;
	border-color: var(--greeen);
	border-radius: 15px;
	background-color: #000;
	color: white;
	padding: 1rem;
	font-size: 1.1rem;
}

#lose-screen h1 {
	font-size: 2;
	text-align: center;
	padding-bottom: 0;
	font-family: "Zen Dots";
}

#lose-screen p {
	padding: 1rem;
}

#lose-screen-return-button {
	position: absolute;
	bottom: -60px;
	right: 0;
	border-bottom: 2px solid var(--greeen);
}


/*
	styles/menu.css
*/
#menu {
	box-sizing: border-box;

	--menu-height: clamp(200px, 60%, 560px);
	--menu-width: clamp(560px, 800px, 95vw);
	overflow-y: auto;
	width: var(--menu-width);
	height: var(--menu-height);
	position: fixed;
	z-index: 3.5;
	top: calc(50vh - 0.5 * var(--menu-height));
	left: calc(50vw - 0.5 * var(--menu-width));
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	transition: transform 400ms ease-in-out;
	border-top: 2px solid;
	border-bottom: 2px solid;
	border-color: #7efc82;
	backdrop-filter: blur(3px);
	background-color: rgba(0, 0, 0, 0.3);
	padding: 0;
	margin: 0;
}

#menu button {
	color: #aaa;
	transition: color 200ms;
}

#menu button:hover {
	color: #7efc82;
}

#heading {
	color: #fff;
	font-size: 4rem;
	text-transform: uppercase;
	font-weight: normal;
	margin-bottom: -0.5rem;
	margin-top: -0.5rem;
	font-family: "Zen Dots";
	background: linear-gradient(
		90deg,
		rgba(0, 0, 0, 0),
		#7efc82,
		rgba(0, 0, 0, 0)
	);
	background-repeat: no-repeat;
	background-size: 60%;
	animation: wave 4s linear infinite;
	background-clip: text;
	-webkit-background-clip: text;
	-webkit-text-fill-color: rgba(255, 255, 255, 0.3);
}

@keyframes wave {
	0% {
		background-position: -300%;
	}
	100% {
		background-position: 300%;
	}
}

#summary {
	color: #aaa;
	font-style: italic;
	text-align: center;
	max-width: 35ch;
}


/*
	styles/notifications.css
*/
#notifications-container {
	position: fixed;
	bottom: 0;
	right: 0;

	display: flex;
	flex-direction: column;
	padding: 1rem;

	color: white;

	--notification-container-width: min(300px, 50vw);
	width: var(--notification-container-width);
	height: auto
}

#notifications-container .notification {
	max-height: 150px;
	height: auto;
	border-top: 2px solid var(--greeen);
	border-bottom: 2px solid var(--greeen);
	padding: 1rem;
	background-color: rgba(0, 110, 255, 0.5);
	margin-bottom: 1rem;

	transition: all 400ms;
	overflow-y: hidden;
}

#notifications-container .notification.inactive {
	max-height: 0;
	padding: 0;
	border-width: 0;
	margin-bottom: 0;
}

#notifications-container .notification .key {
	margin: 0 auto;
	margin-top: 15px;
	margin-bottom: 5px;
	animation: 0.6s infinite alternate press-me;
}

@keyframes press-me {
	0% {
		margin-top: 18px;
		margin-bottom: 2px;
	}

	100% {
		margin-top: 12px;
		margin-bottom: 8px;
	}
}

/*
	styles/progress-bar.css
*/
/* 
	Container for all progress bars 
*/

.progress-bars {
	position: fixed;
	left: 0;
	bottom: 0;
	padding: 1rem;
	
	display: flex;
	flex-direction: column;
	align-items: first baseline;

	pointer-events: none;
}


/*
	Individual progress bars.
*/

.progress-bar {
	--width: 300px;
	--height: 30px;
	--outer-color: rgb(126, 252, 130);
	--inner-color: rgb(189, 78, 78);
	--caption-color: #fff;
	--number-color: rgb(255, 255, 255);
	--padding: 2px;
	--progress: 1.0;
	--caption: 'Caption';
	--caption-size: 2.2rem;
}

#survivor-progress-bar {
	--inner-color: rgb(189, 0, 0);
	--caption-color: var(--inner-color);
	--caption: 'Survivors';
	--progress: 0.8
}

#overdrive-progress-bar {
	--inner-color: rgb(74, 216, 255);
	--caption-color: var(--inner-color);
	--caption: 'Overdrive';
	--progress: 0.1;
}

#heat-progress-bar {
	--inner-color: rgb(74, 216, 255);
	--caption-color: #ccc;
	--caption: 'Cannon Temperature';
	--progress: 0.0;
}

.progress-bar {
	position: relative;

	background-color: rgba(0, 0, 0, 0);
	width: calc((var(--width) + 2 * var(--padding)));
	height: calc(var(--height) + 2 * var(--padding));
	border-left: 2px solid var(--outer-color);
	border-bottom: 2px solid var(--outer-color);

	margin-bottom: var(--caption-size);
}

.progress-bar::after {
	content: var(--caption);
	position: absolute;
	left: 5px;
	bottom: calc(-1 * var(--caption-size));
	font-family: 'Space Mono', monospace;
	font-size: 1.5rem;
	text-transform: uppercase;
	color: var(--caption-color);
}

.progress-bar .progress-bar-inner {
	background-color: var(--inner-color);

	position: absolute;
	bottom: var(--padding);
	left: var(--padding);
	height: calc(var(--height));
	width: 0;

	/* border-radius: 6px; */
}

.progress-bar .progress-bar-text {
	position: absolute;
	top: 0;
	right: 5px;
	background-color: rgba(0, 0, 0, 0);
	color: var(--number-color);
	text-shadow: 2px 2px 4px #000000;
	font-family: 'Space Mono', monospace;
	font-size: calc(var(--height) * 0.75);
}


/*
	styles/score.css
*/
#score {
	bottom: 1.5rem;
	right: 15px;
	display: none;
}

#score-display::before {
	content: 'SCORE';
}


/*
	styles/scrollbar.css
*/
::-webkit-scrollbar {
	width: 5px;
}

::-webkit-scrollbar-track {
	background: rgba(0, 0, 0, 0)
}

::-webkit-scrollbar-thumb {
	background-color: var(--greeen);
	border-radius: 10px;
	padding: 4px;
}

::-webkit-scrollbar-thumb:hover {
	background: rgba(0, 0, 0, 0);
}


/*
	styles/settings.css
*/
#settings {
	box-sizing: border-box;

	--settings-width: clamp(400px, 100%, 700px);
	--settings-height: clamp(200px, 80vh, 300px);
	width: var(--settings-width);
	height: var(--settings-height);
	position: fixed;
	z-index: 4;
	top: calc(100vh + 50px);
	left: calc(50vw - 0.5 * var(--settings-width));
	display: flex;
	flex-direction: column;
	justify-content: center;
	transition: transform 400ms ease-in-out;
	border: 2px solid;
	border-color: var(--greeen);
	border-radius: 15px;
	background-color: #000;
	color: white;
	padding: 1rem;

	font-size: 1.2rem;
}

#settings-return-button {
	position: absolute;
	bottom: -60px;
	right: 0;
	border-bottom: 2px solid var(--greeen);
}

#settings table {
	margin: 2rem;
}

#settings table tr td {
	padding: 1rem;
}

#difficulty-carousel {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;

	width: min(var(--settings-width), 250px);
	margin: 1rem auto;
}

#difficulty-carousel .arrow-button {
	width: 1rem;
	height: 1.5rem;
}

#difficulty-carousel .arrow-button:hover {
	cursor: url(img/crosshairs_cursor_active.png) 17.5 17.5, auto;
}

#difficulty-text {
	pointer-events: none;
	font-size: 1.5rem;
	text-transform: uppercase;
	width: 14ch;
	text-align: center;
}

#settings .slider {
	width: 100%;
	height: 100%;
}

#settings .slider::-webkit-slider-runnable-track {
	border: 3px solid var(--greeen);
	border-radius: 5px;
	padding: 2px;
	background-color: #eee;
}

#settings .slider::-webkit-slider-thumb {
	background-color: var(--green);
	border-radius: 100%;
	height: 10px;
	width: 10px;
}


/*
	styles/text-display.css
*/
.text-display {
	pointer-events: none;
	position: fixed;
	font-size: 2.5rem;
	color: white;
	z-index: 3;
}

.text-display span {
	position: relative;
}

.text-display span::before {
	pointer-events: none;
	position: absolute;
	bottom: -1.5rem;
	right: 0px;
	font-size: 1.5rem;
	content: 'SCORE';
}


/*
	styles/time-remaining.css
*/
#time-remaining {
	top: 1rem;
	left: 15px;
	font-size: 4rem;
	width: 10rem;
	font-family: 'Space Mono', monospace;
}

#time-remaining-display::before {
	font-family: 'Space Mono', monospace;
	content: 'TIME UNTIL EVAC.';
	bottom: -4rem;
}


/*
	styles/win-screen.css
*/
#win-screen {
	box-sizing: border-box;

	--win-screen-width: clamp(400px, 70%, 600px);
	--win-screen-height: clamp(200px, 80vh, 250px);
	width: var(--win-screen-width);
	height: var(--win-screen-height);
	position: fixed;
	z-index: 4;
	top: calc(100vh + 50px);
	left: calc(50vw - var(--win-screen-width) / 2);
	display: flex;
	flex-direction: column;
	justify-content: center;
	transition: transform 400ms ease-in-out;
	border: 2px solid;
	border-color: var(--greeen);
	border-radius: 15px;
	background-color: #000;
	color: white;
	padding: 10px;
}

#win-screen img {
	max-width: 50%;
	min-width: 150px;
	height: auto;
	margin: 0 auto;
}

#win-screen h1 {
	font-size: 2;
	text-align: center;
	font-family: "Zen Dots";
}

#win-screen table {
	padding: 1rem;
	margin: 1rem;
	font-size: 1.4rem;
}

#win-screen-return-button {
	position: absolute;
	bottom: -60px;
	right: 0;
	border-bottom: 2px solid var(--greeen);
}

