@import 'variables';
@import 'bourbon';

.editor {
  height: 100%;
  overflow: auto;
  position: absolute;
  width: 100%;
  z-index: 3;
}

.editor__inner {
  font-family: $font-family-editor;
  font-variant-ligatures: no-common-ligatures;
  margin: 0;
  padding: 80px 20px 360px $editor-margin-width;
  white-space: pre-wrap;
  word-break: break-word;
  word-wrap: break-word;

  * {
    line-height: 1.65;
  }

  .cledit-section {
    font-family: inherit;
  }

  .discussion-highlight,
  .find-replace-highlight {
    background-color: transparentize(#ffe400, 0.5);
  }

  .hide {
    display: none;
  }

  &.monospaced {
    font-family: $font-family-monospace !important;
    font-size: $font-size-monospace !important;

    * {
      font-size: inherit !important;
    }
  }
}

.preview {
  height: 100%;
  overflow: auto;
  overflow-y: scroll;
  position: absolute;
  width: 100%;

  &::-webkit-scrollbar {
    display: none;
  }

  * {
    line-height: 1.65;
  }

  img {
    max-width: 100%;
  }

  .table-wrapper {
    max-width: 100%;
    overflow: auto;
  }
}

.preview__inner {
  margin: 0;
  padding: 0 1035px 360px;

  .cl-preview-section > :not(h1):not(h2):not(h3):not(h4):not(h5):not(h6):not([align]) {
    text-align: justify;
  }

  // scss-lint:disable SelectorFormat
  .MathJax {
    -webkit-font-smoothing: antialiased;
  }
}

.toc-tab {
  color: rgba(0, 0, 0, 0.75);
  cursor: pointer;
  font-size: 10px;
  padding: 15px 30px;
  white-space: nowrap;

  @include user-select(none);

  * {
    font-weight: inherit;
    pointer-events: none;
  }

  .cl-toc-section * {
    margin: 0.3em 0;
  }

  h2 {
    padding-left: 8px;
  }

  h3 {
    padding-left: 16px;
  }

  h4 {
    padding-left: 24px;
  }

  h5 {
    padding-left: 32px;
  }

  h6 {
    padding-left: 40px;
  }
}

.toc-tab--empty::before {
  content: 'No table of contents available.';
  font-size: 14px;
}
