/* =========================
   评论模块通用样式
   ========================= */
.post-comment-title h3 {
    font-size: 28px;
}

.post-comment-title h4 {
    font-size: 22px;
}

.latest-comments li:first-child .comments-box {
    border-top: 0;
    padding-top: 0;
}

.latest-comments li.children {
    margin-left: 85px;
}

@media (max-width: 768px) {
    .latest-comments li.children {
        margin-left: 0;
    }
}

/* =========================
   头像、角色标签
   ========================= */
.comments-avatar {
    position: relative;
    float: left;
    margin-right: 20px;
}

.comments-avatar img {
    border-radius: 50%;
    width: 60px;
}

@media (max-width: 575px) {
    .comments-avatar img {
        width: 48px;
    }
}

/* 角色标签颜色 */
.badge-role {
    position: absolute;
    right: -6px;
    bottom: -1px;
    padding: 2px 5px 2px 5px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    color: #fff;
    border-radius: 12px;
    white-space: nowrap;
    box-shadow: 0 0 0 2px #fff;
}
@media (max-width: 768px) {
    .badge-role {
        font-size: 9px;
    }
}


.role-admin {
    background: #f60d32;
}

.role-mod {
    background: #3f51b5;
}

.role-super {
    background: #f9bd25;
}

.role-user {
    background: #3ab519;
}

.role-owner {
    background: #732ff5;
}

.role-anon {
    background: #616161;
}

/* =========================
   评论内容/文本
   ========================= */
.comments-text {
    overflow: hidden;
    border-bottom: 1px solid #f1f0f7;
    padding-bottom: 20px;
    margin-top: 20px;
}

.comments-text p {
    margin-bottom: 12px !important;
    font-size: 15px;
    color: #444;
}

/* =========================
   评论输入框（主/回复）
   ========================= */
.comment-input,
.replay-input {
    font-family: Menlo, "JetBrains Mono", monospace;
    font-size: 14px;
    width: 100%;
    border: 0;
    outline: 0;
    padding: 15px 20px;
    border-radius: 15px;
    line-height: 20px;
    min-height: 50px;
    box-sizing: border-box;
    font-weight: 400;
    background: #efefef;
    word-wrap: break-word !important;
    white-space: pre-line !important;
    overflow-wrap: break-word !important;
}

