// Forum home page (thread list)
ul.threads {
  padding-bottom: 6px;
  margin: 0;

  .list-unstyled();

  li {
    padding: 3px 0;
    margin: 15px auto;
    font-size: 12px;

    @avatar-size: 45px;
    @avatar-full-height: 50px;

    .entry {
      position: relative;
      top: 7px;
      min-height: @avatar-full-height;
      display: block;
      padding: 5px 5px @line-height-computed;
      margin-left: 52px;
      text-align: left;
      box-shadow: 0 6px 6px -8px silver;
      .border-right-radius(@border-radius-small);

      > h4 {
        margin-top: 0;

        > a {
          color: cadetblue;
        }
      }

      .details {
        left: 4px;
        top: 23.5px;

        .datetime {
          position: relative;
          top: 1px;
          color: @gray;
        }
      }

      .comments {
        top: 10.6%;
        text-align: right;

        > p {
          float: left;

          .hilight-view {
            position: relative;
            color: coral;
            top: 1px;
            font-weight: bold;
          }
        }

        > p > a {
          position: relative;
        }

        .divider {
          position: relative;
          top: 1px;
        }
      }

      @media (min-width: @screen-sm-min) {
        /* on screens large enough, put author and comments at bottom of .entry */
        .details {
          position: absolute;
          bottom: 0;
          left: 0;
          padding: 5px;
        }

        .comments {
          position: absolute;
          bottom: 0;
          right: 0;
          padding: 5px;
        }
      }
    }

    .avatar {
      float: left;
      position: relative;
      top: 9px;

      > img {
        .square(@avatar-size);

        margin-top: (@avatar-full-height - @avatar-size);
        margin-right: 10px;
        background-color: white;
        border-radius: 50% !important;
        -webkit-border-radius: 50% !important;
        -moz-border-radius: 50% !important;
      }
    }
  }

  /* archives */
  &-archives {
    margin: 0;

    li {
      list-style: none;
      padding: 2px 10px;
    }

    .comments {
      color: grey;
    }
  }
}

// A single thread view
.thread {

  .posts {
    .list-unstyled();

    > li {
      margin-bottom: -11px;
    }
  }
}

.post {
  margin-bottom: 1em;

  .date {
    .small();
    color: grey;
  }

  .media-body {
    padding-top: 0.5em;
    padding-left: 0.5em;
    border-radius: 2px 4px 4px 0;
    text-align: justify;
    padding-right: 9px;
    box-shadow: 0 4px 2px -4px silver;

    .attachments img {
      vertical-align: middle;
    }
  }

  .media-post-tail {
    content: ' ';
    position: relative;
    width: 0;
    height: 0;
    border: 6px solid;
    border-color: ghostwhite transparent transparent ghostwhite;
    top: 0;
    left: 63px;
    z-index: 1;
  }

  blockquote {
    font-size: inherit;
  }

  .history {
    font-size: 90%;
    font-style: italic;
    color: @gray-light;
    text-align: right;

    .reason {
      display: block;
      text-align: right;
      max-width: 50%;
      margin-left: auto;
      color: @gray-dark;
    }
  }
}

.content-required {
  color: coral;
}

// hilight not viewed number
.thread-hilightview {
  position: relative;
  top: -0.4pt;
  color: lightcoral;
  font-weight: bold;
}

.thread-title {
  text-decoration: none;
  color: gray;
  font-weight: bold;
  font-size: 11.5pt;
}

.forum-action-dropdownmenu {
  position: absolute;
  top: 25px;
  border-radius: 0;
  box-shadow: none;
}

.thread-participants-logo {
  margin-right: -13px;

  > .avatar {
    border: 2px solid white;
  }
}

.thread-list-title {
  text-align: justify;
  margin-right: 23px;
  line-height: 21px;
  font-size: 12pt;
}

.thread-title:hover {
  text-decoration: none;
  color: #858585;
}

//thread frequent posters
.thread-frequent-posters {
  position: relative;
  left: -9px;
}

//first column in thread table
.thread-user {
  width: 4%;
  position: relative;
  left: -6px;
}

.community-header {
  margin: 0 0 19px;
  position: relative;
  left: 0;
  font-size: 15pt;
  color: silver;
  top: -3px;
}

