// 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: 3px;
    box-shadow: 0 0 1px $shadow;
  }

  // wrapper - main response area
  .discussion-response {
    box-sizing: border-box;
    @include border-radius(3px, 3px, 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 {
      @include font-size(14);
      @extend %t-weight5;
    }
  }

  // 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 {
  @include font-size(13);
  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 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 14px;
    padding: 1px ($baseline/4);
    box-sizing: border-box;
    border-radius: 2px 2px 0 0;
    background: #009fe2;
    font-size: 9px;
    font-weight: 700;
    color: $white;
  }

  // CASE: banner - community TA response
  .community-ta-banner{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 14px;
    padding: 1px ($baseline/4);
    box-sizing: border-box;
    border-radius: 2px 2px 0 0;
    background: $forum-color-community-ta;
    font-size: 9px;
    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;
  border-radius: 0 0 3px 3px;
  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: 3px;
    padding: ($baseline/4) ($baseline/2);
    font-size: 14px;
  }

  .comment-form {
    @include clearfix();

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

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

    .wmd-input {
      height: 40px;
    }

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