$sidebar-width: 260px;
$header-height: 60px;
$primary: #2E8CFF;

//=======================================//

html, body {
  font-family: 'Source Sans Pro', monospace, sans-serif;
  font-size: 100%;
  line-height: 1.65;
}

body.noscroll {
  overflow: hidden;
}

a,
a:visited,
a:focus {
  // color: inherit;
  text-decoration: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

[align="center"] {
  display: block;
  text-align: center;
  margin: auto;
}

code, kbd, pre, samp {
  max-width: 800px;
  font-size: 14px;
}

code {
  border-radius: 4px;
}

h2 {
  padding-bottom: 0.3em;
  border-bottom: 1px solid #eee;
}

blockquote {
  padding: 0.75em;
  padding-left: 1em;
  margin: 0;
  font-size: 0.95em;
  color: rgba(black, 0.6);
  background: rgba(#2E8CFF, 0.05);
  border-left: 0.25em solid rgba(#2E8CFF, 0.5);
  width: 100%;

  > p {
    margin: 0;
  }
}

*,
::after,
::before {
  box-sizing: border-box;
}

input[type="search"] {
  padding: 1em;
  font-size: 1em;
  width: 100%;
  border: none;
  outline: none;
  box-sizing: border-box;
}

header {
  width: 100%;
  background: $primary;
  color: white;
  padding: 0.75em 1em;
  overflow: hidden;

  .title {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    margin-bottom: 0.25em;
  }

  .info {
    display: flex;
    justify-content: space-between;
    align-items: center;

    span.version {
      opacity: 0.6;
      font-style: italic;
      font-size: 0.9em;
    }

    .github {
      font-size: 12px;
      display: flex;
      align-items: center;
      color: white;
      padding: 5px 10px;
      border-radius: 4px;
      background: rgba(white, 0.1);
      transition: background 150ms ease;

      &:hover {
        background: rgba(white, 0.2);
      }

      img {
        margin-left: 0.75em;
      }
    }
  }
}

main {
  display: flex;
  flex-direction: row;

  aside {
    min-width: $sidebar-width;
    border-right: 1px solid #eee;
    position: fixed;
    top: 0;
    width: $sidebar-width;
    height: 100vh;
    box-shadow: 2px 0 16px 0 rgba(0, 0, 0, 0.05);

    footer {
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      width: 100%;
      padding-top: 0.25em;
      text-align: center;
      font-size: 13px;
      border-top: 1px solid #ddd;
      background: rgba(black, 0.05);
      z-index: 10;

      a {
        color: $primary;
        border-bottom: 1px dotted;
        font-weight: bold;
      }
    }

    ul {
      height: calc(100vh - 136px);
      overflow-y: scroll;
      list-style: none;
      padding: 0;
      padding-bottom: 5em;
      margin: 0;

      li.heading,
      li.subheading {
        text-transform: capitalize;

        &.noclick a {
          background: transparent!important;
        }

        a {
          display: block;
          font-size: 0.9em;
          padding: 0.75em 1.5em;
          border-bottom: 1px solid #eee;
          color: #858585;
          transition: background 150ms ease;

          &:hover {
            background: lighten(#f4f4f7, 2%);
          }

          &.active {
            color: $primary;
          }

          &:first-of-type a {
            border-top: 1px solid #eee;
          }
        }
      }

      li.heading a {
        color: darken(#252525, 10%);
        font-size: 14px;
        padding: 0.75em 1.5em;
      }

      li.subheading a {
        padding: 0.5em 1.5em 0.5em 2.5em;
      }
    }
  }

  section {
    max-width: calc(100% - #{$sidebar-width});
    flex: 1;
    margin-left: $sidebar-width;

    .component {
      padding-bottom: 150px;
    }

    header {
      padding: 0.75em;
      background: white;
      margin-top: -1px;
      margin-bottom: 0;
      border-top: 1px solid #eee;
      border-bottom: 1px solid #eee;
    }

    h1 {
      color: black;
    }

    article {
      padding: 4em 23%;
      border-bottom: 1px solid #eee;
      transition: background 0.1s ease;

      ul.params li > span {
        color: #A8A8AB;
      }

      &:hover {
        background: white;
      }

      h2 {
        font-size: 1.6em;
      }
    }
  }
}

code.lang-shell {
  display: block;
  padding: 0.6em;
}

code {
  background: #f4f4f7;
  padding: 6px;

  div {
    margin: 0;
    display: block;
  }
}

.badge {
  padding: 4px 8px;
  font-size: 11px;
  background: #ccc;
  border-radius: 20px;
  margin-left: 1em;
  vertical-align: middle;
  color: white;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2em;
}

table {

  th, td {
    padding: 0.75em 1.5em 0.75em 1em;
  }

  thead {
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 11px;
    opacity: 0.4;
  }

  tbody td {
    border-bottom: 1px solid rgba(black, 0.03);
    line-height: 1.65;
    color: lighten(black, 40%);
  }

  td > strong {
    color: black;
  }
}
