.gap {
  background-color: scale-color-diff();
  padding: 5px 0;
  color: lighten($primary, 35%);
  cursor: pointer;
  text-align: center;
  width: 80%;

  &:hover {
    background-color: scale-color-diff();
  }

  @include medium-width {
    width: 795px;
  }

  @include small-width {
    width: 815px;
  }
}

.container {
  @extend .clearfix;
  max-width: $large-width;
  margin-right: auto;
  margin-left: auto;
}

.full-width {
  margin-left: 0;
}

h1 .topic-statuses .topic-status i {
  font-size: 20px;
}

.logo-small {
  margin-right: 8px;
  width: auto;
  max-width: 80px;
  height: auto;
  max-height: 40px;
  }

.post-cloak {
  padding: 0;

  &:first-of-type {
    border-top: none;
  }

.reply-to-tab {
  position: absolute;
  right: 430px;
  z-index: 400;
  padding: 13px 6px 5px;
  border-top: 1px solid scale-color-diff();
  font-size: 12px;
  color: scale-color($primary, $lightness: 50%);
  @include medium-width {
    right: 320px;
  }
  @include small-width {
    right: 280px;
  }
}

.gutter {
  .reply-new {
    .discourse-no-touch & {
     opacity:0;
     transition: opacity linear 0.4s;
     -webkit-transition: opacity linear 0.4s;
    }
    .discourse-touch & {opacity: 1;}
  }
}

section.post-menu-area, .post-actions {
    .discourse-no-touch & {
      opacity: 0.2;
       transition: opacity linear 0.4s;
    -webkit-transition: opacity linear 0.4s;
    }
    .discourse-touch & {opacity: 1;}
  }

  &:hover section.post-menu-area, &:hover .post-actions {
    opacity: 1;

  }

  &:hover .gutter {
      .reply-new,
      .track-link {
        opacity:1;
      }
    }
}

section.post-menu-area {
  position: relative;
}

nav.post-controls {
    padding: 0;
    button {
    color: scale-color($primary, $lightness: 60%);
    margin-right: 2px;
  }

  span.badge-posts {
    margin-right: 5px;
    transition: all linear 0.15s;
  }

  .show-replies {
    background: scale-color-diff();
    padding: 8px 15px;
    padding-bottom: 20px;
    margin-left: 0;
    span.badge-posts {color: scale-color($primary, $lightness: 60%);}
    &:hover {
      background: scale-color-diff();
      span.badge-posts {color: $primary;}
    }
    i {
      margin-left: 5px;
    }
  }

  button.create {
    margin-right: 0;
    color: $tertiary;
    background: scale-color($tertiary, $lightness: 90%);
    padding: 8px 20px;
    margin-left: 10px;

    &:hover {  color: $secondary;
      background: $tertiary;
    }

    &:active {
      background: scale-color($tertiary, $lightness: 50%);
    @include box-shadow(inset 0 1px 3px rgba($primary, .3));

    }

  }

  .create i {
    margin-right: 5px;
  }

  button {
    font-size: 16px;
    padding: 8px 10px;
    vertical-align: top;
    background: transparent;
    border: none;
    margin-left: 3px;
    transition: all linear 0.15s;
         &:hover {
          background: scale-color-diff();
          color: $primary;
        }

        &:active {
            @include box-shadow(inset 0 1px 3px rgba($primary, .4));
        }

        &.hidden {
          display: none;
        }
        &.admin {
          position: relative;
        }
        &.like, &.edit, &.flag, &.delete, &.share, &.bookmark, &.create, &.admin {
          float: right;
        }

        &.delete:hover {
          background: $danger;
          color: $secondary;
        }

        &.like:hover {color: $love;
          background: scale-color($love, $lightness: 75%);
        }

        &.bookmark {padding: 8px 11px; }

        .read-icon {
          &:before {
            font-family: "FontAwesome";
            content: "\f02e";
          }
          &.unseen {
            &:before {
              content: "\f097";
            }
          }
          &.last-read {
            color: $danger;
          }
          &.bookmarked {
            &:before {
              color: $tertiary;
            }
          }
        }
      }

  .post-admin-menu {
    background-color: $secondary;
    width: 205px;
    padding: 10px;
    border: 1px solid scale-color-diff();
    position: absolute;
    text-align: left;
    bottom: 0;
    right: 0;
    z-index: 1000;
    display: none;

    h3 {
      margin-top: 0;
      color: $primary;
      font-size: 1em;
    }

    ul {
      list-style: none;
      margin: 10px 0 0 0;
    }

    li {
      width: 176px;
      margin-bottom: 5px;

      i.fa {
        width: 14px;
        margin-right: 14px;
      }
    }
  }
}