.comment-input {
    height: 100px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.replay-input {
    height: 50px;
    margin-top: 10px;
}

.comment-input::placeholder,
.replay-input::placeholder {
    color: #666;
}

@media (max-width: 575px) {
    .comment-input,
    .replay-input {
        font-size: 12px;
    }

    .comment-input::placeholder,
    .replay-input::placeholder {
        font-size: 12px;
        line-height: 16px;
    }
}


/* =========================
   评论按钮
   ========================= */
.comment-button {
    font-family: Menlo, "JetBrains Mono", monospace;
    font-size: 14px;
    width: auto;
    min-width: 72px;
    height: 50px;
    border: 0;
    outline: 0;
    padding: 0 20px;
    line-height: 50px;
    border-radius: 15px;
    box-sizing: border-box;
    font-weight: 500;
    background: #4636ff;
    color: #fff;
    margin-top: 10px;
    margin-right: 2px;
}

.comment-button:hover {
    background: #ffffff;
    color: #4636ff;
    outline: 2px solid #4636ff;
}

.close-bottom,
.expand-bottom{
    font-family: Menlo, "JetBrains Mono", monospace;
    font-size: 15px;
    width: auto;
    min-width: 34px;
    height: 28px;
    border: 0;
    outline: 0;
    margin-top: 2px;
    padding: 5px;
    border-radius: 15px;
    box-sizing: border-box;
    font-weight: 500;
    margin-left: 5px;
    background: orangered;
    color: #fff;
    margin-right: 2px;
}

.expand-bottom {
    background: #e6e6e6;
    color: #333;
}


.close-bottom:hover {
    background: #fff;
    color: orangered;
    outline: 2px solid orangered;
}

.expand-bottom:hover {
    background: #333;
    color: #fff;
    transform: scale(1.05);
}

.z-btn-comment {
    display: inline-block;
    height: 54px;
    line-height: 48px;
    border: 2px solid #4636ff;
    background: #4636ff;
    color: #ffffff;
    padding: 0 30px;
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    border-radius: 10px;
    font-weight: 700;
    min-width: 72px;
    text-align: center;
}

.z-btn-comment:hover {
    background: #ffffff;
    color: #4636ff;
}


/* =========================
   评论元信息（名称、时间、签名）
   ========================= */
.avatar-name {
    overflow: hidden;
    position: relative;
}

.avatar-name h5 {
    font-size: 21px;
    margin-bottom: 1px;
    color: #444;
}

.time-meta {
    font-size: 14px;
    font-weight: 600;
    color: #889;
}

.signature-meta {
    padding-bottom: 4px;
    font-size: 15px;
    font-weight: 450;
    color: #666;
}

.post-meta {
    font-size: 16px;
    font-weight: 500;
    color: #666;
}

.avatar-name .post-meta {
    font-size: 15px;
    font-weight: 500;
    color: #666;
}

@media (max-width: 575px) {
    .post-meta {
        font-size: 14px;
    }

    .avatar-name .post-meta {
        font-size: 13px;
        font-weight: 500;
    }
}

/* =========================
   评论操作
   ========================= */
.comment-reply {
    font-weight: 600;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    margin-right: 15px;
}

.comment-right {
    float: right;
    margin-top: 2px;
    margin-left: 15px;
    margin-right: 0 !important;
}

@media (max-width: 575px) {
    .comment-reply {
        font-size: 12px;
        margin-right: 10px;
    }

    .comment-right {
        margin-left: 15px;
    }
}

.comment-reply i {
    padding-right: 4px;
}

.comment-reply:hover {
    color: #4636ff;
}

.comment-copied {
    color: #28a745;
}

.comment-likes i {
    color: orangered;
}

.comment-blue {
    color: #4636ff;
}

/* =========================
   评论标签
   ========================= */
.comment-tag {
    display: inline-block;
    min-width: 40px;
    padding: 1px 5px;
    font-weight: 550;
    color: #555;
    text-align: center;
    position: relative;
    cursor: default;
    transition: transform .3s ease;
    background: #eee;
    border-radius: 5px;
    margin-right: 5px;
}

/* =========================
   发表新评论输入框（表单）
   ========================= */
.post-input input,
.post-input textarea {
    width: 100%;
    height: 50px;
    max-height: 300px;
    line-height: 50px;
    padding: 0 30px;
    border-radius: 10px;
    border: 2px solid #f9f9f9;
    background: #f9f9f9;
    margin-bottom: 20px;
}

.post-input input::placeholder,
.post-input textarea::placeholder {
    font-weight: 500;
    color: #686777;
}

.post-input input:focus,
.post-input textarea:focus {
    border-color: #4636ff;
    outline: none;
    background: #ffffff;
}

.post-input input:focus::placeholder,
.post-input textarea:focus::placeholder {
    opacity: 0;
}

.post-input textarea {
    height: 180px;
    line-height: 26px;
    resize: none;
    padding: 30px;
    padding-top: 20px;
}

textarea.auto-resize.expanded {
    height: 300px;          /* 要比普通 max-height 大 */
}

.post-input textarea.auto-resize.expanded {
    height: 400px;
}



.post-check input {
    margin-right: 5px;
}

.post-comment-form {
    margin-top: 90px;
    padding-top: 50px;
    border-top: 2px solid #e3e1e1;
}

.post-comment-form h4 {
    font-size: 22px;
    margin-bottom: 0;
}

.post-comment-form > span {
    display: inline-block;
    margin-bottom: 45px;
}

.comment-pager a {
    font-size: 16px;
    font-weight: 450;
    color: #333;
    background: #f5f5f5;
    border-radius: 8px;
    padding: 3px 10px;
!important;
    text-align: center;
    margin-right: 14px;
    display: inline-block;
    cursor: pointer;
}

.comment-pager a.active {
    background: #4636ff;
    color: #fff;
    transform: scale(.95);
}

.comment-pager a.active:hover {
    background: #4636ff;
    color: #fff;
    transform: scale(1);
}

.comment-pager a:hover {
    opacity: 2;
    transform: scale(1.05);
}

.load-more a {
    color: #4636ff
}

/*
 ======================
 评论 Markdown
 ======================
 */

.comment_main h1 {
    font-size: 45px;
    margin-bottom: 30px;
    padding-top: 30px;
    border-top: 1px solid #eeeeee;
    color: var(--text-color);
}

@media (max-width: 575px) {
    .comment_main h1 {
        font-size: 35px;
    }
}

.comment_main h2 {
    font-size: 31px;
    margin-bottom: 16px;
    margin-top: 25px;
    color: var(--text-color);
}

.comment_main h3 {
    font-size: 25px;
    margin-top: 14px;
    margin-bottom: 11px;
    color: var(--text-color);
}

.comment_main h4 {
    font-size: 22px;
    margin-top: 14px;
    color: var(--text-color);
}

.comment_main p {

    font-size: 16px;
    font-weight: normal;
    color: var(--text-color);
    line-height: 24px;
    letter-spacing: .3px;
    margin-bottom: 0;
}

.comment_main h5 {
    font-size: 19px;
    margin-top: 12px;
    font-weight: 530;
    color: var(--text-color);
}

.comment_main .table-wrapper {
    overflow: hidden;
    /*border-radius: 16px;*/
    margin-top: 16px;
    margin-bottom: 16px;
}

.comment_main pre code {
    margin-top: 12px;
}

.comment_main button.button-code {
    margin-top: 12px;
}

.comment_main table.modern-table th,
.comment_main table.modern-table td {
    padding: 8px 15px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}

.comment_main table.modern-table th {
    font-weight: 550;
    color: var(--text-color);
    font-size: 17px;
    border-bottom: 2px solid #bbb;
}

/*.comment_main .number__list ol li {*/
/*    margin-left: 3ch;*/
/*}*/
/*.comment_main .item__list ol li {*/
/*    margin-left: 6ch;*/
/*}*/

/*@media (max-width: 768px) {*/
/*    .comment_main .number__list ol li {*/
/*        margin-left: 2ch;*/
/*    }*/

/*    .comment_main .item__list ol li {*/
/*        margin-left: 4ch;*/
/*    }*/
/*}*/

/*@media (max-width: 575px) {*/
/*    .comment_main .number__list ol li {*/
/*        margin-left: 1ch;*/
/*    }*/

/*    .comment_main .item__list ol li {*/
/*        margin-left: 2ch;*/
/*    }*/
/*}*/

.comment_main .markdown__indent1{
    margin-left: 6ch;
}

.comment_main .markdown__indent2{
    margin-left: 6ch;
}

.comment_main .markdown__indent3{
    margin-left: 6ch;
}

@media (max-width: 768px) {

    .comment_main .markdown__indent1{
        margin-left: 4ch;
    }

    .comment_main .markdown__indent2{
        margin-left: 5ch;
    }

    .comment_main .markdown__indent3{
        margin-left: 5ch;
    }

}

@media (max-width: 575px) {

    .comment_main .markdown__indent1{
        margin-left: 3ch;
    }

    .comment_main .markdown__indent2{
        margin-left: 4ch;
    }

    .comment_main .markdown__indent3{
        margin-left: 4ch;
    }

}

.comment_main .strong {
    color: orangered; /* 代码颜色 */
    border-radius: 4px; /* 圆角 */
    font-size: 16px; /* 字体大小 */
    white-space: pre-wrap; /* 允许自动换行 */
    word-wrap: break-word; /* 处理长行 */
}

.comment_main .italic {
    font-style: italic;
}

.comment_main .strikeout {
    text-decoration: line-through;
}

.comment_main .border-line {
    border-bottom: 1px solid var(--border-color);
}

/*
 ======================
 抽屉
 ======================
 */
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
    z-index: 9999;
}

.drawer-overlay.show {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

.latest-comments > li:not(.children) {
    opacity: 1;
}

.drawer {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    max-height: 80%;
    background: #fff;
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
    transition: transform .3s ease;
    display: flex;
    flex-direction: column;
}

.drawer-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 0 14px 12px;
}

.drawer-header {
    padding: 14px 18px;
    font-weight: 600;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-header button {
    border: none;
    background: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.drawer-overlay.show .drawer {
    transform: translateY(0);
}


@media (max-width: 768px) {
    #drawerList li.children {
        margin: 10px 0 0;
    }
}

/*
 ======================
 窄屏幕优化
 ======================
 */

@media (max-width: 768px) {
    .comment_main {
        margin-top: 14px;
        margin-bottom: 10px;
    }

    .comments-text {
        border-bottom: none;
        padding-bottom: 0;
    }

    .latest-comments li .comments-box {
        margin-bottom: 20px;
        padding-bottom: 20px;
        border-bottom: 1px solid #f1f0f7;
    }

}


@media (max-width: 768px) and (min-width: 575px) {
    p {
        margin-top: 22px;
    }

    .comment_main {
        margin-top: 22px;
    }
}