// discussion - responses
// ====================

// Table of Contents
// * +wrapper - response list
// * +base - single response element
// * +element - add response area
// * +response - labels and banners
// * +CASE: answered question - collapsed comments in answers
// * +response - labels and banners
// * +comments styling

// +wrapper - response list
.container .discussion-body .responses {
  @extend %ui-no-list;

  &:empty {
    display: none;
  }

  // wrapper - response plus comment area
  .forum-response {
    @include animation(fadeIn .3s);
    position: relative;
    margin: $baseline 0;
    border: 1px solid $forum-color-border;
    border-radius: $forum-border-radius;
    box-shadow: 0 0 1px $shadow;
  }

  // wrapper - main response area
  .discussion-response {
    box-sizing: border-box;
    @include border-radius($forum-border-radius, $forum-border-radius, 0, 0);
    padding: $baseline;
    background-color: $forum-color-background;
  }
  
  .posted-by {
    @extend %t-ultrastrong;
  }
}

// +base - single response element
.container .discussion-response {

  .response-header-content {

    // CASE: larger username for responses 
    .username {
      @extend %t-weight5;
      font-size: $forum-base-font-size;
    }
  }

  // rtl resets for response list elements
  .response-body ol, .response-body ul { // Fix up the RTL-only _reset.scss, but only in specific places
    @include padding-left($baseline*2);
    @include padding-right(0);
  }
}

// +element - add response area
.container .discussion-body .add-response {
  display: inline;
  padding: $baseline/2;
}

// +CASE: answered question - collapsed comments in answers
.forum-response .action-show-comments {
  font-size: $forum-base-font-size;
  box-sizing: border-box;
  display: block;
  padding: ($baseline/2) $baseline;
  width: 100%;
  background: $gray-l6;
  box-shadow: 0 1px 3px -1px $shadow inset;
}

// +response - labels and banners
// NOTE - these styles seem to no longer be in use. They have been isolated here, but should be ideally removed or fixed. 
.container .discussion-body .responses .forum-response {

  // CASE: label - staff response
  &.staff {
    padding-top: 38px;
    border-color: #009fe2;
  }

  // CASE: label - community TA response
  &.community-ta{
    padding-top: 38px;
    border-color: $forum-color-community-ta;
  }

  // CASE: banner - staff response
  .staff-banner {
    @include border-radius($forum-border-radius, $forum-border-radius, 0, 0);
    @include left(0);
    position: absolute;
    top: 0;
    width: 100%;
    height: 14px;
    padding: 1px ($baseline/4);
    box-sizing: border-box;
    background: #009fe2;
    font-size: $forum-small-font-size;
    font-weight: 700;
    color: $white;
  }

  // CASE: banner - community TA response
  .community-ta-banner{
    @include border-radius($forum-border-radius, $forum-border-radius, 0, 0);
    @include left(0);
    position: absolute;
    top: 0;
    width: 100%;
    height: 14px;
    padding: 1px ($baseline/4);
    box-sizing: border-box;
    background: $forum-color-community-ta;
    font-size: $forum-small-font-size;
    font-weight: 700;
    color: $white;
  }

  // STATE: loading - response list
  &.loading {
    height: 0;
    margin: 0;
    padding: 0;
    border: none;
    box-shadow: none;
  }
}

// +comments styling
.container .discussion-body .comments {
  @extend %ui-no-list;
  @include border-radius(0, 0, $forum-border-radius, $forum-border-radius);
  background: $gray-l6;
  box-shadow: 0 1px 3px -1px $shadow inset;

  > li {
    border-top: 1px solid $forum-color-border;
    padding: ($baseline/2) $baseline;
  }

  blockquote {
    background: $gray-l4;
    border-radius: $forum-border-radius;
    padding: ($baseline/4) ($baseline/2);
    font-size: $forum-base-font-size;
  }

  .comment-form {
    @include clearfix();

    .comment-form-input {
      padding: ($baseline/4) ($baseline/2);
      background-color: $forum-color-background;
      font-size: $forum-base-font-size;
    }

    .discussion-submit-comment {
      @include float(left);
      margin-top: 8px;
    }

    .wmd-input {
      height: 40px;
    }

    .discussion-errors {
      margin: 0;
    }
  }
}
