// Forum View
// -------------------------

// Subforums list
.forum-subforums-list {
  background-color: @categoryBackground;
  border: 1px solid @categoryBorder;
  border-radius: @borderRadiusSmall;
  .box-shadow(0px 0px 0px 3px @categoryShadow);
  margin-bottom: @baseLineHeight;

  .header {
    background-color: @categoryHeader;
    border: 1px solid @categoryBorder;
    border-radius: @borderRadiusSmall @borderRadiusSmall 0px 0px;
    margin: -1px;
    margin-bottom: 0px;
    padding: (@fontSizeSmall / 3) (@fontSizeSmall - 2px);

    h2 {
      margin: 0px;
      padding: 0px;

      color: @grayDark;
      font-size: @fontSizeSmall;
      font-weight: bold;
      line-height: @baseLineHeight;
      text-align: left;

      small {
        margin-left: @baseFontSize / 2;

        color: @grayLight;
        font-size: @fontSizeSmall;
      }
    }
  }

  .forum {
    border-bottom: 1px solid @categoryBorder;
    height: 21px;
    overflow: visible;
    padding: ((@fontSizeLarge / 2) + 6px) (@fontSizeSmall - 2px);

    &.last {
      border-bottom: none;
    }

    .forum-icon {
      float: left;

      .forum-icon-wrap {
        background-color: @itemOldColor;
        border: 1px solid darken(@itemOldColor, 10%);
        border-radius: @baseBorderRadius;
        padding: (@forumIconSize - 1px) @forumIconSize;

        &.forum-icon-new {
          background-color: @itemNewColor;
          border: 1px solid darken(@itemNewColor, 10%);
        }

        &.forum-icon-redirect {
          background-color: @itemMovedColor;
          border: 1px solid darken(@itemMovedColor, 10%);
        }
      }
    }

    .forum-main {
      margin-left: 34px;

      h3 {
        float: left;
        margin: 0px;
        padding: 0px;

        font-size: @fontSizeLarge;
        font-weight: normal;
        line-height: @baseLineHeight;

        a:link, a:visited {
          color: @textColor;
        }
      }

      .dropdown {
        float: right;
        right: @baseFontSize;

        .subforum {
          &:link, &:visited {
            color: @grayLight;
            font-weight: bold;
          }

          &:hover, &:active {
            color: @textColor;
          }
        }

        .dropdown-toggle {
          padding: 4px 8px;
          .opacity(60);

          color: @textColor;
          font-weight: bold;

          &:hover, &:active, &:focus {
            .opacity(100);

            text-decoration: none;
          }
        }

        &.open .dropdown-toggle {
          background-color: @categoryShadow;
          border-radius: @baseBorderRadius @baseBorderRadius 0px 0px;
          .opacity(100);
          padding-bottom: 6px;

          text-decoration: none;
        }

        .dropdown-menu {
          background: none;
          border: none;
          box-shadow: none;

          .dropdown-shadow{
            border-radius: @baseBorderRadius;
            .box-shadow(0px 0px 3px @grayLight);
            width: 256px;
            position: relative;
            right: 0px;
            top: -4px;

            ul {
              background-color: @bodyBackground;
              border-radius: @baseBorderRadius;
              margin: 0px;
              padding: 0px;

              li {
                margin: 0px;
                padding: 0px;
                list-style: none;

                a {
                  border-bottom: 1px dotted @categoryBorder;
                  display: block;
                  .opacity(70);
                  padding: 6px 8px;

                  color: @textColor;
                  text-decoration: none;

                  &:hover, &:active {
                    .opacity(100);
                  }
                }

                &:last-child a {
                  border-bottom: none;
                }
              }
            }
          }
        }
      }

      .forum-details {
        border-left: 1px dotted darken(@categoryBackground, 12%);
        float: right;
        margin: -10px 0px;
        margin-top: ((@baseFontSize - @fontSizeSmall) * -1) - 6px;
        padding-left: @baseFontSize;
        height: 35px;
        width: 220px;

        .thread-name {
          a:link, a:active, a:visited, a:hover {
            margin-bottom: 1px;

            color: @textColor;
            font-size: @fontSizeSmall;
            font-weight: bold;
          }
        }

        .muted {
          font-size: @fontSizeMini;
          line-height: @fontSizeMini;

          .last-poster, a:link, a:active, a:visited, a:hover {
            color: @gray;
          }
        }

        em {
          position: relative;
          top: (35px - @baseLineHeight) / 2;

          color: @grayLight;

          strong {
            color: @textColor;
            font-weight: normal;
          }
        }
      }

      .forum-meta-tooltip {
        .tooltip-inner {
          max-width: 400px;
          text-align: left;

          .forum-stats {
            color: @grayLight;
            font-size: @fontSizeMini;

            strong {
              color: @white;
            }

            span {
              margin-right: @baseFontSize;
            }
          }

          .forum-description {
            clear: both;
            margin: 0px;
            margin-bottom: @baseFontSize / 2;
            padding: 0px;

            color: @grayLighter;
            font-size: @baseFontSize;
          }
        }
      }
    }
  }

  &.forum-subforums-important {
    .header {
      background-color: @red;
      border: 1px solid darken(@red, 10%);

      h2 {
        color: @white;
        text-shadow: 0px 1px 0px darken(@red, 25%);

        small {
          color: darken(@red, 40%);
          text-shadow: none;
        }
      }
    }
  }

  &.forum-subforums-inverse {
    .header {
      background-color: @grayDark;
      border: 1px solid darken(@grayDark, 10%);

      h2 {
        color: @grayLighter;
        text-shadow: 0px 1px 0px darken(@black, 25%);

        small {
          color: lighten(@grayLight, 10%);
          text-shadow: none;
        }
      }
    }
  }

  &.forum-subforums-info {
    .header {
      background-color: @bluePale;
      border: 1px solid darken(@bluePale, 10%);

      h2 {
        color: @white;
        text-shadow: 0px 1px 0px darken(@bluePale, 25%);

        small {
          color: darken(@bluePale, 25%);
          text-shadow: none;
        }
      }
    }
  }
}

