/**
 * 评论预览插件 - 前端样式
 */

/* 预览框容器 */
.zcp-preview-box {
    position: absolute;
    width: 350px;
    max-width: calc(100vw - 20px);
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    overflow: hidden;
}

.zcp-preview-box.zcp-show {
    opacity: 1;
    transform: translateY(0);
}

/* 加载状态 */
.zcp-loading,
.zcp-error,
.zcp-no-comments {
    padding: 30px 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

.zcp-loading i {
    margin-right: 5px;
}

.zcp-error {
    color: #f56c6c;
}

.zcp-no-comments {
    color: #909399;
}

.zcp-no-comments i {
    font-size: 24px;
    display: block;
    margin-bottom: 10px;
    opacity: 0.5;
}



/* 评论列表 */
.zcp-comments-list {
    overflow-y: auto;
    padding: 15px;
}



/* 滚动条样式 */
.zcp-comments-list::-webkit-scrollbar {
    width: 8px;
}

.zcp-comments-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 8px;
}

.zcp-comments-list::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 8px;
}

.zcp-comments-list::-webkit-scrollbar-thumb:hover {
    background: #b0b0b0;
}

/* 评论项 */
.zcp-comment-item {
    display: flex;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.zcp-comment-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* 头像 */
.zcp-avatar {
    flex-shrink: 0;
    margin-right: 10px;
}

.zcp-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: block;
}

/* 评论内容区 */
.zcp-comment-content {
    flex: 1;
    min-width: 0;
}

/* 评论元信息 */
.zcp-comment-meta {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
    font-size: 12px;
}

.zcp-author {
    font-weight: 600;
    color: #333;
    margin-right: 8px;
}

.zcp-date {
    color: #999;
    font-size: 12px;
}

/* 评论文本 */
.zcp-text {
    color: #666;
    font-size: 13px;
    line-height: 1.6;
    word-wrap: break-word;
    word-break: break-all;
}

/* 查看更多链接 */
.zcp-more-link {
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-top: 1px solid #e5e5e5;
    text-align: center;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    position: relative;
    overflow: hidden;
}

.zcp-more-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.zcp-more-link:hover::before {
    left: 100%;
}

.zcp-more-link a {
    color: #409eff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(64, 158, 255, 0.1);
    border: 1px solid rgba(64, 158, 255, 0.2);
}

.zcp-more-link a:hover {
    color: #fff;
    background: #409eff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(64, 158, 255, 0.3);
}

.zcp-more-link a i {
    margin-left: 6px;
    transition: transform 0.3s;
    font-size: 12px;
}

.zcp-more-link a:hover i {
    transform: translateX(3px);
}


/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
    .zcp-preview-box {
        background: #1e1e1e;
        border-color: #333;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }
    
    .zcp-comment-item {
        border-bottom-color: #333;
    }
    
    .zcp-author {
        color: #e0e0e0;
    }
    
    .zcp-text {
        color: #b0b0b0;
    }
    
    .zcp-date {
        color: #888;
    }
    
    .zcp-more-link {
        background: linear-gradient(135deg, #2a2a2a 0%, #1f1f1f 100%);
        border-top-color: #333;
        border-bottom-left-radius: 16px;
        border-bottom-right-radius: 16px;
    }
    
    .zcp-more-link a {
        color: #66b1ff;
        background: rgba(102, 177, 255, 0.1);
        border: 1px solid rgba(102, 177, 255, 0.2);
    }
    
    .zcp-more-link a:hover {
        color: #fff;
        background: #66b1ff;
        box-shadow: 0 4px 12px rgba(102, 177, 255, 0.3);
    }
    
    .zcp-comments-list::-webkit-scrollbar-track {
        background: #2a2a2a;
        border-radius: 8px;
    }
    
    .zcp-comments-list::-webkit-scrollbar-thumb {
        background: #555;
        border-radius: 8px;
    }
    
    .zcp-comments-list::-webkit-scrollbar-thumb:hover {
        background: #666;
    }
    

}

/* 子比主题适配 */
body.theme-dark .zcp-preview-box {
    background: #1e1e1e;
    border-color: #333;
}

body.theme-dark .zcp-author {
    color: #e0e0e0;
}

body.theme-dark .zcp-text {
    color: #b0b0b0;
}

body.theme-dark .zcp-more-link {
    background: linear-gradient(135deg, #2a2a2a 0%, #1f1f1f 100%);
    border-top-color: #333;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
}

body.theme-dark .zcp-more-link a {
    color: #66b1ff;
    background: rgba(102, 177, 255, 0.1);
    border: 1px solid rgba(102, 177, 255, 0.2);
}

body.theme-dark .zcp-more-link a:hover {
    color: #fff;
    background: #66b1ff;
    box-shadow: 0 4px 12px rgba(102, 177, 255, 0.3);
}

body.theme-dark .zcp-comment-item {
    border-bottom-color: #333;
}

