/* 确保文章内容区域允许文本选择 */
#articleContent {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

/* 确保评论图标在移动端可点击 */
#comment-icon {
  -webkit-touch-callout: default;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.detail-content-title {
  color: rgba(0, 0, 0, 0.85);
  font-size: 26px;
  line-height: 31px;
  vertical-align: bottom;
  margin-bottom: 12px;
}

.detail-content-title-other-wrap {
  font-size: 14px;
  display: flex;
  align-items: center;
  color: var(--pai-color-999-gray);
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--pai-hr-color-1);
}

.detail-content-title-other-img {
  height: 22px;
  width: 22px;
  border-radius: 50%;
}
.detail-content-title-other-name {
  color: #62749f;
  margin-left: 8px;
  margin-right: 16px;
}
.detail-content-title-other-time {
  margin-right: 16px;
}

.detail-content-title-other-look {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 28px;
  padding: 0 11px;
  height: 20px;
  border-radius: 20px;
  font-size: 12px;
  color: #3973ff;
  border: 1px solid #3973ff;
  cursor: pointer;
}

.com-opt-link,
.com-opt-text {
  display: inline-block;
  vertical-align: middle;
  color: var(--pai-color-999-gray);
}

[class*="com-i-"],
[class^="com-i-"] {
  display: inline-block;
  vertical-align: middle;
  width: 20px;
  height: 20px;
  background-size: 100% auto;
}

.com-opt-link:hover .com-i-edit,
.com-opt-link:hover .com-i-delete {
  fill: var(--pai-brand-2-hover);
}

.com-opt-link .com-i-edit,
.com-opt-link .com-i-delete {
  fill: var(--pai-color-999-gray);
}

.detail-content-title-edit [class*="com-i-"],
.detail-content-title-edit [class^="com-i-"] {
  position: relative;
}

.detail-content-title-edit {
  position: absolute;
  right: 0;
  top: 0;
  line-height: 20px;
}

/* home 适配 */
@media screen and (max-width: 768px) {
  .layout-side,
  .article-suspended-panel {
    display: none !important;
  }
  .layout-main {
    padding: 0 !important;
  }
  .article-suspended-panel-md {
    visibility: visible;
  }
  .foot {
    margin-bottom: 72px;
  }
}

/* 视频容器样式 */
.video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 宽高比 */
  height: 0;
  overflow: hidden;
  margin: 1.5em 0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  background: #000;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 8px;
}

/* 移动端视频容器优化 */
@media screen and (max-width: 768px) {
  .video-container {
    margin: 1em 0;
    border-radius: 4px;
  }

  .video-container iframe {
    border-radius: 4px;
  }
}

/* 文章详情页目录样式优化 - 解决双滚动条问题 */
.article-detail {
  position: relative;
}

.article-detail .toc-container {
  background-color: transparent; /* 背景透明，让下层滚动条可见 */
  padding: 0;
  position: fixed;
  top: 90px; /* 初始值，会被JS动态调整 */
  right: 0;
  width: 300px;
  z-index: 5;
  /* 不设置max-height和overflow，让内层.widget处理滚动 */
}

.article-detail .toc-container .widget {
  background-color: var(--pai-color-fff-normal); /* 背景色设置在内部容器 */
  padding: 20px;
  padding-right: 8px; /* 给内容留一点右侧空间 */
  box-sizing: border-box;
  max-height: calc(100vh - 120px); /* 设置最大高度，会被JS动态调整 */
  overflow-y: auto; /* 滚动在widget层 */
}

/* 移除arCatalog-body的滚动，让它和arCatalog-line作为一个整体 */
.article-detail .toc-container .arCatalog-body {
  overflow-y: visible !important; /* 覆盖global.css和JS设置的overflow */
  max-height: none !important; /* 移除高度限制 */
  height: auto !important; /* 让高度自适应内容 */
}


