:root {
	--theme-background-1:	#ddd;
	--theme-color-1: #444;
	--theme-color-2: #dd9933;
	--theme-color-3: #aaa;
	--theme-shadow: rgba(0, 0, 0, 0.3);
	--theme-color-primary-1: #dd9933;
	--navbar-height: 48px;
}

html{
	background-color: var(--theme-background-1);
}

body{
	margin: 0;
	padding: 0;
}

@font-face{
	font-family: Play;
	src: url(../static/play-r.ttf) format("truetype");
	font-weight: normal;
}
@font-face{
	font-family: Play;
	src: url(../static/play-b.ttf) format("truetype");
	font-weight: bold;
	
} 
@font-face{
	font-family: Ubuntu;
	src: url(../static/ubuntu-b.ttf) format("truetype");
	font-weight: bold;
} 
@font-face{
	font-family: Ubuntu;
	src: url(../static/ubuntu-ri.ttf) format("truetype");
	font-weight: italic;
} 
@font-face{
	font-family: Ubuntu;
	src: url(../static/ubuntu-bi.ttf) format("truetype");
	font-weight: bold italic;
}
@font-face{
	font-family: Ubuntu;
	src: url(../static/ubuntu-r.ttf) format("truetype");
	font-weight: normal;
}

.shadow{
	box-shadow: var(--theme-shadow) 0px 0px 7px;
}

.form_hover{
	position: relative;
	top: 0;
	outline: #ccc solid 1px;
	transition: 0.3s;
}
.form_hover:hover, .form_hover:active{
	box-shadow: rgba(0, 0, 0, 0.3) 0px 0px 7px;
}

#sidebar h4 > a, #sidebar h4 > a:visited{
	color: white;
}
#sidebar h4 > a:hover, #sidebar h4 > a:active{
	color: white;
	text-decoration: underline;
}
#website_notice{
	background-color: red;
	position: sticky;
	left: 0;
	right: 0;
	top: 0;
	color: white;
	text-align: center;
	z-index: 2;
}
#website_notice a, #website_notice a:active, #website_notice a:visited, #website_notice a:hover{
	color: white;
}

#page .container_float{
	margin: var(--navbar-height) auto; 
	height: auto; 
	padding: 1em;
	font-size: calc(var(--navbar-height) * 0.35);
	line-height: calc(var(--navbar-height) * 0.525);
}

#page .container_float.form_hover span{
	font-size: 0.85em;
}

#page h1 + .container_float, #page h1 + a > .container_float{
	margin-top: 64px;
}
#page .header_bar{
	background-color: #25876b;
	font-family: Play, Helvetica, Arial, sans-serif;
	font-weight: bold;
	color: white;
	text-transform: uppercase;
	margin: 12px 0 12px 0;
	padding: 4px 16px;
}

#page > #navigation{
	position: fixed;
	height: var(--navbar-height);
	background-color: var(--theme-color-2);
	width: 100%;
	z-index: 2; /* Keep on top of side bar */
	min-width: 512px;
}

#notification{
	width: 386px;
	top: 64px;
	position: fixed;
	right: -390px;
	background-color: #4CAF50;
	color: white;
	z-index: 3;
	cursor: pointer;
	
	transition: 1s;
}
#notification.active{
	right: 0;
}

#notification > center{
	word-wrap: break-word;
	font-family: Play, Helvetica, Arial, sans-serif;
	font-weight: bold;
	text-transform: uppercase;
	color: white;
	padding-top: 12px;
	padding-bottom: 12px;
	padding-left: 8px;
	padding-right: 8px;
	opacity: 0.8;
	font-size: 1.2em;
}

#navigation ul{
	font-family: Play, Helvetica, Arial, sans-serif;
	font-weight: bold;
	color: white;
	text-transform: uppercase;
	list-style-type: none;
	height: 100%;
	margin: 0px;
	padding: 0px;
}

#navigation > ul:nth-child(1){
	float: left;
}

#navigation > ul:nth-child(2){
	float: right;
}

#navigation > ul:nth-child(1) > li, .navigation_sub > ul > li{
	float: left;
	text-align: center;
	padding: 0 12px 0 12px;
	height: 100%;
}

#navigation > ul:nth-child(2) .navigation_sub > ul > li{
	float: right;
	text-align: center;
	padding: 0 12px 0 12px;
	height: 100%;
}

#navigation > ul:nth-child(2) > li, #navigation > ul:nth-child(2) .navigation_sub > ul:nth-child(2) > li{
	float: right;
	text-align: center;
	margin: 0 12px 0 12px;
	height: 100%;
}

#navigation .dropdown:hover > a, .navigation_sub a:hover{
	border-bottom: 2px solid white;
	padding-top: 2px;
}

