:root {
/* Define a base colour for the website in header.php and calculate all other colours as offsets */
  --basecolor: rgb(var(--baser), var(--baseg), var(--baseb));
  --sidebarcolor: rgb(calc(var(--baser) - 11), calc(var(--baseg) - 9), calc(var(--baseb) - 4));
  --headerstartcolor: rgb(calc(var(--baser) - 26), calc(var(--baseg) - 5), calc(var(--baseb) - 0));
  --helpcolor: rgb(calc(var(--baser) - 34), calc(var(--baseg) - 29), calc(var(--baseb) - 0));
  --itembgcolor: rgb(calc(var(--baser) - 11), calc(var(--baseg) - 12), calc(var(--baseb) - 7));
  --hovercolor: rgb(calc(var(--baser) - 41), calc(var(--baseg) - 39), calc(var(--baseb) - 0));
  --currentsel: rgb(calc(var(--baser) - 139), calc(var(--baseg) - 106), calc(var(--baseb) - 0));
  --userseededcolor: rgb(calc(var(--baser) - 54), calc(var(--baseg) - 53), calc(var(--baseb) - 43));
  --menucolor: rgb(calc(var(--baser) - 139), calc(var(--baseg) - 106), calc(var(--baseb) - 0));
  --spinner: rgb(calc(var(--baser) - 190), calc(var(--baseg) - 94), calc(var(--baseb) - 54));
}

body {
  font-family: tahoma,arial,sans-serif;
  font-size: 1em;
  margin: 0;
  padding: 0;
  background-color: rgb(var(--baser), var(--baseg), var(--baseb)); /*#dae5ff;*/
}

a:link,
a:visited,
a:hover,
a:active,
summary {
  color: #04C;
  cursor: pointer;
}
a:hover,
summary:hover {
  color: #00F;
  background-color: #ddddac;
}

.black_overlay {
  display: none;
  position: fixed;
  top: 0%;
  left: 0%;
  width: 100%;
  height: 100%;
  background-color: black;
  z-index: 1002;
  -moz-opacity: 0.8;
  opacity: .80;
  filter: alpha(opacity=80);
}

@keyframes spinner {
  0% {
    transform: translate3d(-50%, -50%, 0) rotate(0deg);
  }
  100% {
    transform: translate3d(-50%, -50%, 0) rotate(360deg);
  }
}

.spin {
  z-index: 1990;
}

.spin::before {
  animation: 1.5s linear infinite spinner;
  animation-play-state: inherit;
  border: solid 5px #cfd0d1;
  border-bottom-color: var(--spinner);
  border-radius: 50%;
  content: "";
  height: 40px;
  position: fixed;
  top: 50vh;
  left: 50vw;
  transform: translate3d(-50%, -50%, 0);
  width: 40px;
  will-change: transform;
  z-index: 1991;
}

.pageheader {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 10vh;
  text-align: center;
  border-top: 2px solid #ccc;
  border-bottom: 2px solid #ccc;
  background: linear-gradient(var(--headerstartcolor), var(--basecolor));
  box-sizing: border-box;
}

.pageheader a:link,
.pageheader a:visited,
.pageheader a:hover,
.pageheader a:active {
  color: #000;
  font-weight: normal;
  text-decoration: none;
}

.pageheader a:hover {
  text-decoration: underline;
  background-color: transparent;
}

.pageheader h1 {
  margin: 0;
}

.sidebar {
  height: 85vh;
  overflow-y: scroll;
  width: 11.5%;
  display: inline-block;
  vertical-align: top;
  background-color: var(--sidebarcolor);
  padding: 5px;
  box-sizing: border-box;
}

.sidebar::-webkit-scrollbar {
  display: none;
}

.sidebar ul {
  list-style-type: none;
  margin: 10px;
  padding: 0px;
  width: auto;
  margin: 0 0 0 10px;
}

.sidebar li a {
  display: inline-block;
  width: 100%;
}

.sidebar h3,
.sidebar h4 {
  margin: 10px 0 0 0;
}