.forum-menu-container {
  background: white;
  position: relative;
  padding-right: 5px;
  top: -15px;
  width: auto;
  padding-bottom: 52px;
  border-radius: 0 0 3px 3px;
  margin-bottom: 15px;
  margin-right: -15px;
  margin-top: 20px;
}

.forum-action-conversation {
  background-color: yellowgreen !important;
  float: right;
  position: relative;
  right: 6px;

  > a {
    color: white;
  }

  > a:first-child {
    color: white;
    font-weight: bold;
  }
}

// The forum's menu
.forum-menu, .forum-menu-admin {
  position: relative;
  float: left;
  right: 1px;
  top: 5.5px;
  margin-bottom: -3px;

  > button {
    background: white;
  }

  button:nth-child(6) {
    background-color: yellowgreen;
    float: right;
    position: relative;
    right: 6px;

    > a {
      color: white;
    }

    > a:first-child {
      color: white;
      font-weight: bold;
    }
  }

  > a:hover {
    color: gray;
  }

  > div > a {
    text-decoration: none;
    color: #95989A;
  }

  > button > a:hover {
    color: gray;
  }
}

.forum-menu-admin {
  right: -488px;
}

.thread-viewers {
  position: relative;
  color: gray;
}

// the table of threads
.thread-table {
  width: 100%;

  > tbody > tr {
    border-bottom: 1px solid #e9e9e9;

    > th:nth-child(1) {
      width: 55%;
    }

    > th:nth-child(2) {
      width: 22%;
    }

    > th:nth-child(n+3) {
      text-align: center;
    }

    > td > div.entry {
      margin-top: -9px;

      > p {
        color: silver;
        position: relative;
        top: -9px;
        margin-bottom: -9px;
        margin-right: 29px;
      }
    }
  }

  > tbody > tr:first-child {
    color: #919191;
    border-bottom: 4px solid ghostwhite;
  }

  > tbody > tr > td {
    padding: 7px;
  }

  > tbody > tr > td > center > a {
    text-decoration: none;
  }

  > tbody > tr > th {
    font-weight: normal;
    padding-bottom: 12px;
  }

  > tbody > tr:last-child {
    border-bottom: 1px solid white;
  }
}

// forum menu active button
div.forum-btn-active {
  background: #12A2EA;

  > a {
    color: white;
    font-weight: bold;

    > i {
      float: right;
      left: 9.5px;
      top: 3.5px;
      color: gray;
      font-weight: normal;
    }
  }
}

button.forum-btn-active:hover {
  background-color: #12A2EA;
}

.forum-divider {
  border-bottom: 1px dashed #eee;
  position: relative;
  top: 17px;
  margin-bottom: 32px;
}

.forum-thread-divider {
  margin-top: 5px;
  border: 1px dashed ghostwhite;
}

.forum-action {
  border: none;
  padding: 10px;
}

.forum-action-dropdown {
  border-radius: 0;
  padding: 9px;
  position: relative;
  top: -0.5px;
  color: silver;
  border: 0;

  > a {
    color: #95989A;
    text-decoration: none;
  }
}

.forum-action-active {
  border: none;
  padding: 10px;
  border-bottom: 2px solid gray;
}

.thread-title-counter {
  float: right;
  background: ghostwhite;
  color: silver;
  padding: 2px;
  border-radius: 3px;
  font-size: 8pt;
  font-weight: bold;
  margin-top: 2px;
  margin-bottom: -7px;
  border: 1px solid #ddd;
}

.attachment-item {
  line-height: 30px;
  position: relative;
  top: -8px;
  left: -7px;
}

.conversation-back-btn {
  color: gray;
  font-weight: bold;
  background: ghostwhite;
  text-decoration: none;
  padding: 8px 10px;
}

.conversation-new-btn {
  border: none;
  padding: 6px 10px;
}

.attachment-table {
  width: 100%;

  > tbody > tr {
    border-bottom: 1px solid #e9e9e9;

    > th:nth-child(1) {
      width: 55%;
    }

    > th:nth-child(4) {
      text-align: right;
      position: relative;
      right: 12px;
    }

    > td:nth-child(1) {
      > a {
        color: gray;
        font-weight: bold;
        font-size: 12pt;
      }
    }

    > td:nth-child(2) {
      text-align: center;
    }

    > th:nth-child(2) {
      width: 22%;
    }

    > td > div.entry {
      margin-top: -9px;

      > p {
        color: silver;
        position: relative;
        top: -9px;
        margin-bottom: -9px;
        margin-right: 29px;
      }
    }
  }

  > tbody > tr:first-child {
    color: #919191;
    border-bottom: 4px solid ghostwhite;
  }

  > tbody > tr > td {
    padding: 7px;
  }

  > tbody > tr > td > center > a {
    text-decoration: none;
  }

  > tbody > tr > th {
    font-weight: normal;
    padding-bottom: 12px;
  }

  > tbody > tr:last-child {
    border-bottom: 1px solid white;
  }
}