#navigation a, #navigation a:hover, #navigation a:active, #navigation a:visited{
	display: block;
	color: white;
	text-decoration: none;
	text-align: center;
}

#navigation li.dropdown > a{
	display: flex;
	position: relative;
	top: 50%;
	transform: translateY(-50%);
}

#navigation{
	font-size: 1em;
	overflow: clip;
}

#navigation .navigation_sub{
	font-size: 0.85em;
}

#navigation #hamburger{
	display: flex;
	cursor: pointer; 
	width: 32px; 
	height: 32px; 
	margin: 8px 0 8px 0; 
	padding: 0;
	transition: 0.3s;
}
#navigation #hamburger.active{
	transform: rotate(-90deg);
}

#page p, #page ul, #page ol, #page form, #page label, #page table{
	color: var(--theme-color-1);
}

#content a, #content a:visited,
#sidebar a, #sidebar a:visited{
	color: var(--theme-color-primary-1);
	text-decoration: none;
	transition: 0.3s;
}

#content a:hover, #content a:active,
#sidebar a:hover, #sidebar a:active{
	color: orange;
}

#content pre{
	background-color: #eee;
	padding: 8px 12px 8px 12px;
	overflow: auto;
	cursor: text;
	outline: 1px solid #ccc;
}


.dropdown > .navigation_sub{
	visibility: hidden;
	position: fixed;
	float: none;
	width: 100%;
	background-color: #555;
	left: 0;
	top: 0;
	height: var(--navbar-height);
	z-index: -1;
	
	opacity: 0;
	transition: 0.1s;
	width: 1100px;
	left: 50%;
	transform: translateX(-50%);
}

.dropdown:hover > .navigation_sub{
	visibility: visible;
	
	top: var(--navbar-height);
	opacity: 1;
}

input, textarea{
	padding: 12px 20px;
	margin: 8px;
	border-radius: 3px;
	border: 1px solid #ccc;
	width: calc(100% - 56px);
	font-family: Ubuntu, Helvetica, Arial, sans-serif;
}

.button{
	font-family: Play, Helvetica, Arial, sans-serif;
	font-size: 1em;
	font-weight: bold;
	border: none;
	cursor: pointer;
	padding: 8px;
	margin: 8px;
	background-color: var(--theme-color-2);
	color: white;
	
	transition: 0.3s;
}
.button:hover{
	background-color: orange;
}

.button:disabled{
	background-color: #999 !important;
	cursor: auto;
}


#page h1, #page h2, #page h3, #page h4, #page h5, #page h6{
	color: var(--theme-color-1);
}

#page > #sidebar > table{
	table-layout: fixed;
	width: 100%;
	font-size: 0.85em;
	opacity: 0.9;
}
#page > #sidebar > table th, #page > #sidebar > table td{
	width: 50%;
}

#content .container_float p{
	font-size: 0.85em;
	opacity: 0.8;
	margin: 8px;
}

#content .container_float > .preview p{
	font-size: 1em;
	opacity:  1;
}

div.navigation_sub a{
	position: relative;
	top: 50%;
	transform: translateY(-50%);
}

/*-- MOBILE -- */
#page{
	width: 100%;
	min-width: 512px;
	display: inline-block;
	
	background-color: white;
	font-family: Ubuntu, Helvetica, Arial, sans-serif;
	font-weight: normal;
	min-height: 100vh;
	line-height: 1.5em;
	text-align: justify;
}
#page > #content{
	width: calc(100% - 4em);
	
	float: right;
	margin: 2em;
	padding-bottom: 2em;
	margin-top: var(--navbar-height);
}

#page > #sidebar{
	display: inline-block;
	margin-top: var(--navbar-height);
	margin-left: 0;
	margin-right: auto;
	padding-left: 1em;
	padding-right: 1em;
	opacity: 0;
	z-index: 1;
	
	background-color: #eee;
	height: calc(100% - var(--navbar-height));
	position: fixed;
	overflow: auto;
	left: calc(-300px - 2em);
	width: calc(300px - 2em);	

	transition: 0.3s;
}