#loginform {
  color: #000;
}

#loginform p {
  display: flex;
}

#loginform label {
  background-color: white;
  border: 1px solid black;
  border-radius: 0;
  height: 23px;
  width: 23px;
}

.eye_icon {
  background-image: url('images/eyeicon.svg');
  background-repeat: no-repeat;
  background-size: 32px 16px;
  width: 32px;
  height: 20px;
  display: inline-block;
  position: relative;
  top: 6px;
  cursor: pointer;
}

.padlock {
  background-image: url('images/padlock.svg');
  background-repeat: no-repeat;
  background-size: 18px 18px;
  background-position: 2px 2px;
  display: inline-block;
}

.user-icon {
  background-image: url('images/person.svg');
  background-repeat: no-repeat;
  background-size: 18px 18px;
  background-position: 2px 2px;
  display: inline-block;
}

.pagebody {
  height: 84vh;
  padding: 5px;
  display: inline-block;
  width: 77%;
  box-sizing: border-box;
  overflow-x: clip;
  overflow-y: scroll;
}

.pagebody::-webkit-scrollbar {
  display: none;
}

.pagebody h1 {
  text-align: center;
}

.pagefooter {
  height: 5vh;
  background-color: var(--sidebarcolor);
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  box-sizing: border-box;
}

.Alert {
  border: 1px solid;
  background-color: #FFFF77;
  color: #000;
  padding: 5px;
  text-align: center;
}

.AlertHolder {
  border: none;
  color: #000;
  padding: 6px;
}

#HomeDiv {
  text-align: center;
}

#HomeDiv h2 {
  margin: 0;
}

span.bitfield {
  display: grid;
  float: left;
}

#loggedindiv {
  display: flex;
  flex-flow: row wrap;
}

#loggedinname2 {
  display: flex;
  text-align: right;
}

.avatar {
  height: 8vh;
  width: 8vh;
}

#UserDtls .avatar {
  height: 12vh;
  width: 12vh;
}

.avatar img {
  width: 100%;
  height: 100%;
}

.ListTable td:first-child {
  padding-left: 10px;
  padding-right: 10px;
}

.ListTable td:first-child::before {
  content: "• ";
}

.pagebody button, input, select, textarea {
  font: inherit;
  line-height: normal;
  /*
  max-width: 100%;
  */
}

/*
.pagebody input[type="text"],
.pagebody input[type="time"],
.pagebody input[type="number"] {
  font-size: 1rem;
}
*/

.pagebody label,
.pagebody select,
.pagebody button,
.pagebody input[type="button"],
.pagebody input[type="reset"],
.pagebody input[type="submit"],
.pagebody input[type="radio"],
.pagebody input[type="checkbox"] {
  cursor: pointer;
}

.pagebody label {
  white-space: nowrap;
}

.utblbutton {
  border: 2px solid blue;
  border-radius: 5%;
  margin-top: 5px;
  margin-bottom: 10px;
}

.utblfielderr {
  display: flex;
  color: red;
}

.utbldeleted {
  background-color: rgba(255,255,255,0.5);
}

.utbldeleted input,
.utbldeleted select,
.utbldeleted textarea {
  background-color: rgba(255,255,255,0.5);
  color: rgba(0,0,0,0.5);
  user-select: none;
  pointer-events: none;
}

.utbldeleted button {
  display: none;
}

.utbldeleted .utblfielderr::after {
  content: "(deleted)";
}

.delete_icon {
  background-image: url('images/trash2.svg');
  background-repeat: no-repeat;
  background-size: 24px 24px;
  display: inline-block;
  background-color: transparent;
  border: none;
  width: 24px;
  height: 24px;
  margin: 0 2px 0 2px;
}

.delete_icon::before {
  content: "\A0";
  font-size: 0;
}


.submenu {
  display: grid;
  margin-left: 14px;
}