.embedded-posts {
  h1, h2, h3 {margin: 10px 0;}
  a.mention {background: darken(scale-color-diff(), 10%);}

  .topic-body { width: 610px; border: none; }

  // bottom means "reply expansion" below a post
  &.bottom {
    &.hidden {display: block; opacity: 0; }
  }
  &.bottom .arrow {float: right; margin: 0 0 0 0;}
  &.bottom { margin-top: -11px;}

  // top means "in reply to expansion" above a post
  &.top {
    margin-left: 66px;
    max-width: 713px;
    @include medium-width {
    margin-left: 59px;
    }
    @include small-width {
    margin-left: 57px;
    max-width: 720px;
    }
  }
  &.top.topic-body {padding-left: 0;}
    .topic-avatar {border: none; padding-left: 15px;}
    .post-date {color: scale-color($primary, $lightness: 50%);}
    .fa-arrow-up {margin-left: 5px;}
    .row {border-top: 1px solid darken(scale-color-diff(), 10%); padding-top: 7px;}
    .reply:first-of-type .row {border-top: none;}
    .quote {margin-top: 0 !important;}
  background: scale-color-diff();

  .quote .title, blockquote, .onebox, .onebox-result {
    background: darken(scale-color-diff(), 5%);
    border-left: 5px solid darken(scale-color-diff(), 12%);
  }


  .topic-meta-data {
    position: relative;
  }
  .topic-meta-data h5 {
    position: absolute;
    z-index: 1;
    font-size: 13px;
    a {
      font-weight: bold;
      color: scale-color($primary, $lightness: 30%);
    }
  }
  .arrow {color: scale-color($primary, $lightness: 50%);}
}

.bottom-round nav.post-controls .show-replies {
background: scale-color-diff();
margin-bottom: 0;
padding-bottom: 8px;
  &:hover {background: scale-color-diff();
  }
}



.post-action {
  .relative-date {
    margin-left: 5px;
  }
  .avatar { margin-right: 2px; }
}

a.star {
  display: inline-block;
  float: left;
}

#main a.star.starred {
  text-shadow: none !important;
}

.topic-map {
  margin: 20px 0 0 0;
  border: 1px solid scale-color-diff();

  .buttons .btn {
    &:hover {border: 1px solid $primary !important;}
  }

  .topic-links li {
    word-wrap: break-word;
  }

  h3 {
    margin-bottom: 4px;
    color: $primary;
    line-height: 23px;
  }

  h4 {
    margin: 0 0 3px 0;
    color: scale-color($primary, $lightness: 50%);
    font-weight: normal;
    font-size: 12px;
    line-height: 15px;
    text-transform: lowercase;
  }

  p,
  .participants {
    margin: 0 0 7px;
  }

  ul {
    margin: 0;
    list-style: none;
  }

  span.domain {
    font-size: 10px;
    color: scale-color($primary, $lightness: 50%);
  }



  .avatars {
    > div {
      float: left;
      position: relative;
      margin: 3px 0;
    }
    .post-count {
      position: absolute;
      top: 2px;
      right: 6px;
      padding: 0 4px;
      font-weight: normal;
      font-size: 11px;
      line-height: 14px;
          }
  }

  .avatar {
    float: left;
    margin-right: 4px;
  }

  .map {
    li {
      float: left;
      padding: 7px 11px;
      &:last-of-type {
        border-right: 0;
      }
    }
    a, .number {
      line-height: 20px;
    }
    .number, i {
      color: $primary;
    }
    .avatar  a {
      float: left;
    }
  }
  .avatars,
  .links,
  .information {
    padding: 7px 14px;
    color: $primary;
  }
  .information {
    border-top: 1px solid scale-color-diff();
  }

.participants { // PMs //
  .user {float: left; margin: 7px 20px 7px 0;}
}

  .topic-links {
    li > a {
      margin-left: 5px;
    }
    .badge-notification {
      margin: 0 0 4px;
    }
  }
  .buttons {
    float: right;
    .btn {
      border: 0;
      border-bottom: 1px solid scale-color-diff();
      padding: 0 23px;
      color: $primary;
      background: scale-color-diff();
      &:hover {
        background: scale-color($primary, $lightness: 75%);
        color: $primary;
        border: none !important;
        border-bottom: 1px solid scale-color($primary, $lightness: 75%) !important;
        span.badge-posts {color: $primary;}
      }

      &.collapsed {
        border-bottom: 0;
        padding-bottom: 1px;
      }
      .fa {
        margin: 0;
        font-size: 18px;
        line-height: 52px;
      }
    }
  }
}

