/* apply a natural box layout model to all elements */
*,
*:before,
*:after {
  box-sizing: border-box;
}

/* Site wide variables */
:root {
  --bh-green: rgb(196, 214, 0);
}

input,
button,
submit {
  border: none;
}

/* General Style */
html {
  min-height: 100%;
  position: relative;
  font-size: 16px;
}

body {
  font-family: "Urbanist", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  background-color: rgb(20, 20, 20);
  margin: 0;
}

h1,
h2,
h3,
h4{ 
  font-weight: 700;
}

.loader {
  margin: auto;
  border: 0.75rem solid #f3f3f3;
  border-top: 0.75rem solid var(--bh-green);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 2s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Map */
#map {
  position: absolute;
  font-family: "Urbanist", sans-serif;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  transition: ease-in;
}

/* .fade-in {animation: fadeIn ease 10s;} */
@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

/* Menu window layout */
#menu {
  position: relative;
  z-index: 2;
  max-height: calc(100vh - 2rem);
  max-width: 22rem;
  width: 100%;
  margin: 1rem;
  background: #fff;
  overflow-y: auto;
  border-radius: 5px;
}

#menu p {
  font-size: 1rem;
  line-height: 1rem;
}

#menu-inner {
  overflow-y: hidden;
  padding: 0.5rem;
  width: 100%;
}

.control-box {
  position: absolute;
  font-weight: bold;
  font-size: 1rem;
  line-height: 0;
  text-align: center;
  top: 0.4rem;
  padding: 0;
  background-color: #fff;
  border: 1px solid #000;
  display: block;
  height: 1rem;
  width: 1rem;
}

.control-box:hover {
  background-color: #fff;
  border: 1px solid var(--bh-green);
  color: var(--bh-green);
}

.zoom-box.control-box {
  right: 0.5rem;
}

.windowshade-box.control-box {
  right: 1.75rem;
}

.windowshade {
  display: none;
}

/* Content Formatting */
#menu-titlebar{
  padding-bottom: 0.7rem;
}

#titlebar {
  height: 1.5rem;
  user-select: none;
  text-align: left;
  font-size: 1rem;
  font-weight: inherit;
  padding: 0.1rem 0 0 0.5rem;
  background-size: 3px 2px;
  margin: 0.4rem 0 0 0;
  font-size: 0.8rem;
  line-height: 1rem;
  font-weight: bold;
}

#logo {
  height: 1.5rem;
}

#logo-bottom {
  height: 2.5rem;
  padding-top:1rem;
}

#searchForm {
  /* display: grid; */
  display: none;
  grid-template-columns: minmax(2.5rem, 1fr) 2.5rem;
  grid-template-rows: 1.5rem;
  grid-column-gap: 1rem;
}

#searchQuery {
  background-color: #ffffff;
  display: inline-block;
  border: 1px solid #000;
  border-radius: 1px;
  padding-left: 0.25rem;
}

#searchQuery:focus {
  background-color: #ffffff;
  display: inline-block;
  outline: 2px solid var(--bh-green);
  border-radius: 1px;
}

#searchButton {
  font: inherit;
  font-size: 1rem;
  width: 2.5rem;
}

#layers {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: repeat(auto-fit, 1fr);
  grid-column-gap: 1rem;
  grid-row-gap: 0.5rem;
  padding-top: 1rem;
  padding-bottom: 0.5rem;
}

button {
  font-family: inherit;
  font-size: 1rem;
  text-align: left;
  appearance: none;
  border-radius: 2px;
}

button:hover{
  cursor: pointer;
}

.layer_button {
  height: 1.75rem;
  border: 1px solid #000;
}

.layer_button:hover {
  outline: 2px solid var(--bh-green);
}

.layer_button:active {
  color: #fff;
  background-color: #000;
  outline: 2px solid var(--bh-green);
}

.layer_button_on {
  color: #fff;
  height: 1.75rem;
  background-color: #000;
  outline: 2px solid var(--bh-green);
}

#layers .buttonIcon {
  font-size: 1rem;
  padding-right: 0.5rem;
}

#layers .buttonName {
  font-size: 1rem;
}

#infobox {
  width: auto;
  height: auto;
  font-size: 0.75rem;
  border: 1px solid #111;
  line-height: 1rem;
  padding: 1rem;
  margin-top: 1rem;
  border-radius: 5px;
}

#infobox h3 {
  margin: 0;
  padding-left: 0.25rem;
  padding-bottom: 0.5rem;
}

#legend {
  width: 100%;
}

#legend-title {
  padding-top:0;
  padding-left:0;
}

.legend_table {
  padding-bottom: 0.5rem;
  padding-top: 0.5rem;
}

#legend thead th {
  padding-bottom: 0.5rem;
  text-align: left;
}
#legend thead > :nth-child(1) {
  font-size: 1rem;
}
#legend thead > :nth-child(2) {
  font-size: 0.7rem;
  font-weight: normal;
  line-height: 0.7rem;
}

#legend tbody {
  border: 1px solid #000;
  padding: 1rem;
}

#legend tbody > tr > :nth-child(1) {
  min-width: 2rem;
  white-space: nowrap;
  border: 1px solid #222;
}

#legend tbody > tr > :nth-child(2) {
  font-family: monospace;
  padding-left: 1rem;
  width: 99%;
  padding-top: 0.1rem;
  padding-bottom: 0.2rem;
}

#legend .cellColour {
  height: 1rem;
  width: 1rem;
}

#menu p.copyright {
  font-size: 0.7rem;
  line-height: 1rem;
}

@media only screen and (min-width: 375px) and (max-width: 667px) {
  html {
    font-size: 12px;
  }
  #menu {
    width: 22rem;
  }
  #titlebar {
    line-height: 1.25rem;
  }
}

@media only screen and (min-height: 375px) and (max-height: 32rem) {
  html {
    font-size: 12px;
  }
  #menu {
    width: 22rem;
  }
  #titlebar {
    line-height: 1.25rem;
  }
}

#indexgraph {
  padding: 0.5rem;
}

.popup_indexgraph {
  display: grid;
  grid-template-columns: 4rem 2rem 100px;
  grid-template-rows: 2rem 100px 2rem 1fr;
  grid-column-gap: 0px;
  grid-row-gap: 0px;
}

.indexgraph_axis {
  font-style: italic;
}

#description {
  width: 100%;
}

#description th {
  font-size: 1rem;
  font-weight: bold;
  padding-bottom: 0.5rem;
}

.mapboxgl-popup-content {
  padding: 0.5rem;
  width: 26rem;
  margin: 2px 4px 4px 4px;
  border: 1px solid #111;
}
