/* =======================================================
   服饰易文化 - 社交功能统一样式
   Social styles: like, favorite, comment, follow, share
   所有内页通用（文章/百科/相册/文库）
   ======================================================= */

/* ---- 1. 操作按钮通用样式 (文章/百科/相册详情页底部) ---- */
.detail-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border: 1px solid var(--color-border, #e8e8e8);
    border-radius: 20px;
    background: var(--color-bg, #fff);
    color: var(--color-text-secondary, #666);
    font-size: 14px;
    cursor: pointer;
    transition: all .2s;
    user-select: none;
}

.action-btn:hover {
    border-color: var(--color-primary, #913500);
    color: var(--color-primary, #913500);
    background: rgba(145, 53, 0, .05);
}

.action-btn.active,
.action-btn.liked {
    border-color: var(--color-primary, #913500);
    color: var(--color-primary, #913500);
    background: rgba(145, 53, 0, .08);
}

.action-btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    flex-shrink: 0;
}

.action-btn.active svg,
.action-btn.liked svg {
    fill: currentColor;
}

/* 收藏按钮特殊颜色 */
.action-btn.collect-btn.active {
    color: #f39c12;
    border-color: #f39c12;
    background: rgba(243, 156, 18, .08);
}

.action-btn.collect-btn.active svg {
    fill: currentColor;
}

/* ---- 2. 评论区样式 ---- */
.detail-comments-card {
    margin-top: 24px;
    background: var(--color-bg, #fff);
    border-radius: var(--radius-lg, 8px);
    padding: 24px;
}

.detail-comments-card .card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-border, #e8e8e8);
}

/* 评论表单 */
.comment-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.comment-form textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 1px solid var(--color-border, #e8e8e8);
    border-radius: var(--radius-md, 6px);
    font-size: 14px;
    resize: vertical;
    font-family: inherit;
    box-sizing: border-box;
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--color-primary, #913500);
    box-shadow: 0 0 0 2px rgba(145, 53, 0, .1);
}

.comment-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.comment-submit-btn {
    padding: 8px 24px;
    background: var(--color-primary, #913500);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: opacity .2s;
}

.comment-submit-btn:hover {
    opacity: .85;
}

/* 评论列表 */
.comment-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comment-item {
    padding: 16px;
    border: 1px solid var(--color-border, #e8e8e8);
    border-radius: var(--radius-md, 6px);
    background: var(--color-bg-secondary, #f0f0f0);
}

.comment-item-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.comment-author {
    font-weight: 600;
    font-size: 14px;
    color: var(--color-text, #333);
}

.comment-time {
    font-size: 12px;
    color: var(--color-text-muted, #999);
    margin-left: auto;
}

.comment-content {
    font-size: 14px;
    line-height: 1.7;
    color: var(--color-text, #333);
    margin-bottom: 8px;
}

/* 评论操作栏 */
.comment-actions {
    display: flex;
    gap: 16px;
    font-size: 13px;
}

.comment-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--color-text-secondary, #666);
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all .2s;
    font-size: 13px;
}

.comment-action-btn:hover {
    color: var(--color-primary, #913500);
    background: rgba(145, 53, 0, .05);
}

.comment-action-btn.liked {
    color: var(--color-primary, #913500);
}

.comment-action-btn svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.comment-action-btn.liked svg {
    fill: currentColor;
}

/* 评论点赞/踩计数 */
.comment-like-count,
.comment-dislike-count {
    font-size: 12px;
    color: var(--color-text-muted, #999);
}

/* 回复表单 */
.comment-reply-form {
    margin-top: 8px;
    padding-left: 20px;
    border-left: 2px solid var(--color-primary, #913500);
}

.comment-reply-form textarea {
    width: 100%;
    min-height: 60px;
    padding: 8px;
    border: 1px solid var(--color-border, #e8e8e8);
    border-radius: var(--radius-sm, 4px);
    font-size: 13px;
    resize: vertical;
    box-sizing: border-box;
}

/* ---- 8. 评论嵌套/回复样式 ---- */
.comment-replies {
    margin-top: 10px;
    padding-left: 20px;
    border-left: 2px solid var(--color-border, #e8e8e8);
}

.comment-reply-item {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #fafafa;
}

.comment-reply-item:last-child {
    border-bottom: none;
}

.comment-reply-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--color-bg-secondary, #f0f0f0);
}

.comment-reply-content {
    flex: 1;
    min-width: 0;
}

.comment-reply-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.comment-reply-author {
    font-weight: 600;
    font-size: 13px;
    color: var(--color-text, #333);
}

.comment-reply-to {
    font-size: 12px;
    color: var(--color-text-muted, #999);
}

.comment-reply-to strong {
    color: var(--color-primary, #913500);
    font-weight: 500;
}

.comment-reply-text {
    font-size: 13.5px;
    color: var(--color-text, #444);
    line-height: 1.5;
    margin: 0 0 6px 0;
    word-break: break-word;
}

.comment-reply-actions {
    display: flex;
    gap: 8px;
    font-size: 12px;
}

.comment-reply-actions .comment-action-btn {
    font-size: 12px;
    padding: 1px 4px;
}

/* ---- 3. 用户卡片中的关注按钮 ---- */
.user-card .follow-btn {
    padding: 6px 20px;
    border: 1px solid var(--color-primary, #913500);
    border-radius: 20px;
    background: transparent;
    color: var(--color-primary, #913500);
    font-size: 14px;
    cursor: pointer;
    transition: all .2s;
}

.user-card .follow-btn:hover {
    background: var(--color-primary, #913500);
    color: #fff;
}

.user-card .follow-btn.following {
    background: var(--color-bg-secondary, #f0f0f0);
    color: var(--color-text-secondary, #666);
    border-color: var(--color-border, #e8e8e8);
}

/* ---- 4. 分享按钮 ---- */
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border: 1px solid var(--color-border, #e8e8e8);
    border-radius: 20px;
    background: var(--color-bg, #fff);
    color: var(--color-text-secondary, #666);
    font-size: 14px;
    cursor: pointer;
    transition: all .2s;
}

.share-btn:hover {
    border-color: var(--color-primary, #913500);
    color: var(--color-primary, #913500);
}

/* ---- 5. 响应式：移动端适配 ---- */
@media (max-width: 640px) {
    .detail-actions {
        gap: 8px;
    }
    
    .action-btn {
        padding: 6px 14px;
        font-size: 13px;
    }
    
    .detail-comments-card {
        padding: 16px;
    }
    
    .comment-item {
        padding: 12px;
    }
    
    .comment-avatar {
        width: 32px;
        height: 32px;
    }
}

/* ---- 6. Toast 提示（如果没在其它CSS里） ---- */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: var(--radius-md, 6px);
    font-size: 14px;
    z-index: 9999;
    animation: toastIn .3s ease;
    box-shadow: var(--shadow-lg, 0 4px 16px rgba(0,0,0,.15));
}

.toast-success {
    background: #f6ffed;
    color: #52c41a;
    border: 1px solid #b7eb8f;
}

.toast-error {
    background: #fff2f0;
    color: #f5222d;
    border: 1px solid #ffccc7;
}

.toast-warning {
    background: #fffbe6;
    color: #fa8c16;
    border: 1px solid #ffe58f;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ---- 7. 空状态 ---- */
.comment-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--color-text-muted, #999);
    font-size: 14px;
}


/* =======================================================
   服饰易文化 - 社交功能增强样式
   Social enhancements: emoji, image upload, edit/delete, VIP, threaded replies
   ======================================================= */

/* ---- 8. 评论表单工具（图片上传、表情） ---- */
.comment-form-tools {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.comment-tool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    color: #666;
    transition: all 0.3s;
}

.comment-tool-btn:hover {
    color: var(--color-primary, #913500);
    border-color: var(--color-primary, #913500);
    background: rgba(145, 53, 0, 0.05);
}

/* ---- 9. 表情选择器 ---- */
.emoji-picker {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 5px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    max-height: 200px;
    overflow-y: auto;
    margin-top: 8px;
}

.emoji-picker button {
    font-size: 20px;
    padding: 5px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
}

.emoji-picker button:hover {
    background: #f0f0f0;
}

/* ---- 10. VIP 徽章 ---- */
.vip-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    color: #fff;
    background: linear-gradient(135deg, #f7ba2a, #f7ba2a);
    margin-left: 6px;
    vertical-align: middle;
}

.vip-badge-SVIP {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
}

.vip-small {
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 3px;
}

/* ---- 11. 通用关注按钮（不在 .user-card 内） ---- */
.follow-btn {
    display: inline-block;
    padding: 3px 12px;
    border: 1px solid var(--color-primary, #913500);
    border-radius: 12px;
    font-size: 12px;
    color: var(--color-primary, #913500);
    background: #fff;
    cursor: pointer;
    margin-left: 8px;
    transition: all 0.3s;
    vertical-align: middle;
}

.follow-btn:hover {
    background: rgba(145, 53, 0, 0.05);
}

.follow-btn.followed {
    color: #999;
    border-color: #d9d9d9;
    background: #f5f5f5;
}

.follow-btn.followed:hover {
    color: #ff4d4f;
    border-color: #ff4d4f;
    background: #fff1f0;
}

/* ---- 12. 评论编辑表单 ---- */
.comment-edit-form {
    margin-top: 8px;
}

.comment-edit-form textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    resize: vertical;
    min-height: 60px;
}

.comment-edit-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    justify-content: flex-end;
}

/* ---- 13. 评论操作按钮增强（活跃状态） ---- */
.comment-action-btn.active {
    color: #ff4d4f;
    font-weight: 600;
}

.comment-action-btn.active svg {
    fill: #ff4d4f;
    stroke: #ff4d4f;
}

.comment-delete-btn:hover {
    color: #ff4d4f !important;
    background: #fff1f0 !important;
}

/* ---- 14. 小按钮 ---- */
.btn-small {
    padding: 4px 12px;
    font-size: 13px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-small.btn-primary {
    background: var(--color-primary, #913500);
    color: #fff;
    border-color: var(--color-primary, #913500);
}

.btn-small.btn-primary:hover {
    background: var(--color-primary-light, #b45a1a);
}

.btn-small:hover {
    border-color: var(--color-primary, #913500);
    color: var(--color-primary, #913500);
}

/* ---- 15. 评论中的图片 ---- */
.comment-text img {
    max-width: 200px;
    height: auto;
    border-radius: 6px;
    margin: 4px 0;
}

/* ---- 16. 增强的嵌套回复样式 ---- */
.comment-replies {
    margin-top: 10px;
    padding-left: 12px;
    border-left: 2px solid #f0f0f0;
    margin-left: 36px;
}

.comment-reply-item {
    display: flex;
    gap: 8px;
    padding: 10px 0;
    border-bottom: 1px solid #fafafa;
}

.comment-reply-item:last-child {
    border-bottom: none;
}

.comment-reply-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
}

/* ---- 17. 内联回复表单 ---- */
.inline-reply-form {
    margin-top: 12px;
    padding: 12px;
    background: #fafbfc;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
}

.reply-textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    resize: vertical;
    min-height: 50px;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}

.reply-textarea:focus {
    border-color: var(--color-primary, #913500);
    box-shadow: 0 0 0 2px rgba(145, 53, 0, 0.1);
}

.inline-reply-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 8px;
}

/* ---- 18. 回复操作按钮 ---- */
.reply-like-btn, .reply-dislike-btn, .reply-del-btn {
    font-size: 12px !important;
    padding: 2px 8px !important;
}

/* ---- 19. 响应式增强 ---- */
@media (max-width: 768px) {
    .comment-form-tools {
        gap: 4px;
    }

    .comment-tool-btn {
        width: 32px;
        height: 32px;
    }

    .emoji-picker {
        grid-template-columns: repeat(7, 1fr);
    }

    .follow-btn {
        padding: 2px 8px;
        font-size: 11px;
    }
}

/* ---- 20. Hotfix：SVG 图标、头像可见性 ---- */

/* Ensure SVG icons inside all comment buttons are visible */
.comment-tool-btn svg,
.comment-action-btn svg,
.reply-like-btn svg,
.reply-dislike-btn svg,
.reply-del-btn svg,
.comment-delete-btn svg {
    display: inline-block !important;
    width: auto !important;
    height: auto !important;
    min-width: 14px;
    min-height: 14px;
    stroke-width: 2;
    flex-shrink: 0;
}

/* Tool buttons: white background, visible icon */
.comment-tool-btn {
    background: #fff !important;
    border: 1px solid #d9d9d9 !important;
    border-radius: 6px !important;
    color: #666 !important;
}
.comment-tool-btn:hover {
    border-color: var(--color-primary, #913500) !important;
    color: var(--color-primary, #913500) !important;
    background: rgba(145, 53, 0, 0.05) !important;
}

/* Action buttons: ensure text + icon are visible */
.detail-comments-card .comment-action-btn {
    background: transparent !important;
    color: #888 !important;
    border-radius: 4px !important;
    padding: 4px 10px !important;
}
.detail-comments-card .comment-action-btn:hover {
    background: #f5f5f5 !important;
    color: var(--color-primary, #913500) !important;
}
.detail-comments-card .comment-action-btn svg {
    stroke: currentColor !important;
    fill: none !important;
}
.detail-comments-card .comment-action-btn.active svg {
    stroke: var(--color-primary, #913500) !important;
}

/* Submit button */
.submit-comment-btn {
    background: linear-gradient(135deg, #913500, #b45a1a) !important;
    color: #fff !important;
    border: none !important;
    padding: 8px 24px !important;
    font-size: 14px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-weight: 500 !important;
}
.submit-comment-btn:hover {
    opacity: 0.9 !important;
}

/* Avatar: ensure images show, fallback for missing avatars */
.comment-avatar,
.comment-form-avatar,
.comment-reply-avatar {
    background: #f0ece4 !important;
    min-width: inherit;
    min-height: inherit;
}
.comment-avatar img,
.comment-form-avatar img,
.comment-reply-avatar img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 50% !important;
}


/* =======================================================
   服饰易文化 - 评论增强样式（来自 comment_enhance.css）
   User level badge, comment pagination, enhanced actions
   ======================================================= */

/* ---- 21. 用户等级徽章 ---- */
.user-level-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    margin-left: 6px;
    vertical-align: middle;
}

/* ---- 22. 关注按钮（蓝色主题版本） ---- */
.follow-btn {
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.4;
    margin-left: 8px;
    vertical-align: middle;
    background: #1890ff;
    color: #fff;
    border: 1px solid #1890ff;
    cursor: pointer;
    transition: all 0.2s;
}

.follow-btn:hover {
    background: #40a9ff;
    border-color: #40a9ff;
}

.follow-btn.followed {
    background: #f0f0f0;
    color: #666;
    border-color: #d9d9d9;
}

.follow-btn.followed:hover {
    background: #ffe6e6;
    color: #ff4d4f;
    border-color: #ff4d4f;
}

/* ---- 23. 评论操作栏增强 ---- */
.comment-actions,
.comment-reply-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.comment-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.comment-action-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.comment-action-btn.active {
    color: #1890ff;
    background: #e6f7ff;
}

/* 点赞/踩按钮 active 状态 */
.like-btn.active {
    color: #1890ff;
    background: #e6f7ff;
}

.dislike-btn.active {
    color: #fa8c16;
    background: #fff7e6;
}

/* 删除按钮 */
.comment-delete-btn:hover {
    color: #ff4d4f;
    background: #ffe6e6;
}

/* ---- 24. 评论计数 ---- */
.like-count,
.dislike-count {
    font-weight: 600;
    min-width: 12px;
    text-align: center;
}

/* ---- 25. 评论翻页 ---- */
.comment-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 24px 0 16px;
    flex-wrap: wrap;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background: #fff;
    color: #333;
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.page-btn:hover {
    border-color: #1890ff;
    color: #1890ff;
}

.page-btn.active {
    border-color: #1890ff;
    background: #1890ff;
    color: #fff;
    font-weight: 600;
}

.page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    color: #999;
    font-size: 13px;
}

.page-info {
    margin-left: 16px;
    color: #999;
    font-size: 12px;
}

/* ---- 26. 评论头部增强 ---- */
.comment-header,
.comment-reply-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.comment-author,
.comment-reply-author {
    font-weight: 600;
    color: #333;
    font-size: 13px;
}

.comment-date {
    color: #999;
    font-size: 11px;
    margin-left: auto;
}

.comment-reply-to {
    color: #1890ff;
    font-size: 11px;
}

/* ---- 27. 响应式增强 ---- */
@media (max-width: 768px) {
    .comment-actions,
    .comment-reply-actions {
        gap: 8px;
    }
    
    .comment-action-btn {
        font-size: 11px;
        padding: 3px 6px;
    }
    
    .user-level-badge {
        font-size: 10px;
        padding: 1px 6px;
    }
    
    .follow-btn {
        font-size: 10px;
        padding: 1px 8px;
    }
}
