body,html {
    height: 100%!important;
}

h1 {
  margin-right: 1em;
}

h2 {
	margin: 0px 0px 60px 0px;
}

h3 {
  font-size: 1.2em;
  text-align: center;
}

div#header, div#footer {
  background: lightblue;
  padding: 1em;
  width: 100%;
}

div#hello_user {
  font-size: 1.4em;
  font-weight: 400;
}

div.header-button {
  margin-left: 1em;
}

div#editmenu {
  margin-top: 0.5em;
}

div#maincontent {
  width: 98%;
  margin-left: 1%;
  margin-right: 1%;
  padding-top: 1em;
  padding-bottom: 4em;
}

div#header img {
  height: 32px;
  width: 32px;
}

div.centre {
  width: auto;
  position: relative;
  left: 50%;
  margin-left: -50%;
  margin-right: 50%;
}

div.userinput {
  width: auto;
  max-width: 30em;
  margin: auto;
  margin-top: 2em;
  border: solid 2px;
  border-radius: 1em;
  padding: 1em;
}

input#change_date+button {
  /* margin-top: 0.4em; */
  margin-top: 8px;
  width: 48px;
}

/* fix for overlapping change date icon */
input#next_date {
  margin-left: 8px;
}

input#previous_date {
  margin-right: 8px;
}

p.centre {
  text-align: center;
}

/*this from https://www.w3schools.com/howto/howto_css_custom_checkbox.asp*/

/* Create a custom checkbox */
span.checkmark {
  position: absolute;
  top: 0px;
  left: -4px;
  height: 22px;
  width: 22px;
  background-color: #eee;
  border: solid 1px #000000;
}

/* On mouse-over, add a grey background color */
span input[type="checkbox"] ~ .checkmark {
  background-color: #ccc;
}

/* When the checkbox is checked, add a blue background */
span input[type="checkbox"]:checked ~ .checkmark {
  background-color: #007bff;
}

/* When the checkbox is disabled, add orange background */
span input[type="checkbox"]:disabled ~ .checkmark {
  background-color: #ff8d30;
}

/* Create the checkmark/indicator (hidden when not checked) */
span .checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

/* Show the checkmark when checked */
span input[type="checkbox"]:checked ~ .checkmark:after {
  display: block;
}

/* Style the checkmark/indicator */
span .checkmark:after {
  left: 9px;
  top: 5px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 3px 3px 0;
  -webkit-transform: rotate(45deg);
  -ms-transform: rotate(45deg);
  transform: rotate(45deg);
}

span label {
    margin-left: -10px;
}

/* special delete entry icon */

span.deleteicon {
  background-color: #ffffff;
  
}

span.deleteicon input[type="checkbox"] {
  display: none;
}

span.deleteicon span.checkmark {
  position: absolute;
  top: 6px;
  left: -12px;
  height: 24px;
  width: 24px;
  background: none;
  background: url('/images/delete-icon-24.png') 0 0px no-repeat;
  border: none;
}

span.deleteicon input[type="checkbox"]:checked ~ .checkmark {
  background: none;
  background: url('/images/delete-icon-24-sel.png') 0 0px no-repeat;
  border: none;
}

span.deleteicon span .checkmark:after {
/*  position: absolute;
  height: 24px;
  width: 24px;
  background: none;
  background: url('/images/delete-icon-24.png') 0 0px no-repeat;
  border: none;
*/  display: none;
}

/* On mouse-over, add a grey background color */
span.deleteicon input[type="checkbox"] ~ .checkmark:after {
/*  background: none;
  background: url('/images/delete-icon-24.png') 0 0px no-repeat;
  border: none;
*/  display: none;
}

/* When the checkbox is checked, add a blue background */
span.deleteicon input[type="checkbox"]:checked ~ .checkmark:after {
/*  background: none;
  background: url('/images/delete-icon-24-sel.png') 0 0px no-repeat;
  border: none;
*/  display: none;
}

table td, table th {
  padding: 0.25rem !important;
}

table.edit-houses th+th, table.edit-houses td+td {
  width: 4rem;
  vertical-align: middle;
}

table.show-rota {
  width: 98vw;
  min-width: 98vw;
  max-width: 98vw;
  display: inline-block;
  table-layout: fixed;
}
table.show-rota td, table.show-rota th {
  border: 1px solid #333333;

  min-width: 5em;
  width: 5em;
  max-width: 9%;
}

table.show-rota td+td {
  min-width: 30%;
  width: 30%;
  max-width: none;
}


table.editrota {
  width: 100%;
}

table.editrota td.time input {
  width: 6em;
}

table.editaccount {
  width: 98vw;
  min-width: 98vw;
  max-width: 98vw;
  display: inline-block;
  table-layout: fixed;
}

table.editaccount td, table.editaccount th {
  border: 1px solid #333333;

  min-width: 8em;
  width: 8em;
  max-width: 9%;
}

table.editaccount td {
  min-width: 71%;
  width: 71%;
  max-width: none;
}

table.editaccount input {
  max-width: 70%;
}

table.editaccount input.long {
  width: 100%;
}

table.editaccount div {
  display: inline-block;
}

.nowrap {
  white-space: nowrap;
}

/* make tracking along the row easier */
table#users tr:hover, table.editrota tr:hover {
  background: #e1ffdf;
}

div.modal {
  position: fixed;
  top: 1vw;
  left: 1vw;
  max-width: 98vw;
}

div.modal input {
  max-width: 100%;
}

@media screen and ( max-width:1024px ) {
  body {
    font-size: 10pt;
  }

  div#header img, div#menu img {
    width: 24px;
    height: 24px;
  }

  select.btn {
    line-height: 1.0rem;
    padding: 0.125rem 0.5rem;
  }

  .btn {
    padding: .25rem 0.5rem;
    font-size: 0.9rem;
    line-height: 1.0rem;
  }

  div#editmenu span {
    display: none;
  }
}

@media screen and ( max-width:512px ) {
  body {
    font-size: 10pt;
  }

  div#header img, div#menu img {
    width: 16px;
    height: 16px;
  }

  select.btn {
    line-height: 1.0rem;
  }
  
  .btn {
    padding: .25rem 0.5rem;
    font-size: 0.8rem;
    line-height: 1.0rem;
  }

  div#header div.mr-auto.p2 {
    width: 96vw;
    min-width: 96vw;
    max-width: 96vw;
  }

  div.header-button {
    margin-left: 0.5em;
  }

  h3 {
    font-size: 1.2em;
  }

  table.show-rota td, table.show-rota th {
    min-width: 5em;
  } 

  table.editaccount div {
    font-size: 0.8em;
  }
}
