/* ==================== 评论系统唯一机器 ====================
 * 用法：任何 goods 页面引入此 CSS + comments.js 即可
 * 不要在其他文件重复定义这些样式
 */

.comment-form {
    margin-bottom: 24px;
}

.comment-textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    font-size: 14px;
    resize: vertical;
    font-family: inherit;
    box-sizing: border-box;
}

.comment-textarea:focus {
    border-color: #fb7299;
    outline: none;
}

.comment-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

.comment-quote-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 8px 12px;
    background: #f8f8f8;
    border-radius: 6px;
    font-size: 13px;
    color: #666;
}

.comment-quote-preview .quote-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    font-size: 12px;
}

.comment-quote-preview .quote-tag button {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 14px;
    padding: 0 2px;
    line-height: 1;
}

.comment-quote-preview .quote-tag button:hover {
    color: #fb7299;
}

.comment-quote-preview .clear-quote {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 16px;
    padding: 0 4px;
}

.comment-quote-preview .clear-quote:hover {
    color: #fb7299;
}

.comment-submit {
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    background: linear-gradient(135deg, #fb7299, #ff9a9e);
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.comment-submit:hover {
    opacity: 0.9;
}

.comment-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.comment-list {}

.comment-item {
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-floor {
    font-size: 13px;
    font-weight: 600;
    color: #fb7299;
    margin-right: 8px;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.comment-doer {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: default;
    position: relative;
}

.comment-doer[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 0;
    top: 100%;
    margin-top: 4px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 12px;
    font-weight: 400;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 100;
    pointer-events: none;
}

.comment-flag {
    font-size: 14px;
    display: inline-block;
    width: 1.2em;
}

.comment-time {
    font-size: 12px;
    color: #999;
}

.comment-delete-btn {
    margin-left: auto;
    padding: 4px 8px;
    font-size: 12px;
    color: #999;
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.comment-delete-btn:hover {
    color: #fb7299;
    border-color: #fb7299;
}

.comment-quote-box {
    margin: 8px 0;
    padding: 8px 12px;
    background: #f8f8f8;
    border-left: 3px solid #fb7299;
    border-radius: 0 6px 6px 0;
    font-size: 13px;
    color: #666;
    cursor: pointer;
}

.comment-quote-box:hover {
    background: #f0f0f0;
}

.comment-quote-box.deleted {
    color: #999;
    font-style: italic;
    cursor: default;
}

.comment-content {
    font-size: 14px;
    color: #444;
    line-height: 1.6;
    white-space: pre-line;
}

.comment-deleted {
    color: #999;
    font-style: italic;
}

.comment-action-btn {
    font-size: 12px;
    color: #999;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.comment-action-btn:hover {
    color: #fb7299;
}

.login-hint {
    text-align: center;
    padding: 16px;
    color: #999;
    font-size: 14px;
}

.login-hint a {
    color: #fb7299;
    text-decoration: none;
}

/* 随机评论区 */
.random-comments-section {
    margin-bottom: 24px;
    padding: 16px;
    background: #fffaf0;
    border: 2px dashed #fb7299;
    border-radius: 12px;
}

.random-comments-section .comment-item {
    border-bottom: 1px dashed #ffd6e0;
}

.random-comments-section .comment-item:last-child {
    border-bottom: none;
}

/* 点赞系统已迁移到 like-widget.css，这里只保留布局容器 */
.like-actions {
    display: inline-flex;
    align-items: center;
}

.comment-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

/* Top 100 弹窗已迁移到 like-widget.css */