#topic-footer-buttons {
  padding: 10px 10px 0 0;
  p {
    line-height: 32px;
    color: $primary;
  }
  .btn {
    margin-bottom: 5px;
    margin-right: 10px;
    .fa-star {margin-right: 5px;}
  }
}

#suggested-topics {
  clear: left;
  padding: 20px 0 15px 0;
  #topic-list > tbody > tr:nth-child(even) {
    background-color: darken($secondary, 3%);
  }
  #topic-list > tbody > tr:nth-child(odd) {
  }
  table {
    box-shadow: none;
    border-radius: 0;
    margin-top: 10px;
  }

   .title {
    font-size: 14px; line-height: 8px;
   }
}

span.post-count {
  background: $primary;
  color: $secondary;
  opacity: .8;
}

button.expand-post {
  margin-top: 10px;
}

.quote-button {
  display: none;
  position: absolute;
  background-color: scale-color($primary, $lightness: 50%);
  color: $secondary;
  padding: 10px;
  z-index: 401;

  &:hover {
    background-color: scale-color($primary, $lightness: 40%);
    cursor: pointer;
  }
}

.quote-button.visible {
  display: block;
}

iframe {
  max-width: 100%;
}

.extra-info-wrapper {
  float: left;
  width: 78%;
  max-width: 800px;
  .topic-statuses {
    i         { color: $header_primary; }
    .unpinned { color: $header_primary; }
  }
  .topic-link { color: $header_primary; }
}


@include medium-width {
  .extra-info-wrapper {
  max-width: 740px;
}
}


@include small-width {
    .extra-info-wrapper {
  max-width: 680px;
}
}

.extra-info {
  h1 {
    margin: 5px 0 0 0;
    font-size: 1.8em;
    line-height: 1.2em;
  }

  a.star {
    margin-right: 7px;
    font-size: 20px;
    margin-top: 6px;
  }

  .topic-statuses {
    margin-top: -2px;
  }

  .badge-category {
    vertical-align: top;
    margin-top: 2px;
  }

}

.open >.dropdown-menu {
  display: block;
}

.dropdown-menu li  {
  margin: 5px 0;
}

.btn-group {
  margin-top: 25px;
  position: relative;
}

.dropdown-toggle {
  float: left;
  position: relative;
}

.contents .cooked a {
  word-wrap: break-word;
}

.contents .cooked {
  word-wrap: break-word;
  h1, h2, h3, h4, h5, h6 { margin: 30px 0 10px; }
}

  a.mention {
    padding: 2px 4px;
    color: $primary;
    background: scale-color-diff();
  }


.modal-body {
  input[type=text] {
    font-size: 16px;
  }
}

.post-hidden {
  opacity: 0.5;
}

.moderator {
  .topic-body {
    background-color: scale-color($highlight, $lightness: 75%);
  }
}

.deleted {
  .topic-body {
  background-color: scale-color($danger, $lightness: 75%);
  }
}

#share-link {
  width: 365px;
  margin-left: -4px;

    h3 {
      margin: 5px 0;
    }

    input[type=text] {
      font-size: 16px;
      width: 92%;
      margin-bottom: 10px;
    }
}

.post-select {
  float: right;
  margin-right: 20px;
  margin-top: -20px;
}

#show-topic-admin {
  right: 20px;
  padding: 5px 8px;
  margin-top: 5px;

}

.topic-admin-menu {
  h3 {margin-top: 0;}
}

.deleted-user-avatar {
  font-size: 36px;
}

.info-line {
  margin: 10px 0;
  color: $primary;
}


