/**
 * 评论抽奖系统 - 评论样式
 * 实现评论交替颜色和中奖标识功能
 * 所有样式都从父主题继承，适配子比主题
 */

/* 评论交替背景颜色的基本选择器 - 这些会被动态CSS覆盖 */
/* 奇数评论背景 */
.comment-list > li:nth-child(odd),
.commentlist > li:nth-child(odd),
.post-comments > .comment:nth-child(odd) {
    /* 使用父主题变量 */
    background-color: var(--cl-odd-bg, #e8f0fd) !important;
    border-radius: var(--radius, 8px) !important;
    margin-bottom: var(--spacer-sm, 10px) !important;
    padding: var(--spacer-xs, 5px) !important;
    transition: all 0.3s ease !important;
}

/* 偶数评论背景 */
.comment-list > li:nth-child(even),
.commentlist > li:nth-child(even),
.post-comments > .comment:nth-child(even) {
    /* 使用父主题变量 */
    background-color: var(--cl-even-bg, #ffebee) !important;
    border-radius: var(--radius, 8px) !important;
    margin-bottom: var(--spacer-sm, 10px) !important;
    padding: var(--spacer-xs, 5px) !important;
    transition: all 0.3s ease !important;
}

/* 评论回复也应用交替颜色 */
.children > li:nth-child(odd),
.comment-list .children > li:nth-child(odd),
.commentlist .children > li:nth-child(odd) {
    /* 使用父主题变量 */
    background-color: var(--cl-odd-bg, #e8f0fd) !important;
    border-radius: var(--radius, 8px) !important;
    margin: var(--spacer-xs, 5px) 0 !important;
    padding: var(--spacer-xs, 5px) !important;
}

.children > li:nth-child(even),
.comment-list .children > li:nth-child(even),
.commentlist .children > li:nth-child(even) {
    /* 使用父主题变量 */
    background-color: var(--cl-even-bg, #ffebee) !important;
    border-radius: var(--radius, 8px) !important;
    margin: var(--spacer-xs, 5px) 0 !important;
    padding: var(--spacer-xs, 5px) !important;
}

/* 针对子比主题评论结构 */
.posts-wrapper > .posts-item:nth-child(odd) {
    /* 使用父主题变量 */
    background-color: var(--cl-odd-bg, #e8f0fd) !important;
    border-radius: var(--radius, 8px) !important;
    margin-bottom: var(--spacer-sm, 10px) !important;
    padding: var(--spacer-xs, 5px) !important;
    transition: all 0.3s ease !important;
}

.posts-wrapper > .posts-item:nth-child(even) {
    /* 使用父主题变量 */
    background-color: var(--cl-even-bg, #ffebee) !important;
    border-radius: var(--radius, 8px) !important;
    margin-bottom: var(--spacer-sm, 10px) !important;
    padding: var(--spacer-xs, 5px) !important;
    transition: all 0.3s ease !important;
}

/* 评论内部元素样式继承 */
.comment-body, 
.comment-text, 
.comment-content, 
.comment-author, 
.comment-meta, 
.comment-awaiting-moderation,
.comment-form-comment textarea,
.comment-respond input {
    font-family: var(--font-family, inherit) !important;
    color: var(--main-color, inherit) !important;
}

/* 评论作者名称 */
.comment-author .fn {
    font-weight: var(--font-weight-bold, bold) !important;
    color: var(--main-color, inherit) !important;
}

/* 评论日期 */
.comment-meta a, 
.comment-time {
    color: var(--muted-color, #999) !important;
    font-size: var(--font-size-xs, 12px) !important;
}

/* 评论内容 */
.comment-content p {
    color: var(--main-color, inherit) !important;
    font-size: var(--font-size-sm, 14px) !important;
    line-height: var(--line-height-sm, 1.6) !important;
}

/* 移动端样式适配 */
@media (max-width: 768px) {
    /* 调整移动端样式 */
    .cl-comment-odd, .cl-comment-odd .children .comment,
    .cl-comment-even, .cl-comment-even .children .comment {
        padding: 10px !important;
        margin-bottom: 10px !important;
    }
} 