/**
 * 文章富文本内容渲染样式（跨项目共享）
 * ──────────────────────────────────────
 * 用于渲染 wangEditor 产出的文章 HTML 内容。
 * 本文件为 single source of truth，admin-vue 后台和外部 HTML5 项目共用。
 *
 * 模板样式通过 class 选择器控制（.tpl-heading / .tpl-blockquote / .tpl-ordered-list），
 * 由 tplPlugin.js 的 styleToHtml 钩子在保存时自动输出 class 到 HTML 标签上，
 * 编辑器内预览则由 tplPlugin.js 的 renderStyle 钩子通过内联样式实现。
 *
 * 不使用模板时，h2 / blockquote / ol 等标签保持浏览器默认样式，不受影响。
 *
 * 使用方式：
 *   - admin-vue 项目：在 Vue 组件 <script> 中 import 此文件
 *   - 外部 HTML5 项目：编译为 .css 后通过 <link> 引入
 *
 * HTML 结构要求：
 *   <div class="article-content">
 *     <!-- 保存的富文本 HTML（模板标签已带 tpl-xxx class） -->
 *   </div>
 *
 * 模板色系：蓝紫主色 #5b4cbf
 */
.article-content {
  font-size: 14px;
  color: #333;
  line-height: 1.8;
  word-break: break-word;
}
.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}
.article-content p {
  margin: 8px 0;
}
.article-content pre {
  background: #f5f5f5;
  padding: 12px;
  border-radius: 6px;
  overflow-x: auto;
}
.article-content table {
  border-collapse: collapse;
  width: 100%;
}
.article-content table td,
.article-content table th {
  border: 1px solid #e0e0e0;
  padding: 6px 10px;
}
.article-content ul {
  padding-left: 20px;
}
.article-content ul li {
  margin-bottom: 6px;
  line-height: 1.8;
}
.article-content .tpl-heading {
  margin: 24px 0 12px;
  padding-left: 14px;
  line-height: 1.4;
  color: #222;
  position: relative;
}
.article-content .tpl-heading::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  /* 撑满高度 */
  width: 4px;
  /* 对应之前的边框宽度 */
  background-color: #9810FA;
  border-radius: 25%;
  /* 这里设置真正的全圆角 */
}
.article-content h1.tpl-heading {
  font-size: 24px;
}
.article-content h2.tpl-heading {
  font-size: 20px;
}
.article-content h3.tpl-heading {
  font-size: 17px;
}
.article-content h4.tpl-heading {
  font-size: 15px;
}
.article-content .tpl-blockquote {
  margin: 20px 0;
  padding: 14px 20px;
  border-left: 4px solid #9810FA;
  background: linear-gradient(90deg, #F3E8FF 0%, #DBEAFE 100%);
  border-radius: 0 6px 6px 0;
  color: #555;
  font-size: 14px;
  line-height: 1.8;
}
.article-content ol {
  counter-reset: tpl-counter;
}
.article-content li.tpl-ordered-list {
  list-style: none;
  counter-increment: tpl-counter;
  position: relative;
  padding-left: 36px;
  margin-bottom: 8px;
  line-height: 1.8;
}
.article-content li.tpl-ordered-list::before {
  content: counter(tpl-counter);
  position: absolute;
  left: 0;
  top: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #F3E8FF;
  color: #9810FA;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.article-content div.tpl-ordered-list {
  padding-left: 36px;
  position: relative;
  line-height: 1.8;
}
.article-content div.tpl-ordered-list > span[data-w-e-reserve] {
  position: absolute !important;
  left: 0 !important;
  top: 2px !important;
  width: 22px !important;
  height: 22px !important;
  margin-right: 0 !important;
  border-radius: 50%;
  background: #F3E8FF;
  color: #9810FA !important;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}
@keyframes skeleton-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
.article-skeleton {
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}
.skeleton-line {
  background: #E5E7EB;
  border-radius: 4px;
}
