/* md2pdf web editor — 图片插入与 base64 折叠（web/editor-images.js 的样式）。 */

/* 图片插入状态提示（工具栏内，随状态行联动）。 */
.md-image-status {
  margin-left: auto;
  font-size: 12px;
  line-height: 1.4;
  color: #42648b;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.md-image-status[data-error="true"] {
  color: #a1382f;
}

/* 隐藏的文件选择器（由「插入图片」按钮触发）。 */
.md-image-picker {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* 长 base64 折叠后的占位（CodeMirror 内联 widget）。 */
.md-editor-host .md-image-fold {
  display: inline-block;
  padding: 0 6px;
  margin: 0 1px;
  border: 1px solid #dbe4f0;
  border-radius: 4px;
  background: #eef2f8;
  color: #42648b;
  font-size: 0.92em;
  cursor: pointer;
  user-select: none;
}

.md-editor-host .md-image-fold:hover {
  background: #e3ebf5;
  color: #233e60;
}

.md-editor-host .md-image-fold:focus-visible {
  outline: 2px solid #6f93bc;
  outline-offset: 1px;
}

/* 大图确认对话框（原生 <dialog>，非阻塞）。 */
.md-image-dialog {
  max-width: 380px;
  padding: 20px 22px;
  border: 1px solid #dbe4f0;
  border-radius: 10px;
  color: #35445a;
  box-shadow: 0 18px 48px rgba(35, 62, 96, .22);
}

.md-image-dialog::backdrop {
  background: rgba(35, 62, 96, .28);
}

.md-image-dialog h2 {
  margin: 0 0 8px;
  font-size: 16px;
  color: #233e60;
}

.md-image-dialog p {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.7;
}

.md-image-dialog-hint {
  color: #677389;
}

.md-image-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

.md-image-dialog-button--primary {
  background: #233e60;
  border-color: #233e60;
  color: #fff;
}

.md-image-dialog-button--primary:hover {
  background: #1b3149;
  color: #fff;
}
