.rich-editor-source-ready {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  border: 0 !important;
  white-space: nowrap;
}

.form-card > label.rich-editor-field-label {
  margin-bottom: 7px;
}

.form-card > .rich-editor-shell {
  margin-bottom: 16px;
}

.rich-editor-shell {
  width: 100%;
  color: #273248;
  font-weight: 400;
}

.rich-editor-shell .ql-toolbar.ql-snow {
  position: relative;
  z-index: 2;
  padding: 9px 10px;
  border: 1px solid #dfe5ee;
  border-radius: 9px 9px 0 0;
  background: #f8faff;
}

.rich-editor-shell .ql-container.ql-snow {
  height: var(--rich-editor-height, 280px);
  min-height: 180px;
  max-height: 1200px;
  border: 1px solid #dfe5ee;
  border-top: 0;
  border-radius: 0;
  background: #fff;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 14px;
}

.rich-editor-shell .ql-editor {
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  line-height: 1.85;
}

.rich-editor-resize-handle {
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #dfe5ee;
  border-top: 0;
  border-radius: 0 0 9px 9px;
  background: #f8faff;
  color: #8290a3;
  cursor: ns-resize;
  user-select: none;
  touch-action: none;
  outline: 0;
  font-size: 11px;
}

.rich-editor-resize-handle span {
  width: 38px;
  height: 4px;
  border-radius: 999px;
  background: #bdc8d8;
}

.rich-editor-resize-handle b {
  font-weight: 500;
}

.rich-editor-resize-handle:hover,
.rich-editor-resize-handle:focus,
.rich-editor-resize-handle.is-dragging {
  background: #edf3ff;
  color: #2866e8;
}

.rich-editor-resize-handle:hover span,
.rich-editor-resize-handle:focus span,
.rich-editor-resize-handle.is-dragging span {
  background: #6f96eb;
}

.rich-editor-shell:focus-within .ql-toolbar.ql-snow,
.rich-editor-shell:focus-within .ql-container.ql-snow,
.rich-editor-shell:focus-within .rich-editor-resize-handle {
  border-color: #83aaff;
}

.rich-editor-shell:focus-within {
  border-radius: 9px;
  box-shadow: 0 0 0 3px #e8f0ff;
}

.rich-editor-shell .ql-toolbar .ql-formats {
  margin-right: 11px;
}

.rich-editor-shell .ql-picker.ql-header .ql-picker-label::before,
.rich-editor-shell .ql-picker.ql-header .ql-picker-item::before {
  content: "正文";
}

.rich-editor-shell .ql-picker.ql-header .ql-picker-label[data-value="1"]::before,
.rich-editor-shell .ql-picker.ql-header .ql-picker-item[data-value="1"]::before {
  content: "一级标题";
}

.rich-editor-shell .ql-picker.ql-header .ql-picker-label[data-value="2"]::before,
.rich-editor-shell .ql-picker.ql-header .ql-picker-item[data-value="2"]::before {
  content: "二级标题";
}

.rich-editor-shell .ql-picker.ql-header .ql-picker-label[data-value="3"]::before,
.rich-editor-shell .ql-picker.ql-header .ql-picker-item[data-value="3"]::before {
  content: "三级标题";
}

.rich-editor-shell .ql-code-block-container .ql-ui select {
  max-width: 150px;
  padding: 4px 6px;
  border: 1px solid #d9e0eb;
  border-radius: 5px;
  background: #fff;
  color: #445066;
  font-size: 12px;
}

.rich-editor-shell .ql-code-block-container,
.rich-content .ql-code-block-container {
  overflow: auto !important;
  margin: 14px 0 !important;
  padding: 15px 16px !important;
  border: 1px solid #e1e6ed;
  border-radius: 9px !important;
  background: #f6f8fa !important;
  color: #24292f !important;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace !important;
  font-size: 13px;
  line-height: 1.65;
}

.rich-content .ql-editor {
  min-height: 0;
  padding: 0;
  overflow: visible;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  white-space: normal;
}

.rich-content .ql-editor p {
  margin: 0 0 1em;
}

.rich-content .ql-editor p:last-child {
  margin-bottom: 0;
}

.rich-content .ql-editor h1,
.rich-content .ql-editor h2,
.rich-content .ql-editor h3 {
  margin: 1.2em 0 0.55em;
  color: #253047;
  line-height: 1.4;
}

.rich-content .ql-editor blockquote {
  margin: 1em 0;
  padding: 10px 14px;
  border-left: 4px solid #79a2ee;
  background: #f5f8ff;
  color: #58667c;
}

.rich-content .ql-editor a {
  color: #2767ed;
  text-decoration: underline;
}

.rich-content .ql-editor ol,
.rich-content .ql-editor ul {
  margin: 0.8em 0;
}

.article-form .article-content-input {
  min-height: 0;
}

@media (max-width: 700px) {
  .rich-editor-shell .ql-toolbar .ql-formats {
    margin-right: 5px;
  }

  .rich-editor-shell .ql-toolbar.ql-snow {
    padding: 7px 5px;
  }

  .rich-editor-shell .ql-container.ql-snow {
    min-height: 240px;
  }

  .rich-content .ql-code-block-container {
    padding: 12px !important;
  }

  .rich-editor-resize-handle b {
    display: none;
  }
}
