/*
  Forums
*/

#forums {
  position: relative;

  .topic-controls {
    position: absolute;
    top: 40px;
    right: 0;
    width: auto;

    a:last-child {
      margin-right: 0;
    }
  }

  .pagination {
    margin-bottom: 20px;
  }
}

.no-body #forums {

  h1,
  h2 {
    color: white;

    a {
      color: white;
    }
  }

  .breadcrumbs,
  .pagination {
    color: white;

    a {
      color: $light-blue;
    }
  }
}

/*
  Categories
*/

div#categories {

  div.category {
    margin-bottom: 20px;
  }

  /*
    Tables
  */

  table.category {
    table-layout: auto;
    margin: 0;
    background: $content-color;
    padding: 20px;
    box-shadow: $light-shadow;
    border-radius: $base-border-radius;
    border: 0;

    thead th {
      @include linear-gradient($blue, $dark-blue);
      padding-top: 0.75em;
      padding-bottom: 0.75em;
      font-family: $montserrat;
      font-size: 16px;
      color: white;

      &:first-child {
        border-radius: $base-border-radius 0 0 0;
      }

      &:last-child {
        border-radius: 0 $base-border-radius 0 0;
      }
    }
  }

  .bullet {
    width: 10%;

    background: {
      image: image-url("#{$theme-path}/layout/forum-category.png");  
      position: center center;
      repeat: no-repeat;
    }

    &.updated {
      background-image: image-url("#{$theme-path}/layout/forum-category-highlight.png");
    }
  }

  .forum {
    width: 45%;
    padding-right: 10px;
  }

  .actions {
    width: 10%;
    text-align: center;
  }

  .topics,
  .posts {
    width: 10%;
  }
  
  .last {
    width: 15%;
  }
}

/*
  Topics
*/

#topics {
  table-layout: auto;
  margin-bottom: 20px;
  background: $content-color;
  padding: 20px;
  box-shadow: $light-shadow;
  border-radius: $base-border-radius;
  border: 0;

  .read {
    color: $base-font-color;
    font-weight: normal;
  }

  .unread {
    color: $red;
  }

  thead th {
    @include linear-gradient($blue, $dark-blue);
    padding-top: 0.75em;
    padding-bottom: 0.75em;
    font-family: $montserrat;
    font-size: 16px;
    color: white;

    &:first-child {
      border-radius: $base-border-radius 0 0 0;
    }

    &:last-child {
      border-radius: 0 $base-border-radius 0 0;
    }
  }

  .topic {
    width: 55%;
  }

  .author {
    width: 10%;
  }

  .replies,
  .views {
    width: 10%;
  }

  .last {
    width: 15%;
  }
}

.statistics {
  padding: 20px;
  background: $content-color;
  margin: 20px 0;
  box-shadow: $light-shadow;
  border-radius: $base-border-radius;

  h4 {
    margin-bottom: 1em;
  }
}

#topic {
  position: relative;

  h2 {
    margin-bottom: 20px;
  }

  .pagination {
    margin-top: 0;
  }

  #reply {
    @include span-columns(12);
    padding: 20px;
    margin-bottom: 20px;
    display: none;
    background: $content-color;
    border-radius: $base-border-radius;
    box-shadow: $light-shadow;

    form {
      margin-bottom: 0;

      .controls {
        margin-bottom: 0;
      }
    }
  }
}

/*
  Posts
*/

#posts {
  @include span-columns(12);

  .post {
    @include span-columns(12);
    margin-bottom: 20px;
    border-radius: $base-border-radius;
    background: $content-color;
    padding: 20px;
    box-shadow: $light-shadow;

    .avatar {
      @include span-columns(3);

      h5 {
        text-align: center;
        margin-bottom: 1em;
      }

      .image,
      .team {
        @include span-columns(12);
        text-align: center;
        margin-bottom: 10px;
      }

      .admin {
        color: $red;
      }
    }

    .content {
      @include span-columns(9);
      @include omega;

      .text,
      .signature {
        @include span-columns(12);
        padding: 20px 0;
      }

      .text {
        margin-top: 20px;

        fieldset {
          border-color: darken($light-gray, 10);
          border-radius: $base-border-radius;
        }
      }
    }

    .header {
      @include span-columns(12);

      .time {
        @include span-columns(6);
      }

      .posts {
        @include span-columns(6);
        text-align: right;
      }
    }

    .base {
      @include span-columns(12);
      padding-top: 20px;
      border-top: 1px solid $light-gray;

      .user {
        @include span-columns(3);
      }

      .signature {
        @include span-columns(9);
        @include omega;
        position: relative;

        .controls {
          position: absolute;
          top: 0;
          right: 0;

          a:last-child {
            margin-right: 0;
          }
        }
      }
    }
  }
}

/*
  Forms
*/

#forums .add-acl {

  h4 {
    margin: 1em 0;
  }

  .permissions,
  .controls {
    display: inline;
    width: auto;
    float: none;
  }
}