/**************************************************************************************
CSS reset (has to go at the top so as to not overwrite other stuff)
**************************************************************************************/
* {min-width:0;} /* Fix the overflow:hidden shrinking div problem */
* {box-sizing: border-box;}; /* So that padding doesn't increase the size of stuff. */
* {font-display: block;} /* Make sure custom fonts work nicely */

/**************************************************************************************
General overall stuff
**************************************************************************************/
html {margin:0; padding:0; border:0;} /* Otherwise making everything border-box puts margins around the page. */
body {margin:0;} /* Ditch the outer margin; we never want it */
body {background-color:#fafafa;}

/* General basic font stuff */
body, input, label, select, button, textarea {
	font-family:Verdana,sans-serif;
	font-size:16px;
	/*line-height:150%;*/
	color:#333;
}
h1,h2,h3,h4 {font-weight:400; margin: 0 0 12px 0; line-height:1.2em;}
h1 {font-size:25px;}
h2 {font-size:20px;}
h3 {font-size:18px;}
h4 {font-size:16px;}
p {display: block; margin: 0 0 12px 0;}
ul {margin: 0 0 10px 0; padding: 0 0 0 20px;}
li, li > ul {margin: 0 0 4px 0;}
hr {color: #555; width: 100%;}
a {text-decoration:none; color:#0000dd;}
a:hover {text-decoration:underline;}

/**************************************************************************************
Standard page layout options
**************************************************************************************/
.centralColumn {
	display:block;
	width:100%;	/* width:100%; max-width:600px is how you solve the goddamn shrinking bug that was grinding my gears for ages */
	max-width:650px; /* Goes with above width:100% line to make it expand out to a max of 600px */
	margin-left: auto; /* Center alignment on the page */
	margin-right: auto; 
	padding:20px 20px 20px 20px;
}

.flexCenteredPage { /* Horizontally and vertically center whatever DIV is inside it. Here to add to body if we want pageContent to be fully centered */
	display: flex; 
	align-items: center;
	justify-content: center;
	min-height: 100vh; /* Not necessarily needed in all cases */
}

/* Same but for smaller units than an entire page */
.flexCenteredBox {
	display: flex; 
	align-items: center;
	justify-content: center;
	min-height:100%;
}

/**************************************************************************************
Miscelaneous useful element formatting options
**************************************************************************************/
.centred {margin: 0 auto 0 auto; display:table;}
.error {color:#d00;}
.nomargin {margin:0;}
.editable {border-bottom: 1px dotted blue;}
.noWrap {white-space:nowrap;}
.hidden {display: none;}
.data {display:none;} /*Used for local page data storage, and passing stuff from PHP to JS*/
.subtle, .subtle:hover {text-decoration:none; color:inherit;} /* For "onclick" hyperlinks, etc */
.jsWarning {width:100%; background:#dd0000; color: #ffffff; text-align:center; padding:10px; z-index:999;}
.inverted {filter: invert(100%);} /* To make black SVGs show as white */

/**************************************************************************************
Form/input field stuff
**************************************************************************************/
textarea {width:100%; height:7em; resize:none;}

/**************************************************************************************
Buttons
**************************************************************************************/
button, .linkButton, input[type=submit] {
	-webkit-appearance: none; -moz-appearance: none; appearance: none;
	display: inline-block;
	border: 1px solid black;
	border-radius: 4px;
	padding: 3px 10px 3px 10px;
	margin: 2px;
	
	color: #ffffff;
	font-family: inherit;
	font-size: 100%;
	cursor: pointer;
	text-align: center;
	font-weight: normal;
	text-decoration: none;
	
	background: linear-gradient(#aaa, #777);
}
button:active, .linkButton:active, input[type=submit]:hover {transform: scale(0.99);}
button:hover, .linkButton:hover, input[type=submit]:hover {background: linear-gradient(#bbb, #888);}
.linkButton:hover{text-decoration:none;}
/*button:focus {outline: 1px solid #fff; outline-offset: -4px;}*/

.redButton {background:linear-gradient(#c00, #900);}
.redButton:hover {background: linear-gradient(#e00, #b00);}

.greenButton {background: linear-gradient(#0b0, #080);}
.greenButton:hover {background: linear-gradient(#0c0, #090);}

.blueButton {background: linear-gradient(#19f, #24d);}
.blueButton:hover {background: linear-gradient(#2af, #35f);}

.yellowButton {background: linear-gradient(#aa0, #880);}
.yellowButton:hover {background: linear-gradient(#bb2, #aa2);}

/* Style a link as a button */
/*
.linkButton {
	display:inline-block;
	border-radius:4px;
	border-style:solid;
	border-width:1px;
	border-color:#000;
	font-weight:normal;
	color:#fff;
	padding:3px 10px 3px 10px;
	white-space: nowrap;
	text-align: center;
	text-decoration: none;
}
*/

/**************************************************************************************
Page layout and site header stuff
**************************************************************************************/
/* Outer wrapper for the page header, so that it can stretch across the full page width.
This is also where any header image background goes. */
.fullWidthHeader {
	width:100%;
	background: #5a84cd;
	box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2); /* hOffset vOffset blur spread color */
	padding: 20px 0 20px 0;
}
.headerText {
	font-size: 25px;
	vertical-align: middle;
	width: 100%;
	max-width: 650px;
	margin: 3px auto 0 auto;
	padding-left: 20px;
	color:#fff;
	text-shadow: 2px 4px 1px rgba(0,0,0,0.3);
}
.floatingHeader { /* Suitable for PWA */
	position:sticky;
	top:0;
	padding: 10px 0 10px 0;
}
.floatingHeader > .headerText {font-size: 20px;}

.headerBarLogo,
.aboutIcon {
	display:inline-block;
	height: 1.5em;
	vertical-align:middle;
	padding-bottom: 0.1em;
	margin-right: 0.6em;
}
.aboutIcon {float:right; cursor:pointer;}

/* No longer needed thanks to position:sticky tech */
/* .floatingHeader + div {margin-top: 44px;} /* Add spacing to next DIV below floating header */


/* Splash screen stuff */
.splashScreen {
	z-index:998;
	background-color:#5a84cd;
	width:100vw;
	height:100vh;
	position:fixed;
	top:0;
	left:0;
	display:flex;
	justify-content:center;
	align-items:center;
	flex-direction:column;
}
.splashScreenLogo {width: 10vh; display:block; margin: 0 auto 0 auto;}
.splashScreenText {
	display:block;
	margin: 2vh auto 20vh auto;
	text-align: center;
	font-size:30px;
	line-height:35px;
	font-weight:bold;
	color:#ffffff;
	text-shadow: 2px 4px 1px rgba(0,0,0,0.3);
}

/**************************************************************************************
PWA stuff
**************************************************************************************/
#installAppPopup {
	position: fixed;
	display: none;
	width:100%;
	bottom: 0;
	margin-left: 5% auto;
	margin-right: 5% auto;
	left: 0;
	right: 0;
	text-align: center;
}

#installAppPopupInterior {
	display: block;
	border: 2px solid black;
	border-radius: 15px;
	background-image:linear-gradient(#f0f0f0, #e0e0e0);
	margin-left: 5%;
	margin-right: 5%;
	text-align: center;
	background-size: 100% 100%;
	padding-top: 10px;
}

#installAppLink {display: none;}

.downTriangle { /* CSS triangle, for Install popup */
	width: 0;
	height: 0;
	border-left: 15px solid transparent;
	border-right: 15px solid transparent;
	border-top: 20px solid black;
	margin-top: 5px;
	margin-bottom: 5px;
	display: inline-block; /*So we can text-align center it*/
}

.textIcon {height: 1.3em;}


/**************************************************************************************
Modal stuff
**************************************************************************************/
.modalBackground { /* The full size darkening page overlay, while in dormant mode */
	opacity: 0; /*Invisible*/
	pointer-events: none; /*Unclickable*/
	position: fixed;
	background-color: rgba(20, 20, 20, 0.8); /* 0.8 = semi transparent */
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 998; /* Appear just below the modal box itself */
	-webkit-transition: all 0.3s;
	-moz-transition: all 0.3s;
	transition: all 0.3s;
}

.modal { /* The actual content box */
	opacity: 0; /*Invisible*/
	pointer-events: none; /*Unclickable*/

	position: absolute;
	width: 90vw;
	max-width: 500px;
	max-height: 80vh;
	overflow: auto;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	border: 1px solid black; /* SC added */
	box-shadow: 10px 10px 10px 0 rgba(50,50,50,0.4); /* SC added */
	border-radius: 8px; /* SC added */
	z-index: 999;
	background-image: linear-gradient(#fff, #ddd);
	padding: 20px;

	-webkit-transition: all 0.3s;
	-moz-transition: all 0.3s;
	transition: all 0.3s;
}

.modalVisible {
	opacity: 1;
	pointer-events: auto;
}

.modalCloseX { /* The link for closing the window */
	color: #888;
	height: 40px;
	font-size: 20px;
	position: absolute;
	top: 0;
	right: 0;
	text-align: center;
	width: 40px;
	text-decoration: none;
	padding: 8px;
	cursor: pointer;
}
.modalCloseX:hover {
	color: #000;
	text-decoration: none;
}

/* "Loading" spinner for use with JS fetch stuff */
.textSpinner, .blockSpinner {
	border: 4px solid #d3d3d3; /* Light grey */
	border-top: 4px solid #3498db; /* Blue */
	border-radius: 50%;
	animation: spin 1s linear infinite;
}
.textSpinner {display:inline-block; width:16px; height:16px;}
.blockSpinner {display:block; width:20%; aspect-ratio:1; margin:20% auto 0 auto; border-width:8px;}
@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}


/**************************************************************************************
Tooltip stuff
**************************************************************************************/

.helpIcon {
	display: inline-block;
	font-size: 12px;
	line-height: 16px;
	width:16px;
	height:16px;
	border-radius: 8px;
	margin-left: 5px;
	font-weight: bold;
	text-align: center;
	vertical-align: middle;
	background: #2595ff;
	color: #ffffff;
	border: 0;
	cursor: default;
}

.tooltipPopup {
	width: 160px;
	position: fixed;
	top: 0;
	left: 0;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s;
	background: #ffffaa;
	border: 1px solid black;
	border-radius: 5px;
	z-index: 1000;
	padding: 5px;
	text-align: center;
	font-size: 14px;
	line-height: 18px;
}
.tooltipVisible {
	opacity: 1;	
}

/*
[tooltip] {
  position: relative;
}

[tooltip]::after {
  opacity: 0;
  content: attr(tooltip);
  position: absolute;
  min-width: 120px;
  left: -58px;
  top: 20px;
  transform: translateX(-50%) translateY(-100%);
  background: rgba(0, 0, 0, 0.7);
  text-align: center;
  color: #fff;
  padding: 4px 2px;
  font-size: 12px;
  border-radius: 5px;
  pointer-events: none;
}

[tooltip]:hover::after,
[tooltip]:hover::before {
  opacity: 1;
}
*/
/*
.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip .tooltipText {
  visibility: hidden;
  font-weight:100;
  width: 150px;
  background-color: #ffffbb;
  border: 1px solid #dddd66;
  color: #000;
  text-align: center;
  border-radius: 6px;
  padding: 5px;
  position: absolute;
  z-index: 1000;
  bottom: 125%;
  left: 50%;
  transform:translate(-50%);
  opacity: 0;
  transition: opacity 0.3s;
  box-shadow: 10px 10px 10px 0 rgba(50,50,50,0.2);
}

.tooltip:hover .tooltipText {
  visibility: visible;
  opacity: 1;
}
*/

/*
.tooltip .tooltipText::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #555 transparent transparent transparent;
}
*/


