@import "./styles/style.scss";
@import "../../themes/core/colors";
@import "../../themes/core/typography";

.qmsckeditor_container {
  .qmsckeditor {
    &__minwidth {
      width: 100%;
    }
  }

  .ck-editor__editable {
    overflow-y: auto;
  }
}

.qms-ckeditor {
  .ck.ck-editor__editable {
    max-height: 172px;
    min-height: 172px;
    background-color: black(0.04);
    font-family: Open Sans;

    &:not(.ck-focused, .ck-read-only):hover {
      background-color: black(0.08);
      border-bottom: 2px solid black(0.38);
    }

    /* width */
    &::-webkit-scrollbar {
      width: 12px;
    }

    /* Track */
    &::-webkit-scrollbar-track {
      background: transparent;
      background-clip: content-box;
    }

    /* Handle */
    &::-webkit-scrollbar-thumb {
      background: black(0.38);
      border-radius: 20px;
      width: 4px;
      border: 4px solid transparent;
      background-clip: content-box;
    }

    /* Handle on hover */
    &::-webkit-scrollbar-thumb:hover {
      background: black(0.5);
      background-clip: content-box;
      border: 4px solid transparent;
    }
  }

  .ck-placeholder {
    font-size: 1rem;
    font-weight: 600;
    color: black(0.6);
  }

  .ck-disabled {
    .ck.ck-toolbar,
    .ck.ck-editor__main > .ck-editor__editable {
      background-color: #e4e4e4;
      pointer-events: none;
    }

    .ck-button {
      pointer-events: none;
    }
  }

  .ck.ck-editor__main > .ck-editor__editable:not(.ck-focused) {
    &:focus {
      border-radius: 4px;
    }
  }

  .ck.ck-editor__editable {
    &:not(.ck-editor__nested-editable).ck-focused {
      border: 1px solid #c4c4c4;
      border-bottom: 2px solid $primary;
      border-radius: 4px;
      box-shadow: none;
      background-color: black(0.08);
    }
  }

  .ck.ck-toolbar {
    box-shadow: 0px 1px 3px rgba(51, 51, 51, 0.2);
  }

  .ck.ck-sticky-panel .ck-sticky-panel__content_sticky {
    box-shadow: none;
    border-width: 0;
  }
}

.qmsckeditor__fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  overflow: auto;
  background: white;

 .qms-ckeditor {
    height: 98%;
    display: block;
    width: 100%;
  }

  .ck.ck-editor__main {
    height: 98%;
  }

  .ck.ck-editor__editable {
    height: inherit;
  }
}

.sub-container {
  display: flex;
  justify-content: space-between;
  padding: 0px 10px 0 10px;
  font-family: Open Sans;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 16px;
  color: black(0.6);
}