blockquote { /* solo quotes */
  margin: 0;
  padding: 12px;

    a.mention {background: darken(scale-color-diff(), 10%);}
    p:first-of-type {margin-top: 0;}
    p:last-of-type {margin-bottom: 0;}
}

.quote { /* quotes with attribution */
  &>blockquote {
      margin-top: 0;
      padding-top: 0;
      p:first-of-type {margin:0;}
    .onebox-result {
      background-color: scale-color-diff();
    }
  }

  .title {
    border-left: 5px solid darken(scale-color-diff(), 10%);
    background-color: scale-color-diff();
    padding: 12px;
  .avatar { margin-right: 7px; }
  img { margin-top: -4px; }
  }

  aside {
    .quote, .title, blockquote, .onebox, .onebox-result {
      background: darken(scale-color-diff(), 5%);
      border-left: 5px solid darken(scale-color-diff(), 12%);
    }

    aside.quote>blockquote, aside.quote>.title {
      border-left: 0;
    }
  }

}

.quote-controls {
  float: right;
  color: scale-color($primary, $lightness: 50%);
  a {
  margin: 0;
  }
    .back:before,
    .quote-other-topic:before {
    display: inline-block;
    margin-left: 8px;
    color: scale-color($primary, $lightness: 50%);
    font-family: "FontAwesome";
    position: relative;
    z-index: 20;
    }
    .back:before {
    content: "\f062";
    }
    .quote-other-topic:before {
    content: "\f061";
    }
}

.gutter {
  float: left;
  width: 19%;
  margin-top: 15px;
  padding-left: 15px;

  ul {margin: 0;}
  li {margin-bottom: 10px;}
  i {font-size: 12px;}

  .post-links {
    list-style-type: none;
    padding-left: 19px;
    position: relative;
    margin-left: 5px;
    line-height: 18px;
    a i {
      position: absolute;
      left: 0;
      margin-right: 15px;
      margin-bottom: 20px;
      margin-top: 2px;
    }
    a.track-link {color: scale-color($primary, $lightness: 50%);}
    a.toggle-more {
      display: block;
      text-align: right;
    }

  }
}

.topic-body {
  width: 695px;
  float: left;
  position: relative;
  border-top: 1px solid scale-color-diff();
  padding: 12px 0 15px 0;
  &.highlighted {
    background-color: scale-color($tertiary, $lightness: 85%);
  }
  img:not(.avatar), svg {
    max-width: 100%;
  }
}
.topic-avatar {
 border-top: 1px solid scale-color-diff();
 padding-top: 16px;
 width: 55px;
 float: left;

 .wiki {
   margin-top: 14px;
   color: scale-color($primary, $lightness: 60%);
   margin-left: 5px;
 }
}

.posts-wrapper {
  position: relative;
}

.row:before, .row:after {
  display: table;
  content: "";
}
.row:after {clear: both;}

.dropdown {
  position: relative;
}
.caret {
  display: inline-block;
  width: 0;
  height: 0;
  vertical-align: middle;
  border-top: 4px solid $primary;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
  content: "";
  margin-left: 5px;
}
.dropdown-menu {
  position: absolute;
  bottom: 115%;
  left: 0;
  z-index: 1000;
  display: none;
  float: left;
  width: 550px;
  padding: 4px 0;
  margin: 1px 0 0;
  list-style: none;
  background-color: $secondary;
  border: 1px solid scale-color-diff();
  box-shadow: 0 1px 5px rgba($primary, .4);
  background-clip: padding-box;
  span {font-size: 12px;}
.title {font-weight: bold; display: block; font-size: 14px;}
}
.dropdown-menu a {
  display: block;
  padding: 3px 15px;
  clear: both;
  font-weight: normal;
  line-height: 18px;
  color: $primary;

  & > div {
    margin-left: 26px;
  }
}
.dropdown-menu li > a:hover,
.dropdown-menu .active > a,
.dropdown-menu .active > a:hover {
  color: $secondary;
  text-decoration: none;
  background-color: scale-color($tertiary, $lightness: 50%);
}

.dropdown-menu .disabled > a,
.dropdown-menu .disabled > a:hover {
  text-decoration: none;
  color: $primary;
  background-color: scale-color($highlight, $lightness: 25%);
  cursor: default;
}

