@import 'modules/app/viewports';

.back-arrow {
  cursor: pointer;
  margin-right: auto;
}

.document {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  padding: 12px;

  .content .document-body {
    font: var(--wiki-text-font);
    color: var(--default-color);
  }

  .header {
    // font: var(--wiki-font-h1);
    font-size: 20pt;
    line-height: 1em;
    color: var(--wiki-font-h1-color);
  }

  &.history {
    min-height: min-content;

    .close {
      display: flex;
      align-items: center;
      justify-content: flex-end;
    }

    .modified-by {
      font-size: 14px;
    }

    .mat-icon {
      cursor: pointer;
      width: 30px;
      height: 30px;
      font-size: 30px;
    }
  }

  &.dialog {
    position: relative;

    min-height: 100%;
    margin-top: -24px;
    margin-left: 75px;
    padding-top: 5px;

    div.info {
      margin-bottom: 25px;
    }

    div.header {
      margin-bottom: 10px;
    }

    .close {
      position: absolute;
      top: 20px;
      right: -114px;

      .mat-icon {
        cursor: pointer;
        width: 30px;
        height: 30px;
        font-size: 30px;
      }
    }
  }
}

.modified-by {
  display: flex;
  justify-content: flex-end;
  padding-right: 35px;

  a {
    color: #888;
  }
}

.favorite-button {
  position: relative;
  top: -7px;
}

.open-settings-list-button {
  position: relative;
  top: 1px;
}

.header {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: flex-start;

  &:hover {
    .name-edit-button {
      display: block;
    }
  }
}

.name-edit-button {
  cursor: pointer;
  display: none;
  padding-left: 10px;
}

.info {
  position: relative;
  z-index: 1;

  display: flex;
  align-items: center;

  color: #888;

  background: transparent;

  .info-item:first-child {
    margin-left: auto;
  }

  .info-item:not(:last-child) {
    margin-right: 30px;
  }

  .actions {
    display: flex;
    align-items: center;
  }

  .viewed__button-wrap {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 40px;
    height: 40px;

    app-cmf-public-button {
      display: flex;
      align-items: center;
      justify-content: center;

      height: 40px;
      margin-top: -3px;
    }

    .viewed__button.mat-button {
      margin-right: 7px;
      padding: 0 5px;
      line-height: 30px;
    }
  }
}

.invitation {
  width: 300px;
}

:host ::ng-deep h1,
:host ::ng-deep .tui-editor-contents *:not(table) {
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;

  font-weight: 400;
  line-height: 26px;
}

:host ::ng-deep .tui-editor-contents b,
:host ::ng-deep .tui-editor-contents strong {
  font-weight: 700;
}

:host ::ng-deep h1,
:host ::ng-deep .tui-editor-contents h1 {
  margin-bottom: 40px;
  font-size: 45px;
  line-height: 50px;
}

:host ::ng-deep .tui-editor-contents h2 {
  margin-bottom: 28px;
  font-size: 35px;
  line-height: 40px;
}

:host ::ng-deep .tui-editor-contents h3 {
  margin-bottom: 22px;
  font-size: 30px;
  line-height: 35px;
}

:host ::ng-deep .tui-editor-contents p,
:host ::ng-deep .tui-editor-contents ul,
:host ::ng-deep .tui-editor-contents ol,
:host ::ng-deep .tui-editor-contents pre {
  margin-bottom: 22px;
  font-size: 17px;
}

:host ::ng-deep .tui-editor-contents ul,
:host ::ng-deep .tui-editor-contents ol {
  padding-left: 40px;
}

:host ::ng-deep .tui-editor-contents ul > li::before {
  margin-top: 10px;
  background-color: rgb(50 50 50);
}

:host ::ng-deep .tui-editor-contents a {
  word-break: break-all;
}

:host ::ng-deep .tui-editor-contents pre {
  overflow-x: auto;
}

.fixed-toolbar {
  position: sticky;
  z-index: 999;
  top: 0;
}

::ng-deep .CmfDocumentDialog {
  width: 90vw;
  height: 90vh;
}

::ng-deep .viewed__eye__icon {
  display: contents !important;
}

.info-diff {
  display: flex;
  flex-direction: row;
  align-items: center;

  height: 20px;
  padding: 15px;

  color: #a94442;

  background-color: #f2dede;
  border: 1px solid;
  border-color: #ebccd1;
  border-radius: 4px;
}

span.info-diff-text-wrapper {
  width: 100%;
}

.mat-menu-btn {
  display: grid;
  grid-template-columns: 24px auto;
  align-items: center;
  justify-content: flex-start;

  .mat-menu-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 18px;
    height: 18px;

    line-height: 18px;
  }
}

.document-toolbar {
  position: sticky;
  z-index: 1;
  top: 0;
  right: 0;

  background-color: #fafafa;
}

:host ::ng-deep {
  h1 {
    margin: 12px 0 !important;
    font-size: 14pt !important;
    line-height: 1em !important;
  }

  h2 {
    margin: 12px 0 !important;
    font-size: 13pt !important;
    line-height: 1em !important;
  }

  h3 {
    margin: 12px 0 !important;
    font-size: 12pt !important;
    line-height: 1em !important;
  }

  .mce-content-body {
    font-size: 11pt !important;
    line-height: 1em !important;
  }

  app-cmf-document-editor {
    min-width: unset !important;
  }

  .document .header app-cmf-inline-edit {
    font-size: 14pt !important;
    line-height: 1em !important;
  }
}