/* When sidebar is visible in MOBILE mode: */
@media screen and (max-width: 1100px){
	#page > #sidebar.active{
		left: 0 !important;
		opacity: 1 !important;
	}
	:root{
		--navbar-height: 5vh;
	}	
	#navigation li.dropdown > a{
		font-size: calc(var(--navbar-height) * 0.4);
	}
	#page .body_align_center{
		width: 90%;
		margin: 0 auto;
	}
	#navigation #hamburger{
		width:	calc(var(--navbar-height) * 0.8); 
		height: calc(var(--navbar-height) * 0.8); 
		margin:	calc(var(--navbar-height) * 0.1) 0 8px 0; 
	}
	#page > #sidebar{
		left: -100%;
		width: 100%;
		font-size: 2em;	
	}
	.dropdown > .navigation_sub{
		width: 100%;
		margin: 0;
	}
	div.navigation_sub a{
		font-size: calc(var(--navbar-height) * 0.35);
	}
	/* Blackout content when navigation is open */
	#page > #navigation_blackout{
		visibility: hidden;
		opacity: 0;
		position: fixed;
		left: 0;
		right: 0;
		top: 0;
		bottom: 0;
		background-color: black;
		transition: visibility 0.3s, opacity 0.3s;
	}
	#page > #navigation_blackout.active{
		visibility: visible;
		opacity: 0.4 !important;
	}

	#page > #sidebar > table{
		border-spacing: 1em;
	}

	#page .header_bar{
		padding: 8px 32px;
	}
}

/* Used when we need a right-bar column on a page, make the post
 * an align left and the bar align right*/
#page .body_align_left{
	float: none;
	width: 90%;
	margin: 0 auto;
}

#page .body_align_right{
	float: none;
	width: 90%;
	margin: 0 auto;
}

#content *.warning{
	color: red ;
}

#content *.confirmed{
	color: green;
}

#content *.table_header_background{
	background-color: #eee;
}

#webgame_enable_focus{
		color: orange;
		cursor: pointer;
		width: 100%;
		text-align: center;
		margin: 1em 0;
		transition: 1s;
		opacity: 1;
		visibility: visible;
		transition: 
	}

/*-- DESKTOP --*/
@media screen and (min-width: 1100px){
	#page > #navigation_blackout{
		opacity: 0;
		visibility: hidden;
	}
	#page{
		display: block;
		width: 1100px;
		margin: 0 auto;
	}
	
	#page > #content{
		width: calc(800px - 4em);
		margin-right: 2em;
		margin-left: auto;
	}
	
	#page > #navigation{
		width: 1100px;
	}
	
	#navigation #hamburger{
		display: none;
	}
	
	#page > #sidebar{
		opacity: 1;
		left: auto;
	/*	width: 100%;*/
		width: calc(300px - 2em);
	}
	#page .body_align_left{
		float: left;
		width: 50%;
	}
	
	#page .body_align_right{
		float: right;
		width: 40%;
	}
	
	#page .body_align_left .container_float{
		min-height: 256px;
	}
	
	#page .body_align_right .container_float{
		min-height: 256px;
	}
	#page > #sidebar{
		width: calc(300px - 2em);
	}
}

.clearfix::after{
	content: "";
	clear: both;
	display: table;
}

#cookie_notice{background-color: var(--theme-color-2);}


/* Dark Mode Adjustments */
/*@media (prefers-color-scheme: dark){*/

	html{background-color: var(--theme-background-1);}
	#page{background-color: var(--theme-background-3);}
	#page > #navigation{background-color: var(--theme-background-2);}
	#page > #sidebar, #content pre{background-color: var(--theme-background-2);}
	#content{color: var(--theme-color-1);}

	#page p, #page ul, #page ol, #page h1, #page h2, #page h3, #page h4, #page h5, #page h6{color: var(--theme-color-1);}
	#content a, #content a:visited,
	#sidebar a, #sidebar a:visited,
	#webgame_enable_focus{
		color: var(--theme-color-primary-1);
	}

	#content a:hover, #content a:active,
	#sidebar a:hover, #sidebar a:active,
	#webgame_enable_focus:hover{
		color: #74ecbc;
	}
	
	.shadow{
		box-shadow: var(--theme-shadow) 0px 0px 5px;
	}
	.form_hover:hover, .form_hover:active{
		box-shadow: rgba(100, 100, 100, 1) 0px 0px 10px;
	}
	#page form, #page label, #page table{
		color: var(--theme-color-1);
	}
	#page .header_bar{
		background-color: #25876b;
	}
	
	#content *.warning{
		color: #ffe100;
	}
	
	#content *.confirmed{
		color: #05ff05;
	}
	
	.button{
		border: orange solid 1px;
		background-color: var(--theme-color-2);
	}
	
	.button:disabled{
		border: none;
	}
	
	#content *.table_header_background{
		background-color: #555;
	}
/*}*/

/*@media (prefers-color-scheme: dark){*/
	:root {
		--theme-background-1:	rgba(35, 35, 35, 1);
		--theme-background-2:	rgba(40, 40, 40, 1);
		--theme-background-3:	rgba(45, 45, 45, 1);
		--theme-color-1: #eee;
		--theme-color-2: #444;
		--theme-color-3: #888;
		--theme-color-primary-1: #57bf96;
	}
/*}*/
