$comment_margin_left: 30px;
$discussion_title_size: 1.6em;
$comment_title_size: 1.2em;
$comment_body_size: 1.0em;
$comment_info_size: 0.75em;
$discussion_input_width: 90%;

@mixin discussion-font {
  font-family: inherit;
}

@mixin discussion-clickable {
  color: black;
  &:hover {
    text-decoration: none;
  }
}

.course-content {
  .discussion {
    margin-left: flex-gutter(4);
    margin-top: flex-gutter(6);
  }
}

.discussion {
  .discussion-search-form {
    margin-bottom: flex-gutter(4);
    display: inline-block;
    width: flex-grid(12);
    .discussion-link {
      @include button;
      display: inline-block;
      margin-left: 1%;
      color: white;
      font-weight: bold;
      text-decoration: none;
      padding-top: 9px;
      font-size: inherit;
    }
    .discussion-search-text {
      @include discussion-font;
    }
    .search-input {
      float: left;
      width: 72%;
    }
    .search-within {
      display: block;
      margin-top: flex-gutter();
    }
  }

  .discussion-title {
    @include discussion-font;
    @include discussion-clickable;
    font-size: $discussion_title_size;
    font-weight: bold;
    margin-bottom: flex-gutter(6);
    display: block;
  }
  .discussion-title-wrapper {
    .discussion-watch-discussion, .discussion-unwatch-discussion {
      display: none;
      @include discussion-font;
      margin-left: 5px;
      font-size: $comment_info_size;
    }
    .discussion-title {
      display: inline-block;
    }
    &:hover {
      .discussion-watch-discussion, .discussion-unwatch-discussion {
        display: inline-block;
      }
    }
  }
  .discussion-votes {
    margin-right: 4%;
    margin-top: 2%;
    text-align: center;
    height: flex-grid(3);
    float: left;
    .discussion-vote-count {
      font-size: $comment_body_size;
      @include discussion-font;
    }
    a.discussion-vote {
      display: block;
      color: black;
      font-weight: bold;
      font-size: 15px;
      &.discussion-vote-up {
        margin-bottom: 3px;
      }
      &.discussion-vote-down {
        margin-top: 3px;
      }
      &.voted {
        color: #1d9dd9;
      }
    }
  }
  .discussion-right-wrapper {
    min-height: 40px;
    float: left;
    width: 85%;
  }
  .new-post-form, .discussion-thread-edit {
    .title-input, .body-input {
      @include discussion-font;
      display: block !important;
      width: $discussion_input_width !important;
    }
    .discussion-errors {
      display: block;
      color: #8F0E0E;
      margin-left: -5%;
    }
    .new-post-body {
      margin-top: flex-gutter();
    }
    .tagsinput {
      margin-top: flex-gutter();
      background: #FAFAFA;
      border: 1px solid #C8C8C8;
      -webkit-border-radius: 3px;
      -moz-border-radius: 3px;
      -ms-border-radius: 3px;
      -o-border-radius: 3px;
      border-radius: 3px;
      -webkit-box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.6), inset 0 0 3px 0 rgba(0, 0, 0, 0.1);
      -moz-box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.6), inset 0 0 3px 0 rgba(0, 0, 0, 0.1);
      box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.6), inset 0 0 3px 0 rgba(0, 0, 0, 0.1);
      -webkit-box-sizing: border-box;
      -moz-box-sizing: border-box;
      box-sizing: border-box;
      vertical-align: top;
      -webkit-font-smoothing: antialiased;
    }
    .control-button {
      @include button;
      @include discussion-font;
      color: white;
      margin-top: 10px;
      font-weight: bold;
      text-decoration: none;
      display: inline-block;
      margin-left: 76%;
      padding-top: 9px;
      font-size: inherit;
      width: inherit;
    }
  }
  .discussion-content-edit, .discussion-reply-new, .new-post-form {
    .control-button {
      display: inline-block;
    }
    margin: 10px 0 10px 0;
  }
  .thread {
    //display: none;
    margin-top: 30px;
    margin-bottom: 30px;
    .thread-title {
      @include discussion-font;
      @include discussion-clickable;
      font-size: $comment_title_size;
      font-weight: bold;
      display: block;
    }
    .thread-body, .content-body {
      @include discussion-font;
      font-size: $comment_body_size;
      margin-top: 3px;
      margin-bottom: 4px;
      p {
        @include discussion-font;
        margin: 0;
      }
    }
    .thread-tags {
      .thread-tag {
        @include discussion-font;
        font-size: 0.75em;
        border-width: 1px;
        border-style: solid;
        border-color: #205C85;
        padding: 2px;
        margin-right: 5px;
        border-radius: 4px;
        color: #205C85;
        text-decoration: none;
        &:hover {
          color: #3CC5E7;
          border-color: #3CC5E7;
        }
      }
    }
    .info {
      @include discussion-font;
      font-size: $comment_info_size;
      font-style: italic;
      margin-top: 10px;
      color: gray;
      .discussion-link {
        margin-left: 2px;
      }
      .discussion-reply {
        margin-left: 4px;
      }
      .discussion-link {
        @include discussion-font;
        display: inline-block;
        color: #1d9dd9;
        display: none;
      }
      
    }
    .discussion-content:hover {
      .discussion-link {
        display: inline-block;
      }
    }
    .discussion-content {
      margin-top: 10px;
      overflow: hidden;
      border-top: lightgray 1px solid;
      padding-top: 20px;
      .discussion-reply-new {
        margin-left: $comment_margin_left;
        .reply-body {
          @include discussion-font;
          width: $discussion_input_width !important;
          font-size: $comment_body_size;
          margin-top: 10px;
          display: block;
        }
      }
    }
    .comments {
      //display: none;
      margin-left: $comment_margin_left;
      overflow: hidden;
      .comment {
        .comment-body, .content-body {
          @include discussion-font;
          font-size: $comment_body_size;
          margin-top: 3px;
          display: block;
          color: black;
        }
      }
      .discussion-votes {
        margin-right: 6px;
        margin-top: 6px;
      }
    }
  }

}


