/* 通用 Engage 互动栏 + 评论区（博客 / 视频 / 相册 / 资源等） */
.eg-engage {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 24px 0 8px;
    padding: 14px 0;
    border-top: 1px solid var(--color-line, #e8e4df);
    border-bottom: 1px solid var(--color-line, #e8e4df);
}

.eg-engage-btn {
    border: 1px solid var(--color-line, #e8e4df);
    background: var(--color-surface, #fff);
    padding: 8px 14px;
    border-radius: var(--radius-md, 8px);
    color: var(--color-ink, #1c1917);
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    line-height: 1.2;
}

.eg-engage-btn:hover,
.eg-engage-btn.is-on {
    border-color: var(--color-primary, #c45c26);
    color: var(--color-primary, #c45c26);
    background: var(--color-primary-soft, rgba(196, 92, 38, 0.08));
}

.eg-engage-btn.is-on i.fa-heart {
    color: #c0392b;
}

.eg-engage-count {
    margin-left: auto;
    font-size: 0.9rem;
    color: var(--color-muted, #78716c);
}

.eg-comments {
    margin: 28px 0 8px;
}

.eg-comments-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-ink, #1c1917);
    margin: 0 0 16px;
}

.eg-comment {
    display: flex;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--color-line, #e8e4df);
}

.eg-comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--color-primary-soft, #f3e8e2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--color-muted, #78716c);
}

.eg-comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.eg-comment-main {
    flex: 1;
    min-width: 0;
}

.eg-comment-head {
    display: flex;
    gap: 10px;
    align-items: baseline;
    margin-bottom: 4px;
}

.eg-comment-head strong {
    color: var(--color-ink, #1c1917);
}

.eg-comment-head time {
    font-size: 0.8rem;
    color: var(--color-muted, #78716c);
}

.eg-comment-main p {
    margin: 0;
    line-height: 1.6;
    color: var(--color-ink, #1c1917);
    white-space: pre-wrap;
    word-break: break-word;
}

.eg-comment-deleted {
    color: #e74c3c !important;
    font-style: normal;
}

.eg-comment.is-deleted .eg-comment-actions {
    display: none;
}

.eg-comment-actions {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.eg-comment-act,
.eg-comment-reply {
    border: 0;
    background: transparent;
    padding: 0;
    color: var(--color-muted, #78716c);
    font-size: 12px;
    cursor: pointer;
}

.eg-comment-act:hover,
.eg-comment-reply:hover {
    color: var(--color-primary, #c45c26);
}

.eg-comment-act.is-on {
    color: var(--color-primary, #c45c26);
}

.eg-comment-act .num {
    margin-left: 2px;
}

.eg-comment-images {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 4px;
}

.eg-comment-img {
    display: block;
    width: 72px;
    height: 72px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--color-line, #e8e4df);
    cursor: zoom-in;
}

.eg-comment-img:hover {
    opacity: 0.92;
}

.eg-comment-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.eg-comment-upload {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

.eg-comment-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none !important;
    margin: 8px 0 0 !important;
    padding: 0 !important;
}

.eg-comment-preview > li {
    position: relative;
    width: 72px !important;
    height: 72px;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    list-style: none !important;
}

.eg-comment-preview .thumbnail {
    display: block;
    width: 72px;
    height: 72px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--color-line, #e8e4df);
    border-radius: 8px;
    overflow: hidden;
}

.eg-comment-preview .thumbnail img,
.eg-comment-preview a img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.eg-comment-preview a:first-child {
    height: 72px !important;
}

.eg-comment-preview .btn-trash {
    position: absolute;
    top: 4px;
    right: 4px;
    z-index: 3;
    width: 22px;
    height: 22px;
    padding: 0;
    line-height: 22px;
    text-align: center;
    border-radius: 50%;
    border: 0;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
}

.eg-comment-preview .btn-cropper {
    position: absolute !important;
    left: 4px !important;
    right: auto !important;
    top: auto !important;
    bottom: 4px !important;
    z-index: 3;
    padding: 1px 5px;
    font-size: 10px;
    border: 0;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
}

.eg-comment-to {
    font-size: 0.85rem;
    color: var(--color-muted, #78716c);
    font-weight: 400;
}

.eg-comment-to em {
    font-style: normal;
    color: var(--color-primary, #c45c26);
}

.eg-comment-replies {
    margin-top: 10px;
    padding-left: 4px;
    border-left: 2px solid var(--color-line, #e8e4df);
}

.eg-comment-reply-item {
    padding: 10px 0 10px 12px;
    border-bottom: 0;
}

.eg-comment-reply-item + .eg-comment-reply-item {
    border-top: 1px solid var(--color-line, #e8e4df);
}

.eg-comment-reply-item .eg-comment-avatar {
    width: 28px;
    height: 28px;
}

.eg-comment-form {
    margin-top: 16px;
}

.eg-comment-reply-tip {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--color-muted, #78716c);
}

.eg-comment-reply-tip[hidden] {
    display: none !important;
}

.eg-comment-reply-tip em {
    font-style: normal;
    color: var(--color-primary, #c45c26);
    font-weight: 500;
}

.eg-comment-cancel-reply {
    border: 0;
    background: transparent;
    color: var(--color-muted, #78716c);
    cursor: pointer;
    padding: 0 4px;
    font-size: 12px;
}

.eg-comment-cancel-reply:hover {
    color: var(--color-ink, #1c1917);
}

.eg-comment-form.is-reply .eg-comment-submit {
    background: var(--color-primary, #c45c26);
}

.eg-comment-form textarea {
    display: block;
    width: 100%;
    border: 1px solid var(--color-line, #e8e4df);
    padding: 10px 12px;
    margin-bottom: 10px;
    border-radius: var(--radius-md, 8px);
    resize: vertical;
    min-height: 72px;
    background: var(--color-surface, #fff);
    color: var(--color-ink, #1c1917);
    box-sizing: border-box;
}

.eg-comment-form textarea:focus {
    outline: none;
    border-color: var(--color-primary, #c45c26);
}

.eg-comment-form.is-dragover {
    outline: 2px dashed var(--color-primary, #c45c26);
    outline-offset: 4px;
    border-radius: var(--radius-md, 8px);
}

.eg-comment-form.is-dragover textarea {
    border-color: var(--color-primary, #c45c26);
    background: color-mix(in srgb, var(--color-primary, #c45c26) 8%, #fff);
}

.eg-comment-upload-tip {
    font-size: 12px;
    color: var(--color-muted, #78716c);
    align-self: center;
}

.eg-comment-submit {
    border: 0;
    background: var(--color-primary, #c45c26);
    color: #fff;
    padding: 8px 16px;
    border-radius: var(--radius-md, 8px);
    cursor: pointer;
    font-size: 14px;
}

.eg-comment-submit:hover {
    background: var(--color-primary-hover, #a84b1f);
}

.eg-comment-empty,
.eg-comment-login {
    padding: 20px 0;
    color: var(--color-muted, #78716c);
}

.eg-comment-login a {
    color: var(--color-primary, #c45c26);
    text-decoration: none;
}

.eg-comment-login a:hover {
    text-decoration: underline;
}