.blinking {
  animation:blinkingText 1.2s infinite;
}
@keyframes blinkingText{
  0%{     background-color: crimson; border-color: crimson;    }
  49%{    background-color: crimson; border-color: crimson; }
  60%{    background-color: gold; border-color: gold; }
  99%{    background-color: gold; border-color: gold;  }
  100%{   background-color: crimson; border-color: crimson;    }
}

#worldmap_btn {
  display: flex;
  padding: 4px;
  width: 100px;
  height: 100px;
  background: transparent;
  border: 0;
  cursor: pointer;
  margin-left: 35px;
}

#forgotpw {
  display: grid;
}

#helppopuplabel {
  background-image: url(images/popout.png);
  width: 18px;
  cursor: pointer;
  filter: brightness(0);
  height: 18px;
  border: 1px solid black;
  border-radius: 5px;
  background-repeat: no-repeat;
  background-size: 18px;
  float: right;
  margin: 2px;
}

#helppopup {
  display: none;
}

#helppopup:checked ~ #rightsidebar > #HelpDiv #helppopuplabel  {
  transform: rotate(180deg);
}

#helppopup:checked ~ #rightsidebar > #HelpDiv {
  position: absolute;
  display: block;
  visibility: visible;
  top: 10vh;
  left: 6vw;
  min-width: unset;
  max-width: unset;
  min-height: 10vh;
  max-height: unset;
  width: 88vw;
  height: 88vh;
  resize: both;
  z-index: 1500;
}

#HelpDiv {
  display: inline-block;
  height: 39vh;
  overflow: hidden;
  font-size: 1rem;
  line-height: 1.5;
  border: 1px solid black;
  min-width: 10vw;
  max-width: 10vw;
  min-height: 39vh;
  max-height: 39vh;
  box-sizing: border-box;
  border-radius: 5px;
  background-color: var(--helpcolor);
  resize: none;
  margin: 5px 0 0 5px;
}

#HelpDiv h3 {
  margin: 0;
}

#HelpDiv ul {
  list-style: disc;
  padding-left: 4px;
}

#HelpHeader {
  padding: 0 0 0 5px;
  background-color: gray;
}

#Help {
  padding: 0 10px 0 5px;
  height: calc(100% - 32px);
  overflow: scroll;
}

#Help::-webkit-scrollbar {
  display: none;
}

#GridStatusDiv {
  line-height: 1.5;
  border: 1px solid black;
  min-width: 10vw;
  max-width: 10vw;
  min-height: 10vh;
  max-height: 40vh;
  box-sizing: border-box;
  border-radius: 5px;
  background-color: var(--helpcolor);
  resize: none;
  margin: 0 0 0 5px;
}

#GridStatusHeader {
  padding: 0 0 0 5px;
  background-color: gray;
}

#GridStatusDiv h3 {
  margin: 0;
}

#GridStatus {
  display: grid;
  padding: 0 10px 0 5px;
}

#GridStatus .ONLINE {
  color: green;
}

#GridStatus .OFFLINE {
  color: red;
}

.super {
  vertical-align: super;
  font-size: xx-small;
}

a.linkbutton {
  text-decoration: none;
  background-color: #EEEEEE;
  color: black;
  padding: 1px 6px 1px 6px;
  border-top: 1px solid #888;
  border-right: 1px solid #888;
  border-bottom: 1px solid #888;
  border-left: 1px solid #888;
  border-radius: 5px;
  display: inline-block;
  margin: 2px 0 0 5px;
}

#name2 {
  text-align: right;
  padding-right: 12px;
}

#userhdrdiv {
  position: sticky;
  top: 0;
  background-color: var(--sidebarcolor);
}

#leftsidebar_fade,
#help_input,
#menu_input {
  display: none;
}

.reload {
  margin-left: -100%;
}

.rpthdr {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.rpthdr button {
  height: fit-content;
}

.rpthdr > h1 {
  width: 75vw;
  line-height: normal;
  font-size: 1.5em;
}

.close_button {
  position:absolute;
  top:0;
  right:0;
}

#hdrreload {
  display: none;
}

.hiddenheading {
  display: none;
}

.mobileonly {
  display: none;
}