.dropdown-menu .icon {
  margin-top: 3px;
  float: left;
  font-size: 18px;
}

.open > .dropdown-menu {
  display: block;
  clear: both;
}

.fade {
  opacity: 0;
  -webkit-transition: opacity 0.15s linear;
  transition: opacity 0.15s linear;
}

.fade.in {
  opacity: 1;
}

#selected-posts {

  padding-left: 20px;
  margin-left: 330px;
  width: 200px;
  position: fixed;
  z-index: 1000;
  left: 50%;
  background-color: scale-color($tertiary, $lightness: 50%);
  border: 1px solid $tertiary;
  padding: 5px;
  margin-bottom: 5px;



  button {
    width: 180px;
    margin: 4px auto;
    display: inline-block;
    text-align: left;
  }

  &.hidden {
    display: none;
  }
  .controls {
    margin-top: 10px;
  }
  p {
    font-size: 13px;
    margin: 0 0 10px 0;
  }
  p.cancel {
    margin: 10px 0 0 0;
  }
  h3 {
    font-size: 25px;
    color: $primary;
    margin-bottom: 5px;
    i {
      margin-right: 7px;
    }
  }
  .btn {
    border: none;
    color: $secondary;
    font-weight: normal;
    margin-bottom: 10px;
    background: scale-color($tertiary, $lightness: 50%);

    &[href] {
      color: $secondary;
    }
    &:hover
    {
      color: $secondary;
      background: scale-color($tertiary, $lightness: 20%);
    }
    &:active {
      @include linear-gradient(darken($tertiary, 18%), darken($tertiary, 12%));
      @include box-shadow(inset 0 1px 3px rgba($primary, 0.2));
      color: $secondary;
    }
    &[disabled] {
      text-shadow: 0 1px 0 rgba($primary, 0.2);
      @include linear-gradient($tertiary, darken($tertiary, 20%));
      @include box-shadow((inset 0 1px 0 rgba($primary, 0.33), inset 0 -1px 2px rgba($primary, 0.2)));
    }
  }
}
.topic-post {
  &.selected {
    article.boxed {
      .select-posts {
        button.select-post {
          background-color: scale-color($tertiary, $lightness: 50%);
          color: $secondary;
        }
      }
      .topic-body {
        .contents:after {
          display: none;
        }
      }
    }
  }
  article.boxed {
    position: relative;

    .select-posts {
      position: absolute;
      right: 5px;
      z-index: 490;
      top: 4px;

      button {
        background-color: scale-color($primary, $lightness: 70%);
        border-top: 1px solid $tertiary;
        border-left: 1px solid $tertiary;
        border-bottom: 1px solid scale-color-diff();
        border-right: 1px solid scale-color-diff();
        color: $primary;
      }
    }
  }
}

a.attachment:before {
  display: inline-block;
  margin-right: 4px;
  font-family: "FontAwesome";
  content: "\f019";
}

.private_message .gutter, .deleted-topic .gutter,.read_restricted .gutter {
    position: relative;
}

.private_message .gutter:before, .deleted-topic .gutter:before, .read_restricted .gutter:before {
    display: block;
    position: absolute;
    top: 0;
    left: 10px;
    color: scale-color-diff();
    font: 90px/1 FontAwesome;
    content: "\f05c";
    z-index: -5;
}

.read_restricted .gutter:before {
    content: "\f0c0";
}

.private_message .gutter:before {
    content: "\f0e0";
}

.topic-meta-data {

 &:after {
    visibility: hidden;
    display: block;
    font-size: 0;
    content: " ";
    clear: both;
    height: 0;
 }

 .post-info  {
   display: inline-block;
   float: right;
   font-size: 12px;
   margin-top: 1px;
   a {color: scale-color($primary, $lightness: 50%);}
 }

}

span.highlighted {
  background-color: scale-color($highlight, $lightness: 70%);
}

.username.new-user a {
  color: scale-color($primary, $lightness: 70%);
}

.read-state {
  color: scale-color($tertiary, $lightness: 50%);
  position: absolute;
  right: -8px;
  top: 13px;
  font-size: 8px;
}

.read-state.read {
  opacity: 0;
  -webkit-transition: opacity 1s ease-out;
  transition: opacity 1s ease-out;
}
