//
// Board index page
// --------------------------------------------------

.index-sidebar {
  position: relative;
  bottom: 9px;
}

// Forums list
// -------------------------
.index-category {
  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;
          }
        }
      }
    }
  }

  &.index-category-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;
        }
      }
    }
  }

  &.index-category-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;
        }
      }
    }
  }

  &.index-category-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;
        }
      }
    }
  }
}

.index-forums-read-all {
  margin: 0px;
  padding: 0px;

  .btn-link {
    margin: 0px;
    .opacity(50);
    padding: 0px;

    color: @textColor;
    font-weight: bold;

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

// Online list
// -------------------------
.index-ranks-list {
  h3 {
    margin: 0px;
    padding: 0px;

    color: @grayLight;
    font-size: @fontSizeLarge;
    font-weight: bold;

    a:link, a:active, a:visited, a:hover {
      color: @grayLight;
      font-size: @fontSizeLarge;
      text-decoration: none;
    }
  }

  ul {
    background-color: @white;
    border: 1px solid darken(@bodyBackground, 10%);
    border-radius: @baseBorderRadius;
    margin: 0px;
    margin-bottom: @baseLineHeight;
    padding: 0px;

    li {
      border-bottom: 1px dotted darken(@bodyBackground, 10%);
      margin: 0px;
      padding: 6px 8px;

      font-weight: bold;

      img {
        background-color: @white;
        border-radius: @borderRadiusSmall;
        width: 28px;
        height: 28px;
      }

      .user-name {
        &:link, &:active, &:visited, &:hover {
          position: relative;
          top: (@fontSizeLarge - @baseFontSize) / 2;
          margin: 0px 4px;

          color: @textColor;
          font-size: @fontSizeLarge;
        }
      }

      .label {
        float: right;
        position: relative;
        top: (@fontSizeLarge - @baseFontSize) + 1px;
      }

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

// Popular threads
// -------------------------
.index-popular-threads { 
  h3 {
    margin: 0px;
    margin-bottom: (@baseLineHeight * -0.5);
    padding: 0px;

    color: @grayLight;
    font-size: @fontSizeLarge;
    font-weight: bold;
  }

  ul {
    margin: 0px;
    margin-bottom: @baseLineHeight;
    padding: 0px;

    li {
      border-bottom: 1px solid darken(@bodyBackground, 10%);
      padding: (@baseFontSize / 2) 0px;

      a:link, a:active, a:visited, a:hover {
        color: @textColor;
        font-weight: bold;
      }

      .muted {
        font-size: @fontSizeMini;

        a:link, a:active, a:visited, a:hover {
          color: @gray;
        }
      }
    }
  }
}

// Forum stats
// -------------------------
.index-stats {
  margin-bottom: @baseLineHeight;
  .opacity(60);
  overflow: auto;

  font-weight: bold;

  ul {
    li {
      float: left;
      padding: 0px;
      padding-right: @baseLineHeight;
    }
  }
}
