/*
  裕企网 富文本编辑器（Quill）全站样式 —— 由 _Layout 与 _AdminLayout 共同引用的单一来源。

  为什么是独立 .css 而不是内联 <style>（2026-09-13 优化）：
    原先规则写在 Views/Shared/_EditorStyles.cshtml 里，该 partial 被两个布局引用，
    于是**每个页面**的 HTML 源码都内嵌同一段 CSS，既无法被浏览器缓存，也让页面源码变脏。
    改为独立样式文件后，页面源码只剩一行 <link>，且可被浏览器/CDN 缓存复用。

  高度修正（勿删、勿改选择器）：
    现象：页面上有多个编辑器时，第一个会盖住第二个的标题与工具栏，最底下的「保存」按钮也被盖住。
    根因：quill.snow.css 给 .ql-container 设了 height:100%，而它被放在 Bootstrap 的 .col-* 里时
          父高度不确定，百分比高度进入循环解析 —— 实测列高恰好等于编辑框自身高度，而编辑框在列内
          是从「标签+提示+工具栏」约 105px 处才开始排的，于是整体向下溢出约 105px。
    解决：不用百分比高度，改为自适应 + 上限 70vh（超出则编辑框内部滚动）。
    注意：必须保留 .ql-container.ql-snow 双类名 —— .ql-container{height:100%} 是单类名 (0,1,0)，
          双类名 (0,2,0) 特异性更高，与 quill.snow.css 的加载先后无关，依然生效。

  说明：工具栏里的「清除格式 / 源码切换」按钮（yx-editor.js 注入）完全复用 quill.snow.css 对
    .ql-toolbar button 的样式与 ql-stroke / ql-active 图标配色，因此这里无需为它们写任何规则。
*/
.ql-container.ql-snow { height: auto; min-height: 420px; }
.ql-container.ql-snow .ql-editor { height: auto; min-height: 420px; max-height: 70vh; overflow-y: auto; }

/* 源码模式下的纯文本编辑区（由 yx-editor.js 注入，进入源码模式时顶替编辑区显示） */
.yx-editor-source {
    width: 100%; min-height: 420px; max-height: 70vh;
    padding: 12px 14px; font-family: Consolas, "Courier New", monospace;
    font-size: 13px; line-height: 1.7; color: #1f2937; background: #fff;
    border: 1px solid #d5d9e0; border-radius: 6px; resize: vertical;
}
.yx-editor-source:focus { outline: none; border-color: #b3261e; }

/* 轻提示（上传中 / 上传成功 / 上传失败） */
.yx-editor-toast {
    position: fixed; right: 20px; bottom: 24px; z-index: 3000;
    max-width: 320px; padding: 11px 16px;
    background: #1f2937; color: #fff; font-size: 13.5px; line-height: 1.6;
    border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .24);
    opacity: 0; transform: translateY(12px); pointer-events: none;
    transition: opacity .2s, transform .2s;
}
.yx-editor-toast.show { opacity: 1; transform: none; }
.yx-editor-toast.is-error { background: #b3261e; }
