/* 资源帖评论区修复：UEditor 与 原站 post-form 样式冲突 */

/* 1) .post-form 固定 height:300px + padding，会把 UEditor 挤出容器，
      导致编辑器和「剩余2000个字/发布」重叠；改成自适应高度 */
.resource-detail .post-form,
.commentbox .post-form {
    height: auto !important;
    min-height: 0 !important;
    box-sizing: border-box;
    overflow: visible;
}

/* 2) UEditor 外层容器不要额外边框（原站 .editor_wrap 与 mck-ue-wrap 重复） */
.commentbox .mck-ue-wrap {
    border: 1px solid #dfdfdf;
    border-radius: 0;
    width: 100% !important;
    box-sizing: border-box;
}

/* 3) UEditor iframe 宽度跟随容器，别超出或被压窄 */
.commentbox .edui-default .edui-editor {
    width: 100% !important;
    box-sizing: border-box;
}
.commentbox .edui-default .edui-editor-iframeholder,
.commentbox .edui-default .edui-editor iframe {
    width: 100% !important;
}

/* 4) 「剩余 N 个字」和发布按钮：让出编辑器的位置，正常排在下方 */
.commentbox .post-form > div {
    clear: both;
}
.commentbox .post-form #textCount {
    font-size: 14px;
    color: #888;
}
.commentbox .post-form .actions {
    margin-top: 10px;
    clear: both;
    display: flex;
    justify-content: flex-end;
}
.commentbox .post-form .actions .fr {
    float: none !important;
}
.commentbox .post-form .btn_post {
    border: 0;
    cursor: pointer;
}
.commentbox .post-form .btn_post[disabled] {
    background-color: #9fd9b4 !important;
    cursor: not-allowed;
}

/* 5) 登录遮罩：覆盖编辑器区域而不是整个表单（原来 height:243px 会盖住下方） */
.commentbox #toLogin_div_id {
    height: auto !important;
    bottom: 0;
    box-sizing: border-box;
}

/* 6) 楼层列表：原站固定 height:54px 装不下真实正文，改成自适应 */
.commentbox .replymore-list {
    height: auto !important;
    min-height: 54px;
    overflow: visible;
    padding-bottom: 8px;
}
.commentbox .replymore-list-name {
    width: auto !important;
    max-width: 760px;
    height: auto !important;
    min-height: 22px;
    overflow: visible;
    line-height: 22px;
    white-space: normal;
    word-break: break-word;
}

/* 7) 楼层头像：原站 i 用雪碧图做角标，图已失效，隐藏避免空白块 */
.commentbox .replymore-list-head i {
    display: none;
}

/* 9) 底部 SEO 推荐区块：原站 .tab 是 173px×5=865px 刚好铺满 870px，
      换成正式版 CSS 后宽度不够会掉行；强制一行五个并锁定宽度 */
.resource-detail .seo .tab {
    display: flex;
    width: 870px;
    max-width: 100%;
}
.resource-detail .seo .tab i {
    flex: 1 1 auto;
    width: auto !important;
    margin-right: 0 !important;
    box-sizing: border-box;
}
.resource-detail .seo .tab i:last-child {
    border-right: 0;
}

/* 10) SEO 列表：三列对齐，链接过宽会导致错位 */
.resource-detail .seo .resourceList {
    width: 870px;
    max-width: 100%;
    box-sizing: border-box;
}
.resource-detail .seo .resourceList .dataList {
    display: flex;
    flex-wrap: wrap;
}
.resource-detail .seo .resourceList .dataList a {
    width: calc(33.333% - 34px) !important;
    margin-right: 34px !important;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 11) 评论区标题栏与楼层分隔线宽度对齐内容区 */
.commentbox .commentbox-h2 {
    width: 100% !important;
    box-sizing: border-box;
}