.display-options {
  height:100%;
  padding:0px 20px 0px 20px;

  > * {
    display:inline-block;
    vertical-align:middle;
  }
}

.forum h3 {
  margin:0px 80px 0px 20px;
  font-weight:bold;
}

.forum-narrow .forum-narrow-hide {
  display: none;
}

.post-bg-alternate:nth-of-type(odd) {
  @include usevar('background-color', 'forum-even-background');
}

.thread-list-item .latestpost {
  width: 16.5rem;
}

.thread {
  @include usevar('color', 'fg-font-color');

  @extend .ma0;

  .profile & {
    padding-left:15px;
  }

  .title {
    font-weight: bold;

    transition: border-bottom-color 0.1s;
    border-bottom-color: transparent;

    &:hover {
      border-bottom-color: initial;
    }
  }

  .forum & .info th {
    width: 50px;
  }
}

.avatar-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 100%;
  overflow: hidden;
  @include usevar(background-color, dimmest-color);
}

:root {
  @include usevar(--fade-color, 'content-background');
}

.excerpt-fade {
  background-image: linear-gradient(to top, var(--fade-color), rgba(0, 0, 0, 0));
  pointer-events: none;
}

.read {
  @include usevar('color', 'forum-thread-read-color');

  td {
    @include usevar('color', 'forum-thread-read-color');
  }

  a {
    @include usevar('color', 'forum-thread-read-link-color');
  }

  .title {
    font-weight: 500;
  }
}

.goto {
  font-size: 200%;
  width: 30px;

  a {
    display: block;
    padding: 0px 10px;
    box-sizing: border-box;
    position: relative;
    line-height: 100%;
    background-color: transparent;
  }
}

.badge {
  display: inline-block;
  border-radius: 1000em;
  padding: 0 0.8em;
  font-size: 0.9em;
  line-height: 1.8em;
  font-weight: bold;

  &.staff {
    background-color: #17b2c6;
    color: white;

    &::before {
      content: 'Staff';
    }
  }
}

.postid a {
  margin-top: -4rem;
  padding-top: 4rem;
  outline: none;
}

.codeblocktable {
  font-family: $monospace-fonts;
  font-size:14px;
  overflow:auto;
  line-height:1.5em;

  tbody {
    width:100%;
  }

  .linenos {
    @include usevar(color, 'code-line-number-color');

    font-weight:500;
    padding: 5px;
    background: rgba(0, 0, 0, 0.15);
  }

  .code {
    /* Background color given by theme */
    padding-right:20px;
    padding-left:10px;
    max-width:80em;
  }
}

.post {
  .action.button {
    padding:0px 10px;
    margin-top:0px;
    margin-right:4px;
    background-color:transparent;
    font-size:130%;
    border-radius:0px;
    border-width:0px;
    border-bottom-width:2px;
    transition:border-bottom-width 0.1s;

    &:hover {
      border-bottom-width:4px;
    }
  }
}

.blog {
  .post {
    .meta {
      position:relative;
    }

    &.op .meta {
      margin-bottom:10px;
    }

    .badges {
      width: 40px;
      font-size: 0.7em;
      text-align: center;
    }
  }

  .sidebar {
    .post > .author {
      padding:15px;
      text-align:center;
    }

    .recent-posts {
      text-align:center;
      padding:15px;

      h2 {
        display:inline;
      }
    }

    .archive ul {
      list-style-type:none;
      text-align:left;
    }
  }

  .post-list {
    .post {
      &:nth-child(even) {
        background-color: transparent;
      }
    }
  }
}

.featured-post .meta .avatar-icon {
  left:-60px;
  bottom:-5px;
}

.content-block.blog {
  p.title {
    font-weight:bold;

    a {
      border-bottom-width:0px;

      &:hover {
        border-bottom-width:1px;
      }
    }
  }
}

a.mark_as_read {
  float: right;
}

.mark_as_read_toplevel_forum {
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  text-align: center;

  a {
    text-decoration: underline;
  }
}

div.mark_as_read_toplevel_blog {
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  text-align: center;

  a {
    text-decoration: none;
  }
}

.mark_as_read_toplevel_blog 
div.mark_as_read_site {
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  text-align: center;

  a {
    text-decoration: none;
  }
}

.mark_as_read_site 
li.post-entry {
  margin-left:0px;
  margin-bottom: 3px;
}

.diff {
  width:100%;
  max-height:100vh;
  overflow-y:scroll;
  margin-top:20px;

  > .post-source {
    @include usevar(color, 'fg-font-color');
    @include usevar(background-color, 'forum-diff-source-background');
    @include usevar(border-color, 'forum-diff-source-border-color');

    border-width: 1px;
    border-radius: 2px;
    font-family: $monospace-fonts;
    width:49%;
    box-sizing:border-box;
    padding: 4px;
    display:inline-block;
    vertical-align: top;
  }

  .diff-replace,
  .diff-delete,
  .diff-insert,
  {
    border-width: 1px;
    border-radius: 2px;
    padding: 1px;
  }

  .diff-replace {
    @include usevar(background-color, 'forum-diff-replace-background');
    @include usevar(border-color, 'forum-diff-replace-border-color');
  }

  .diff-delete {
    @include usevar(background-color, 'forum-diff-delete-background');
    @include usevar(border-color, 'forum-diff-delete-border-color');
  }

  .diff-insert {
    @include usevar(background-color, 'forum-diff-insert-background');
    @include usevar(border-color, 'forum-diff-insert-border-color');
  }
}

.index {
  list-style-type:none;
  -webkit-column-count: 3;
  -moz-column-count: 3;
  column-count: 3;
  margin-top:20px;

  .index-category {
    margin-bottom:20px;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
    break-inside: avoid-column;
  }
}

.bbtable {
  width: 100%;
  border: 1px solid;

  td, th {
    border: 1px solid;
    padding: 4px;
  }

  th {
    background: rgba(0, 0, 0, 0.15);
    font-weight: bold;
    border-bottom-width: 2px;
  }

  tbody tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.05);
  }
}
