/*
 * This program is free software: you can redistribute it and/or modify it under
 * the terms of the GNU Affero General Public License version 3 as published by
 * the Free Software Foundation.
 * 
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
 * more details.
 * 
 * You should have received a copy of the GNU Affero General Public License
 * along with this program. If not, see <https://www.gnu.org/licenses/>.
 * 
 */
@font-face {
	font-family: neon;
	src: url('public/fonts/PPRightGrotesk-TightRegular.woff2');
}
body {
	background-color: #110033;
	color: white;
	font-family: sans-serif;
	
	--unknown-color: #bc13fe;
	--active-color: #13bc4c;
	--shelved-color: #eb164c;
}
h1 {
	margin: 0 0 0.35em 0;
	padding: 0;
	text-align: center;
	font-family: neon;
	font-size: 12em;
	text-transform: uppercase;
	
	color: #ffffff;
/*		animation: h1-glow-unknown 6s infinite;
		animation-timing-function: ease;*/
	text-shadow:
	  0 0 2px #fff,
	  0 0 6px #fff,
	  0 0 10px #bc13fe,
	  0 0 20px #bc13fe,
	  0 0 40px #bc13fe,
	  0 0 80px #bc13fe,
	  0 0 120px rgba(188, 19, 254, 0.9);

	animation: h1-flicker 5s infinite;
}
label {
	display: block;
}
input[type='password'] {
	display: block;
	font-family: monospace;
	font-size: 2.5em;
	padding: 0.8em;
	background-color: transparent;
	border: 1px solid #ffffff;
	border-radius: 7px;
	color: #49e6fb;
	box-sizing: content-box;
	box-shadow: 
      0 0 4px #49e6fb,
      0 0 1px #49e6fb,
      0 0 2px #49e6fb,
      0 0 8px #49e6fb,
      0 0 9px #49e6fb,
      0 0 10px #49e6fb,
	    inset 0 0 4px #49e6fb,
	    inset 0 0 10px #49e6fb;
}
button {
	display: block;
	width: 100%;
	background-color: transparent;
	border: 3px solid #ff6700;
	border-radius: 5px;
	padding: 0.8em;
	color: #ff6700;
	font-size: 2.5em;
	text-transform: uppercase;
}

#vm {
	position: fixed;
	inset: 0px;
	width: fit-content;
	height: fit-content;
	max-width: 100vw;
	max-height: 100vh;
	margin: auto;
}
#control {
	border: 4px solid var(--unknown-color);
	border-radius: 2em;
	padding: 2em;
  animation: box-glow 2.8s infinite ease-in-out;
}
#identify {
	margin-top: 0.4em;
}
#status-line {
	width: 100%;
	height: 4px;
	margin: 6em auto 1em auto;
}
#status-text {
	color: white;
	text-align: center;
	letter-spacing: 1em;
	text-transform: uppercase;
	font-size: 1.3em;
	font-weight: bold;
	margin-bottom: 2em;
}

/* States */
/* Unknown state */
#vm[data-state="unknown"] {
	#control {
		border: 2px solid var(--unknown-color);

		box-shadow:
		  0 0 5px var(--unknown-color),
		  0 0 10px var(--unknown-color),
		  0 0 20px var(--unknown-color),
		  0 0 40px rgba(188, 19, 254, 0.8),
		  inset 0 0 20px rgba(188, 19, 254, 0.8);
	}
/*	#control {
		border-color: #cccccc;
		animation: box-glow-unknown 12s infinite;
		animation-timing-function: ease;
	}*/
	
	#instance {
		display: none;
		opacity: 0;
		scale: 0;
		width: 0;
	}
}

/* Active state */
#vm[data-state="active"] {
	#control {
		border: 2px solid var(--active-color);
		
		box-shadow: 0 0 .2rem #fff,
								0 0 .2rem #fff,
								0 0 2rem #13bc4c,
								0 0 0.8rem #13bc4c,
								0 0 2.8rem #13bc4c,
								inset 0 0 1.3rem #13bc4c;
	
		#status-line {
		animation: status-line-active-flicker 2s infinite alternate;
			background: #2bff2b;

			box-shadow:
			  0 0 5px #2bff2b,
			  0 0 10px #2bff2b,
			  0 0 20px #2bff2b,
			  0 0 40px #00ff00,
			  0 0 80px #00ff00;
		}
		
		#status-text {
			color: var(--active-color);
		}
		#unshelve {
			display: none;
		}
	}
}
/* Shelving state */
/* Shelved offloaded state */
#vm[data-state="shelved"] #control {
  border: 2px solid #ff3333;
  box-shadow:
    0 0 5px #fff,
    0 0 10px #ff3333,
    0 0 20px #ff0000,
    0 0 40px rgba(255, 0, 0, 0.7),
    inset 0 0 10px rgba(255, 0, 0, 0.5);
	
	#status-line {
		animation: status-line-shelved-flicker 2s infinite alternate;
		background: #ff2b2b;

		box-shadow:
		  0 0 5px #ff2b2b,
		  0 0 10px #ff2b2b,
		  0 0 20px #ff2b2b,
		  0 0 40px #ff0000,
		  0 0 80px #ff0000;
	}
	#status-text {
		color: red;
	}
	#shelve {
		display: none;
	}
}

/* Animations */
@keyframes box-glow {
	0%, 100% {
		filter: brightness(1);
	}

	50% {
		filter: brightness(1.25);
	}
}

@keyframes h1-flicker {
	0%, 97%, 98%, 98.6%, 99.2%, 100% {
		opacity: 1;
	}
	97.5% {
		opacity: 0.4;
	}
	98.3% {
		opacity: 0.2;
	}
	99% {
		opacity: 0.7;
	}
}

@keyframes status-line-shelved-flicker {
	0%, 100% {
		opacity: 1;
		box-shadow:
		  0 0 5px #ff2b2b,
		  0 0 10px #ff2b2b,
		  0 0 20px #ff2b2b,
		  0 0 40px #ff0000,
		  0 0 80px #ff0000;
	}
	50% {
		opacity: 0.85;
		box-shadow:
		  0 0 3px #ff2b2b,
		  0 0 6px #ff2b2b,
		  0 0 12px #ff2b2b,
		  0 0 24px #ff0000,
		  0 0 48px #ff0000;
	}
}

@keyframes status-line-active-flicker {
	0%, 100% {
		opacity: 1;
		box-shadow:
		  0 0 5px #2bff2b,
		  0 0 10px #2bff2b,
		  0 0 20px #2bff2b,
		  0 0 40px #00ff00,
		  0 0 80px #00ff00;
	}
	50% {
		opacity: 0.85;
		box-shadow:
		  0 0 3px #2bff2b,
		  0 0 6px #2bff2b,
		  0 0 12px #2bff2b,
		  0 0 24px #00ff00,
		  0 0 48px #00ff00;
	}
}
