// discussion - elements - editor
// ====================

// UI: general editor styling

// TO-DO: isolate out all editing styling from _discussion.scss and clean up cases defined below once general syling exists

// =========================

// CASE: new post
.forum-new-post-form {
  .wmd-input {
    @include discussion-wmd-input;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
    width: 100%;
    height: 150px;
    background: $forum-color-background;
  }

  .wmd-preview-container {
    @include discussion-new-post-wmd-preview-container;
  }

  .wmd-preview-label {
    @include discussion-wmd-preview-label;
  }

  .wmd-preview {
    @include discussion-wmd-preview;
  }

  .wmd-button {
    background: none;
  }
}

// =========================

// CASE: inline styling
// TO-DO: additional styling cleanup here necessary, for now this case was ported over from _discussion.scss
.discussion-module {

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

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

  .wmd-input {
    width: 100%;
    height: 150px;
    border-radius: $forum-border-radius $forum-border-radius 0 0;
    font-style: normal;
    font-size: $forum-base-font-size;
    font-family: Monaco, 'Lucida Console', monospace;
    line-height: 1.6em;

    &::-webkit-input-placeholder {
      color: #888;
    }
  }

  .wmd-button-row {
    @include transition(all .2s ease-out 0s);
    position: relative;
    overflow: hidden;
    margin: ($baseline/2) ($baseline/4) ($baseline/4) ($baseline/4);
    padding: 0;
    height: 30px;
  }

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

  .wmd-button {
    position: absolute;
    display: inline-block;
    width: 20px;
    height: 20px;
    border: none;
    background: none;
    list-style: none;
    cursor: pointer;
    padding: 0;
  }

  .wmd-button:hover {
    background: none;
    box-shadow: none;
  }

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

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

  .wmd-spacer3 {
    left: 300px;
  }

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

  .wmd-prompt-dialog {
    @extend .modal;
    background: $forum-color-background;
  }

  .wmd-prompt-dialog {
    padding: $baseline;

    > div {
      font-size: $forum-base-font-size;
      font-family: arial, helvetica, sans-serif;
    }

    b {
      font-size: $forum-large-font-size;
    }

    > form > input[type="text"] {
      border-radius: $forum-border-radius;
      color: #333;
    }

    > form > input[type="button"] {
      border: 1px solid #888;
      font-family: $sans-serif;
      font-size: $forum-x-large-font-size;
    }

    > form > input[type="file"] {
      margin-bottom: 18px;
    }
  }

  .wmd-button-row {
    // this is being hidden now because the inline styles to position the icons are not being written
    position: relative;
    height: 25px;
  }

  .wmd-button {
    span {
      background-image: url("#{$static-path}/images/wmd-buttons.png");
      display: inline-block;
    }
  }
}
