@import '~antd/es/style/themes/default.less';
@pandaXform-prefix-cls: ~'@{ant-prefix}-pandaXform';
.richText {
  border: 1px solid #ccc;
  z-index: 100;
  &[disabled] {
    border: none;
    background: #f8fafc;
    .w-e-text-container {
      background: none;
    }
  }
}

.RichText {
  width: 100%;
  height: auto;
  min-height: 300px;
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid #d9d9d9;
  border-radius: 2px;
  &[disabled] {
    .w-e-text-container {
      background: none;
    }
    border: none;
    background: #f8fafc;
    .RichTextToolbar {
      display: none;
    }
  }
  .loadingWrap {
    width: 100%;
    height: 100%;
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 0;
    left: 0;
    background-color: rgba(255, 255, 255, 0.8);
  }
  ol li {
    list-style: decimal !important;
  }
  ul li {
    list-style: disc !important;
  }
}

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

.RichTextToolbar {
  border-bottom: 1px solid #d9d9d9; // height: 0;
  .w-e-toolbar .w-e-menu i {
    background-color: transparent!important;
  }
}

:global {
  #RichTextContainer span[data-type='person'] {
    font-weight: bold;
    color: #44acb6 !important;
  } // .w-e-menu[data-title="图片"] {
  //     display: none;
  // }
  .RichText-image {
    position: relative;
    display: inline-block;
  }
  #RichTextContainer .RichText-image-img {
    max-width: calc(100% - 20px);
    display: inline-block;
    width: auto;
    height: auto;
  }
  .RichText-image-mask {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
  }
  .RichText-image-mask-info {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    cursor: pointer;
    color: #fff;
    font-size: 20px;
  }
  .RichText-image-mask-info .anticon {
    margin-inline-end: 4px;
  }
  .anticon svg {
    display: inline-block;
  }
  .RichText-image-mask:hover {
    opacity: 1;
  }
  .r-t-add-file {
    color: #999;
    font-family: 'w-e-icon' !important;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
  }
  .r-t-add-file:before {
    content: "\e9cb";
  }
  .@{ant-prefix}-image-error {
    display: block;
  }
}