// ---------------------------
// SUBJECT PAGES
// ---------------------------


.article-columns {
  .maincol { width: 60%; }
  .sidecol { width: 40%; }
}

.article-graph {
  background: #FFF;
  padding: $gapSize;
  text-align: center;
  margin-bottom: $gapSize / 2;
  background-clip: padding-box;
  border: 1px solid rgba(#000, 0.06);
}

.article-category-list {
  padding: 0;
  margin: 0.8em 0;
  list-style: none;
  line-height: 1.25;
  color: $bodyFgLight;
}

.article-links {
  z-index: 1;
  margin: 0.5em 0;
  overflow-y: auto;
  list-style: none;
  line-height: 1.25;
  max-height: 500px;
  position: relative;
  color: $bodyFgLight;
  background-size: 180% 1px;
  background-repeat: no-repeat;
  background-position: 50% 0, 50% 100%;
  background-image:
    radial-gradient(farthest-side at 50% 0, rgba(#000, 0.3), rgba(#000, 0)),
    radial-gradient(farthest-side at 50% 100%, rgba(#000, 0.3), rgba(#000, 0));
  &:before, &:after {
    z-index: -1;
    content: '';
    height: 10px;
    display: block;
    position: relative;
  }
  &:before { background: linear-gradient(to bottom, $bodyBg 25%, rgba($bodyBg, 0)); }
  &:after { background: linear-gradient(to bottom, rgba($bodyBg, 0), $bodyBg 75%); }
  li {
    padding-left: 20px;
    position: relative;
  }
  .icon {
    left: 0;
    top: 50%;
    opacity: 0.8;
    position: absolute;
    margin-top: -$iconSize / 2;
  }
}

.cm-editor {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;

  .CodeMirror {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    font-family: $fontFamily;
    height: auto !important;

    &-buttonsPanel:not(:empty) {
      top: 73px;
      z-index: 1;
      display: flex;
      flex-wrap: wrap;
      position: sticky;
      padding-bottom: 5px;
      background-color: $bodyBg;

      // [data-layout-mode='ttb'] & {
      //   padding-top: 8px;
      //   top: calc(74px + (100vh - 74px - 3rem) / 2);
      // }

      button {
        padding: 0 4px;
        font-size: 13px;
        box-shadow: none;
        margin: 0 3px 3px 0;
        line-height: 1.75em;
        font-family: monospace;
      }
    }

    &-wrap {
      z-index: 0;
      border: 1px solid $inputBorderColor;
    }

    &-scroll {
      flex-grow: 1;
    }
  }
}


.article-duplicates {
  margin: 1em 0;
  overflow: auto;
  list-style: none;
  max-height: 444px;
  padding: 0.5em 1em;
  background: rgba(#000, 0.02);
  border: 1px solid rgba(#000, 0.08);
}

.article-duplicate {
  margin: 0;
  width: 100%;
  display: table;
  border-top: 1px solid rgba(#000, 0.08);
  &:first-child { border: 0; }
  &_title {
    width: 100%;
    max-width: 100px;
    padding: 0.3em 0;
    overflow: hidden;
    display: table-cell;
    white-space: nowrap;
    vertical-align: middle;
    text-overflow: ellipsis;
  }
  &_pages {
    padding-left: 0.5em;
    display: table-cell;
    white-space: nowrap;
    vertical-align: middle;
  }
  input:checked + span { color: $fgHover; }
}

.article-editarea {
  height: 100%;
  min-height: 15em;
  overflow: hidden;
  background: #FFF;
  box-sizing: border-box;
  border: 1px solid $inputBorderColor;
  input, textarea {
    border: 0;
    background: none;
    box-shadow: none;
  }
  textarea {
    height: 100%;
    resize: none;
    padding: $gapSize / 2;
  }
}

span.article-voice {
  float: right;
  margin-top: 20px;
}

.article-voice {
  float: right;
  margin: 10px 10px 0;
}
