/* ==========================================
   COMMENT SYSTEM STYLES
   ========================================== */

/* Comment Section Container */
.comment-section {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    margin-top: 40px;
}

.comment-section h3 {
    font-size: 1.8rem;
    color: #0284c7;
    margin-bottom: 10px;
}

.comment-counter {
    color: #64748b;
    font-size: 0.95rem;
    margin-bottom: 30px;
    font-weight: 600;
}

/* Comment Form */
.comment-form {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #e2e8f0;
}

.comment-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e0f2fe;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0284c7;
    font-size: 24px;
    flex-shrink: 0;
}

.comment-input-wrapper {
    flex: 1;
}

.comment-editor {
    min-height: 100px;
    padding: 15px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.6;
    outline: none;
    transition: border-color 0.3s;
}

.comment-editor:focus {
    border-color: #0284c7;
}

.comment-editor:empty:before {
    content: 'Tham gia thảo luận...';
    color: #94a3b8;
}

/* Toolbar */
.comment-toolbar {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.toolbar-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #cbd5e1;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    font-size: 14px;
    color: #475569;
}

.toolbar-btn:hover {
    background: #f1f5f9;
    border-color: #0284c7;
    color: #0284c7;
}

/* User Info Fields */
.comment-user-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

@media (max-width: 600px) {
    .comment-user-info {
        grid-template-columns: 1fr;
    }
}

.comment-user-info input {
    padding: 10px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s;
}

.comment-user-info input:focus {
    border-color: #0284c7;
}

/* Submit Button */
.btn-submit-comment {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-submit-comment:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Comments List */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comment-item {
    display: flex;
    gap: 15px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-item.reply {
    margin-left: 65px;
    padding-top: 15px;
}

.comment-content-wrapper {
    flex: 1;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.comment-author {
    color: #0284c7;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
}

.comment-author:hover {
    text-decoration: underline;
}

.comment-timestamp {
    color: #94a3b8;
    font-size: 0.85rem;
}

.comment-text {
    color: #475569;
    line-height: 1.6;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

/* Comment Actions */
.comment-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.comment-action-btn {
    background: none;
    border: none;
    color: #64748b;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 6px;
    transition: all 0.3s;
}

.comment-action-btn:hover {
    background: #f1f5f9;
    color: #0284c7;
}

.comment-action-btn.liked {
    color: #0284c7;
    font-weight: 600;
}

.comment-action-btn.disliked {
    color: #ef4444;
    font-weight: 600;
}

.comment-count {
    font-weight: 600;
}

/* Reply Form */
.reply-form {
    margin-top: 15px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.reply-editor {
    min-height: 80px;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    margin-bottom: 10px;
    background: white;
    font-size: 0.9rem;
    outline: none;
}

.reply-editor:focus {
    border-color: #0284c7;
}

.reply-editor:empty:before {
    content: 'Nhập câu trả lời...';
    color: #94a3b8;
}

.reply-actions {
    display: flex;
    gap: 10px;
}

.btn-cancel-reply {
    background: #94a3b8;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
}

.btn-submit-reply {
    background: #0284c7;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
}

.btn-submit-reply:hover {
    background: #0369a1;
}

/* Empty State */
.comments-empty {
    text-align: center;
    padding: 40px;
    color: #94a3b8;
}

.comments-empty i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}
