h3 {
  text-align: center;
}

div#index {
  align-items: center;
  height: calc(100vh - 96px);
  flex: 1 1 auto;
  justify-self: start;
  margin: 0 0 0 0;
  overflow-y: auto;
  text-align: center;
  text-shadow: none;
  width: 100%;
}

div#contact {
  margin: auto;
  padding-top: 30px;
  width: 25vw;
}

div#alertholder {
  position: relative;
  top: 50%;
  transform: translateY(-50%);
}

dialog#alert {
  border: 1px solid black;
  font-size: 18px;
  height: 220px;
  padding: 5px 10px 10px 20px;
  margin-top: 25vh;
  margin-left: auto;
  margin-right: auto;
  width: 23vw;
}

dialog#alert > p {
  text-align: left;
}

span#closebutton {
  background-color: lightgrey;
  border: 1px solid black;
  cursor: pointer;
  font-size: 20px;
  font-weight: bold;
  padding: 3px 12px 3px 12px;
}

span#closebutton:hover {
  border: 2px solid blue;
  text-decoration: none;
}

/* don't forget to change the viewport/mobile rules, too. */
div#dialogholder {
  display: flex;
  flex-direction: row;
  max-height: 60px;
}

dialog#dialog {
  border: 1px solid black;
  margin: 0;
  padding: 0;
  position: absolute;
}

div#optionsholder {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
}

div.linkholder {
  border: 1px solid black;
  padding: 0;
  height: 100%;
  text-align: center;
  margin: 0;
  width: 80px;
}

div.linkholder:nth-of-type(2) {
  width: 120px;
}

div.linkholder:nth-of-type(4) {
  width: 120px;
}

div#buttonholder {
  align-items: center;
  background-color: #e0ae49;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  height: 40px;
  justify-self: start;
  margin: 0;
  padding: 5px 10px 5px 10px;
}

button#toggler {
  background-color: white;
  border: none;
  color: black;
  font-size: 13px;
  font-weight: 625;
  font-family: -apple-system,
               BlinkMacSystemFont,
               "Segoe UI",
               Roboto,
               Helvetica,
               Arial,
               sans-serif;
  padding: 5px 10px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  margin: 4px 2px;
  cursor: pointer;
  width: 175px;
}

button#toggler:disabled {
  cursor: not-allowed;
  color: grey;
}

div#doPDFs, div#doXMLs {
  background-color: gainsboro;
  border: 1px dotted black;
  box-sizing: border-box;
  display: inline-block;
  height: 100%;
  text-align: center;
  margin: 0;
  margin-left: auto;
  padding: 5px 0 10px 0;
  cursor: pointer;
  width: 130px;
}

a#doPDFsButton, a#doXMLsButton {
  background-color: gainsboro;
  box-sizing: border-box;
  color: #595959;
  display: block;
  font-size: 13px;
  font-weight: 625;
  font-family: -apple-system,
               BlinkMacSystemFont,
               "Segoe UI",
               Roboto,
               Helvetica,
               Arial,
               sans-serif;
  height: 100%;
  margin: 0;
  padding: 0;
  text-decoration: none;
}

div#multiButtons {
  display: inline-block;
  height: 100%;
  margin: 0;
  margin-left: auto;
  padding: 0;
}

div.filler {
  background-color: lightgreen;
  height: 100%;
  padding: 10px;
}

div.filler:hover {
  background-color: white;
  color: black;
}

a.link {
  color: black;
  display: block;
  text-decoration: none;
}

div#grid {
  display: grid;
  grid-template-columns: 35fr 21fr 12fr 12fr 16fr 4fr;
  grid-template-rows: 30px;
  grid-auto-rows: 30px;
  border-bottom: 1px solid black;
  border-top: 1px solid black;
  width: 100%;
}

div#grid span {
  align-items: center;
  font-weight: 600;
  margin: 0;
  padding: 0;
  text-align: left;
}

div#grid > span.gridheader {
  border: 1px solid black;
  color: white;
  background-color: darkgreen;
  font-size: 15px;
  font-weight: 650;
  padding: 2px 0 0 5px;
}

span.hideoverflow, button.hideoverflow {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

div#grid > span.gridheader:last-of-type {
  font-size: 14px;
  text-align: center;
  padding-right: 3px;
}

/* this is so cool.... */
div.row {
  display: contents;
  cursor: pointer;
}

/* this too. */
div.row:hover > span > button {
  background-color: lightgray;
  color: black;
  font-weight: 650;
}

div.row:hover > span.checkboxholder {
  background-color: lightgray;
  color: black;
  font-weight: 650;
}

/* button */
button.optionsbutton {
  display: block;
  font-family: -apple-system,
               BlinkMacSystemFont,
               "Segoe UI",
               Roboto,
               Helvetica,
               Arial,
               sans-serif;
  font-weight: 600;
  width: 100%;
  height: 100%;
  border: 1px solid black;
  padding: 1px 5px 1px 5px;
  margin: 0;
  cursor: pointer;
  text-align: left;
}

div#grid > div.row > span.checkboxholder {
  border: 1px solid black;
  padding-right: 2px;
  text-align: center;
}

/* order statuses */
button.assigned, span.assigned {
  background-color: #f3cfc6;
}

button.canceled, span.canceled {
  background-color: palegreen;
}

button.completed, span.completed {
  background-color: lightgrey;
}

button.newrequest, span.newrequest {
  background-color: lightyellow;
}

button.usercancelled, span.usercancelled {
  background-color: palegreen;
}

button.utf, span.utf {
  background-color: lightcyan;
}

/* hide completed orders on initial load. */
span.completed {
  display: none;
}

/* assigned_to aircraft */
button.n181z {
  color: #006600;
}

button.n115z {
  color: #fffd90;
}

