html {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  font-family: sans-serif;
}

#banner {
  background-color: #7bf;

  a {
    display: inline-block;
    text-decoration: none;
    font-size: 2em;
    margin: .25em 1em;

    &, &:visited {
      color: black;
    }
  }
}

#container {
  display: flex;
  flex-direction: row;
  flex: 1;
}

#sidebar {
  width: 12%;
  background-color: #333;
  margin: 0;
  padding: 1em 0;

  .major {
    display: block;
    color: white;

    &.active {
      background-color: #648;
    }

    &.inactive {
      .minors {
        display: none;
      }
    }

    a {
      display: block;
      text-decoration: none;

      &, &:visited {
        color: #ddd;
      }
    }

    .minors {
      display: block;
      background-color: #666;
    }

    .minor {
      list-style-type: none;
      font-size: small;
    }

    .major-link, .minors {
      padding: .25em 1em;
    }
  }
}

#main {
  width: 88%;
  padding: 1em;
  background-color: #eee;
}

#entry-form {
  display: grid;
  grid-template-columns: 73% 27%;
  height: 100%;

  fieldset {
    border: 0;
  }

  #details {
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding-left: 0;
    padding-right: 0;
  }

  .title-field {
    label {
      display: none;
    }

    input {
      width: 100%;
      font-size: 1.5em;
      box-sizing: border-box;
    }
  }

  .url-field {
    label {
      display: none;
    }

    input {
      width: 100%;
    }
  }

  .slug-field {
    display: flex;
    font-size: 0.75em;
    margin-bottom: 1em;

    input {
      padding: 0;
      border: 0;
      color: #666;
      width: 100%;
      box-sizing: border-box;
      background-color: #eee;
      text-decoration: underline;

      &:focus {
        outline: 0;
      }
    }
  }

  .body-field {
    height: 100%;

    label {
      display: none;
    }

    textarea {
      width: 100%;
      height: 100%;
    }
  }

  .halfbody-field {
    height: 40%;

    label {
      display: none;
    }

    textarea {
      width: 100%;
      height: 100%;
    }
  }
}

#entries {
  border-spacing: 0;
  width: 100%;

  th {
    text-align: left;
    padding: .25em;
    font-weight: normal;
    background-color: #35a;
    color: #eee;
  }

  tr {
    &.even {
      background-color: #fff;
    }

    &.odd {
      background-color: #edf;
    }
  }

  td {
    padding: .25em;
  }

  .admin-actions {
    margin: 0;

    li {
      display: inline;

      &+li:before {
        content: " - ";
      }
    }
  }
}

.details-module {
  background-color: white;
  border-radius: 5px;
  padding: .5em;
  margin-bottom: 1em;

  h4 {
    margin-top: 0;
    margin-bottom: 0.5em;
  }

  img {
    max-width: 100%;
  }
}

.image-uploads {
  pre {
    overflow: auto;
    max-width: 100%;
    padding-bottom: 1em;
  }
}

.should-create-record-field {
  label {
    font-size: .75em;
  }
}

.published-field {
  label {
    font-size: .75em;
  }
}

.tags-field {
  label {
    font-size: .75em;
    display: block;
    margin-bottom: 0.5em;
  }
}

.record-description-field {
  display: none;
  margin-top: 1em;

  textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #ddd;
  }
}

#errors {
  padding-left: 0;
  border: 2px solid red;

  h3 {
    margin: 0 0 .25em 0;
    text-align: center;
  }

  ul {
    margin: 0;
    padding-left: 1em;
    font-size: 0.75em;
  }

  li {
    display: block;
  }
}

#entry-preview-link {
  a {
    text-decoration: none;

    &:hover {
      text-decoration: underline;
    }
  }
}

#flash {
  display: inline-block;
  color: black;
  background-color: white;
  padding: .5em .75em;
  font-size: .8em;
  -webkit-box-shadow: 1px 1px 5px 0px rgba(0,0,0,0.75);
  -moz-box-shadow: 1px 1px 5px 0px rgba(0,0,0,0.75);
  box-shadow: 1px 1px 5px 0px rgba(0,0,0,0.75);
  vertical-align: text-bottom;
}

.flash-tag {
  font-weight: bold;
}

.flash-alert {
  border-left: 5px solid red;
}

.flash-notice {
  border-left: 5px solid green;
}