// Threads list
.forum-threads-list {
  background-color: @categoryBackground;
  border: 1px solid @categoryBorder;
  border-radius: @borderRadiusSmall;
  .box-shadow(0px 0px 0px 3px @categoryShadow);
  margin-bottom: @baseLineHeight;

  table {
    margin: 0px;

    th {
      background-color: @bodyBackground;
      border-bottom: 1px solid @grayLighter;
      padding: @paddingSmall;

      color: @grayLight;
      font-size: @fontSizeSmall;
    }

    td {
      vertical-align: middle;

      &.threads-list-empty {
        padding: @paddingLarge;

        font-size: @fontSizeLarge;
        text-align: center;
      }

      .thread-icon {
        &:link, &:active, &:visited, &:hover {
          background-color: @itemOldColor;
          border: 1px solid darken(@itemOldColor, 15%);
          border-radius: @baseBorderRadius;
          margin-right: @baseFontSize / 2;
          padding: 3px 4px;

          &.thread-new {
            background-color: @itemNewColor;
            border: 1px solid darken(@itemNewColor, 15%);
          }
        }

        i {
          background-image: url("@{iconWhiteSpritePath}");
        }
      }

      .thread-name {
        color: @textColor;
        font-weight: bold;
      }

      .thread-details, .thread-last-reply {
        color: @grayLight;

        a:link, a:visited {
          color: @textColor;
        }
      }

      .thread-details {
        font-size: @fontSizeMini;
      }

      .thread-flags {
        float: right;
        margin: 0px;
        .opacity(80);
        padding: 0px;

        li {
          margin-left: 3px;
          float: left;
        }
      }

      .thread-rating {
        background-color: @grayLighter;
        border-radius: @baseBorderRadius;
        padding: 4px;

        color: @grayLight;
        font-size: @fontSizeLarge;
        font-weight: bold;
        text-align: center;

        &.thread-rating-negative, &.thread-rating-positive {
          color: @white;
        }

        &.thread-rating-negative {
          background-color: @red;
        }

        &.thread-rating-positive {
          background-color: @green;
        }
      }
    }

    th, td {
      &.check-cell {
        width: 1%;
        text-align: center;
        vertical-align: middle;

        .checkbox {
          margin: 0px;
          padding: 0px;

          input {
            margin: 0px;
            padding: 0px;
            position: relative;
            top: 3px;
          }
        }
      }
    }

    th.check-cell {
      input{
        right: 2px;
      }
    }
  }

  .threads-actions {
    background-color: @bodyBackground;
    border-top: 1px solid @categoryBorder;
    border-radius: 0px 0px @borderRadiusSmall @borderRadiusSmall;
    overflow: auto;
    padding: 4px;

    color: @grayLight;
    font-size: @fontSizeSmall;

    form {
      margin-bottom: 0px;
    }
  }
}

.forum-threads-extra {
  overflow: auto;

  &.extra-top {
    margin-bottom: @baseLineHeight;
  }

  .threads-signin-message {
    float: right;

    a:link, a:visited {
      color: @textColor;
    }
  }
}