button.n287at {
  color: #cd32cd;
}

button.ac3 {
  color: #0102f4;
}

/* iphone or similar */
@media only screen and (max-width: 402px) {

  /* base font-size (used for rem units) set in style.css */

  div#index {
    /* not needed? */
  }

  div#dialogHolder {
    overflow: auto;
  }

  div#doPDFs, div#doXMLs {
    display: none;
  }

  dialog#dialog {
    position: absolute;
    left: 0;
    top: 0;
    border: 2px solid black;
    overflow: auto;
  }

  div#optionsholder {
    flex-direction: column;
    overflow: auto;
  }

  div#buttonholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 2.2rem;
  }

  /* kluge to reset nth-of-type() set above */
  div.linkholder:nth-of-type(even), div.linkholder:nth-of-type(odd) {
    width: 35vw;
  }

  div.linkholder {
    border-bottom: 1px solid black;
    border-top: none;
    font-size: 1.2rem;
    font-weight: 700;
    width: 35vw;
    height: 2.5rem;
    vertical-align: middle;
  }

  div.linkholder:last-of-type {
    border-bottom: none;
  }

  div.filler {
    border: 2px solid green;
    font-size: 1.2rem;
    height: 2.5rem;
    line-height: 1.25rem;
    padding-bottom: 20px;
  }

  button#toggler {
    font-size: 0.9rem;
    height: 1.5rem;
    line-height: 1.5rem;
    padding: 0;
    width: 45vw;
  }

  div#grid {
    grid-template-columns: 1fr auto auto;
    grid-template-rows: 1.5rem auto;
    grid-auto-rows: 1.4rem;
    height: auto;
    margin: 0;
    padding: 0;
  }

  div#grid span {
    font-size: 0.9rem;
    height: 1.4rem;
    padding: 0;
    margin: 0;
  }

  div#grid > span.gridheader {
    border: 1px solid black;
    font-size: 0.8rem;
    font-weight: 750;
    height: 1.5rem;
    padding: 1px 0 2px 6px;
  }

  span.nomobile {
    display: none;
  }

  span.optionsbuttonholder {
    height: 1.4rem;
    margin: 0;
    padding: 0;
  }

  button.optionsbutton {
    border: 1px solid green;
    color: black;
    font-size: 0.8rem;
    font-weight: 680;
    height: 1.4rem;
    margin: 0;
    padding: 1px 5px 0 5px;
    text-align: left;
  }

  /* viewport css somehow overwrite these, so we need
     to reset them here. */
  button.n181z {
    color: #32cd32;
  }

  button.n115z {
    color: #fffd90;
  }

  button.n287at {
    color: #cd32cd;
  }

  button.ac3 {
    color: #0102f4;
  }
}

/* bigger than an iphone, smaller than a tablet
   just copying phone css from above, for now.  */
@media only screen and (min-width: 403px) and (max-width: 750px) {

  /* base font-size (used for rem units) set in style.css */

  div#index {
    /* not needed? */
  }

  div#dialogHolder {
    overflow: auto;
  }

  div#doPDFs, div#doXMLs {
    display: none;
  }

  dialog#dialog {
    position: absolute;
    left: 0;
    top: 0;
    border: 2px solid black;
    overflow: auto;
  }

  div#optionsholder {
    flex-direction: column;
    overflow: auto;
  }

  div#buttonholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 60px;
    padding-top: 10px;
  }

  /* kluge to reset nth-of-type() set above */
  div.linkholder:nth-of-type(even), div.linkholder:nth-of-type(odd) {
    width: 35vw;
  }

  div.linkholder {
    border-bottom: 1px solid black;
    border-top: none;
    font-size: 1.2rem;
    font-weight: 700;
    width: 35vw;
    height: 2.5rem;
    vertical-align: middle;
  }

  div.linkholder:last-of-type {
    border-bottom: none;
  }

  div.filler {
    border: 2px solid green;
    font-size: 1.2rem;
    height: 2.5rem;
    line-height: 1.25rem;
    padding-bottom: 20px;
  }

  button#toggler {
    font-size: 1.1rem;
    height: 35px;
    width: 45vw;
  }

  div#grid {
    grid-template-columns: 1fr auto auto;
    grid-template-rows: 1.4rem auto;
    grid-auto-rows: 1.3rem;
    height: auto;
    margin: 0;
    padding: 0;
  }

  div#grid span {
    font-size: 0.8rem;
    height: 1.3rem;
    padding: 0;
    margin: 0;
  }

  div#grid > span.gridheader {
    border: 1px solid black;
    font-size: 0.8rem;
    font-weight: 750;
    height: 1.4rem;
    padding: 1px 0 2px 6px;
  }

  span.nomobile {
    display: none;
  }

  span.optionsbuttonholder {
    height: 1.3rem;
    margin: 0;
    padding: 0;
  }

  button.optionsbutton {
    border: 1px solid green;
    color: black;
    font-size: 0.8rem;
    font-weight: 680;
    height: 1.3rem;
    margin: 0;
    padding: 1px 5px 0 5px;
    text-align: left;
  }

  /* viewport css somehow overwrite these, so we need
     to reset them here. */
  button.n181z {
    color: #32cd32;
  }

  button.n115z {
    color: #fffd90;
  }

  button.n287at {
    color: #cd32cd;
  }

  button.ac3 {
    color: #0102f4;
  }

}

/* tablet */
@media only screen and (min-width: 751px) and (max-width: 1024px) {

  /* viewport css somehow overwrite these, so we need
     to reset them here. */
  button.optionsbutton {
    color: black;
  }

  button.n181z {
    color: #32cd32;
  }

  button.n115z {
    color: #fffd90;
  }

  button.n287at {
    color: #cd32cd;
  }

  button.ac3 {
    color: #0102f4;
  }
}