//Thread replies
.thread-replies {
  text-decoration: none;
  color: gray;
  font-weight: bold;
  position: relative;
}

//Thread viewed times
.thread-viewed-times {
  position: relative;
  color: gray;
}

.thread-unread-posts {
  padding: 3px 7px;
  margin: 0 4px 2px 3px;
  font-size: 12px;
  font-weight: bold;
  color: #fff;
  background-color: #777;
  border-radius: 10px;
}

//forum number of conversations
.forum-nb-conversation {
  color: silver;
  font-size: 12pt;
}

.manager-thread-viewers {
  background: linear-gradient(to right, white, ghostwhite);
  border-radius: 2px;
  color: gray;
  padding-top: 8px;
  padding-bottom: 8px;
  padding-left: 8px;
  position: relative;
  top: 4px;
  left: -7px;
  width: 101%;
}

.thread-all {
  position: relative;
  left: 8px;

  > a {
    position: relative;
    left: 4px;
    color: gray;
  }
}

.thread-current-title {
  color: #515353;
  font-family: sans-serif;
  font-size: 14pt;
}

.thread-current-replies {
  font-size: 14pt;
  font-weight: normal;
  position: relative;
}

.viewed {
  color: gray;
  position: relative;
  left: 2.5px;
}

.panel-body-pos {
  position: relative;
  top: -20px;
}

.viewers-panel-container {
  border: 1px solid #e9e9e9;
  margin-left: 48px;
}

.viewers-panel-info {
  list-style: none;
  display: inline-flex;
  background: ghostwhite;
  width: 100%;
  padding-top: 5px;
  padding-bottom: 6px;
  margin-bottom: 0;

  > li {
    padding-right: 15px;
    position: relative;
    left: -26px;

    > center > span {
      color: gray;
    }

    > span {
      color: gray;
      line-height: 21px;
      text-align: center;
    }

    > span.viewers-panel-count {
      font-weight: bold;
      color: #4e4e4e;
    }

    > a > img {
      position: relative;
      top: -2px;
    }

    .viewers-panel-label {
      color: #4e4e4e;
    }
  }

  > li:nth-child(n+3) {
    text-align: center;
  }

  > .viewers-panel-posters {
    position: relative;
    top: 7px;
  }
}

.viewers-panel-button {
  position: relative;
  border: none;
  background: ghostwhite;
  float: right;
  top: -54px;
  border-left: 1px solid #e9e9e9;
  padding: 17px 25px;
  color: silver;
}

.viewers-panel-button:hover {
  background: #e9e9e9;
  color: #4e4e4e;
}

.viewers-panel-content {
  border: 1px solid #e9e9e9;
  background: ghostwhite;
  padding-top: 17px;
  padding-left: 11px;
  padding-bottom: 19px;
  margin-left: 48px;
  margin-bottom: 2px;
  display: none;

  > p {
    color: #4e4e4e;
  }

  > hr {
    margin-left: -11px;
    margin-top: 17px;
    margin-bottom: 17px;
  }
}

@media only screen and (max-width: 993px) {
  .container {
    width: 95%;
  }
}

@media only screen and (max-width: 776px) {
  .thread-table {
    > tbody > tr {
      > th:nth-child(4), td:nth-child(4) {
        display: none;
      }

      > th:nth-child(5), td:nth-child(5) {
        display: none;
      }
    }
  }
}

@media only screen and (max-width: 855px) {
  .thread-participants-logo {
    margin-right: -13px;

    > .avatar {
      display: none;
    }
  }

  .thread-table {
    > tbody > tr {
      > th:nth-child(1) {
        width: 85%;
      }

      > th:nth-child(2) {
        width: 0;
      }

      > td:nth-child(2) {
        > a > img {
          position: relative;
          left: 25%;
        }
      }
    }
  }
}
