@import '~antd/es/style/themes/default.less';
// @import '~antd/es/image/style/index.less';
.RichText {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: auto;
  min-height: 200px;
  border: 1px solid #d9d9d9;
  border-radius: 2px;

  .loadingWrap {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
  }

  .selectBox {
    position: absolute;
    top: 0;
    left: 0;
    display: none;
    max-height: 250px;
    overflow-y: scroll;

    background: #fff;
  }
  .selectList {
    border: 1px solid #efefef;
    box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.16), 0 0;
  }
  .selectList .selectItem:hover {
    color: #fff;
    background: #1685ff;
    cursor: pointer;
  }

  .selectList .selectActiveItem {
    color: #fff;
    background: #1685ff;
  }

  .selectItem {
    padding: 5px 10px;
  }

  ol li {
    list-style: decimal !important;
  }

  ul li {
    list-style: disc !important;
  }
}

.RichTextFileList {
  padding: 20px;

  :global {
    .@{ant-prefix}-upload-list-item {
      height: 44px;
      padding: 8px 16px;

      .@{ant-prefix}-upload-list-item-thumbnail,
      .@{ant-prefix}-upload-list-item-file {
        width: 20px;
        height: 22px;

        > img {
          width: 100%;
          height: 100%;
        }
      }

      .@{ant-prefix}-upload-list-item-name {
        line-height: normal;
      }
    }
  }
}

.RichTextContainer {
  position: relative;
  flex: 1;
  overflow-y: scroll;
  color: #000000d9;
  background-color: #fff;

  pre {
    white-space: pre-wrap;
    word-wrap: break-word;
  }
}

.RichTextToolbar {
  border-bottom: 1px solid #d9d9d9;
  // height: 0;
  // overflow: hidden;
}

.RichTextShow img {
  cursor: pointer;
}

.RichTextShow span[data-type='person'] {
  color: #44acb6 !important;
  font-weight: bold;
}

:global {
  #RichTextContainer span[data-type='person'] {
    color: #44acb6 !important;
    font-weight: bold;
  }

  .w-e-menu[data-title='图片'] {
    display: none;
  }

  .RichText-image {
    position: relative;
    display: inline-block;
  }

  #RichTextContainer .RichText-image-img {
    display: inline-block;
    width: auto;
    max-width: calc(100% - 20px);
    height: auto;
  }

  .RichText-image-mask {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    margin: 0;

    padding: 0;
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s;
  }

  .RichText-image-mask-info {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    overflow: hidden;
    color: #fff;
    font-size: 20px;
    white-space: nowrap;
    text-overflow: ellipsis;
    cursor: pointer;
  }

  .RichText-image-mask-info .anticon {
    margin-inline-end: 4px;
  }

  .anticon svg {
    display: inline-block;
  }

  .RichText-image-mask:hover {
    opacity: 1;
  }

  .r-t-add-file {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    color: #999;
    font-weight: normal;
    font-family: 'w-e-icon' !important;
    font-style: normal;
    font-variant: normal;
    line-height: 1;
    text-transform: none;
    speak: none;
    -webkit-font-smoothing: antialiased;
  }

  .r-t-add-file:before {
    content: '\e9cb';
  }

  .@{ant-prefix}-image-error {
    display: block;
  }
}
