body {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  line-height: 1.5;
}

h1,
h2,
h3,
h4 {
  font-family: 'Spectral', serif;
}

a {
  color: #ba1200;
}

.body {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 10px;
}

.lm-more a {
  text-decoration: none;
}

#header {
  background: #eee;
  margin-bottom: 1rem;
}

#header h1 {
  padding: 1.5rem 0.5rem;
}

#header a {
  color: inherit;
  text-decoration: none;
}

#env-header {
  text-align: center;
  background-color: #f8d7da;
  padding: 0.25em;
}

#env-header.env-dev {
  background-color: #cce5ff;
}

#env-header.env-staging {
  background-color: #fff3cd;
}

.page {
  display: grid;
  grid-template-columns: 2fr 10fr;
  grid-column-gap: 1em;
}

.center {
  text-align: center;
}

.messages {
  grid-column: span 2;
  text-align: center;
  padding: 0;
  margin: 0;
  list-style-type: none;
}

.messages li {
  padding: 0.25em 0.5em;
  margin: 0.25em 0;
  border: 1px solid;
  border-radius: 0.25rem;
}

.messages li i {
  float: right;
  color: black;
}

.messages .info {
  background-color: #cce5ff;
}

.messages .success {
  background-color: #d4edda;
}

.messages .warning {
  background-color: #fff3cd;
}

.messages .error {
  background-color: #f8d7da;
}

footer {
  font-size: 0.75em;
  margin: 40px auto auto auto;
  text-align: center;
}

ul {
  padding-left: 20px;
}

.left-menu ul {
  padding-left: 0;
}

.left-menu ul li {
  list-style-type: none;
}

.lm-more {
  display: none;
}

.helptext {
  font-size: 75%;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid black;
  padding: 1rem;
  text-align: left;
}

.form {
  display: grid;
  grid-template-columns: max-content minmax(auto, max-content);
  grid-row-gap: 1em;
  grid-column-gap: 1em;
}

.form-field {
  display: flex;
  flex-direction: column;
  margin-bottom: 0.75em;
}

.form input[type="checkbox"] {
  width: min-content;
}

ul.errorlist > li {
  color: red;
}

div#id_brew_rating {
  display: flex;
  justify-content: space-around;
  flex-direction: row-reverse;
  text-align: center;
  margin: 0;
  padding: 0;
}

div#id_brew_rating div {
  list-style-type: none;
  margin-bottom: 10px;
}

i.brew-rating {
  font-size: 2em;
}

#logentry-list {
  font-size: 0.8em;
}

#logentry-list th {
  padding: 0.25em;
  text-align: center;
}

#logentry-list td {
  padding: 0.25em;
}

tbody tr:nth-of-type(odd) {
  background-color: rgba(0, 0, 0, 0.05);
}

/* Mobile size */
@media (max-width: 700px) {
  .page {
    display: inline;
  }

  .small-hide {
    display: none;
  }

  #header h1 {
    padding: 0.75rem 0.5rem;
  }

  .form {
    display: flex;
    flex-direction: column;
    grid-row-gap: revert;
  }

  .form-field {
    display: flex;
    flex-direction: column;
  }

  .left-menu li {
    padding: 0.5em;
    border: solid thin #ccc;
    border-bottom: none;
    text-align: center;
  }

  .left-menu li > * {
    /* make a take up the whole width of the li */
    display: block;
  }

  .left-menu ul > li:first-child {
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
  }

  .left-menu .lm-last {
    border-bottom: solid thin #ccc;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
  }

  .lm-more {
    display: inherit;
  }

  .lm-sep {
    display: none;
  }

  input,
  select {
    width: inherit;
    font-size: 1em;
  }

  input[type="submit"],
  input[type="button"] {
    width: 100%;
    padding: 0.5rem;
  }

  ul#id_brew_rating input {
    margin-left: 3px;
    margin-right: 3px;
  }
}

/* Hide LogEntry table columns on different screen sizes, base on priority */
@media (max-width: 767px) {
  #logentry-list .pri3 {
    display: none;
  }
}

.nojs-hide {
  /* Hide components by default that are only used in JS-enabled browsers */
  display: none;
}