.wmd-panel
{
  width: 100%;
  min-width: 500px;
}

.wmd-button-bar 
{
  width: 100%;
  background-color: Silver; 
}

.wmd-input 
{ 
  height: 150px;
  width: 100%;
  background-color: Gainsboro;
  border: 1px solid DarkGray;
  font-style: normal;
}

.wmd-preview 
{ 
  background-color: #c0e0ff; 
}

.wmd-button-row 
{
  position: relative; 
  margin-left: 5px;
  margin-right: 5px;
  margin-bottom: 5px;
  margin-top: 10px;
  padding: 0px;  
  height: 20px;
}

.wmd-spacer
{
  width: 1px; 
  height: 20px; 
  margin-left: 14px;
  
  position: absolute;
  background-color: Silver;
  display: inline-block; 
  list-style: none;
}

.wmd-button {
  width: 20px;
  height: 20px;
  padding-left: 2px;
  padding-right: 3px;
  position: absolute;
  display: inline-block;
  list-style: none;
  cursor: pointer;
}

.wmd-button > span {
  background-image: url('/static/images/wmd-buttons.png');
  background-repeat: no-repeat;
  background-position: 0px 0px;
  width: 20px;
  height: 20px;
  display: inline-block;
}

.wmd-spacer1
{
  left: 50px;
}
.wmd-spacer2
{
  left: 175px;
}
.wmd-spacer3
{
  left: 300px;
}

.wmd-prompt-background
{
  background-color: Black;
}

.wmd-prompt-dialog
{
  border: 1px solid #999999;
  background-color: #F5F5F5;
}

.wmd-prompt-dialog > div {
  font-size: 0.8em;
  font-family: arial, helvetica, sans-serif;
}


.wmd-prompt-dialog > form > input[type="text"] {
  border: 1px solid #999999;
  color: black;
}

.wmd-prompt-dialog > form > input[type="button"]{
  border: 1px solid #888888;
  font-family: trebuchet MS, helvetica, sans-serif;
  font-size: 0.8em;
  font-weight: bold;
}
