/* Comments Wrapper */
.comments-wrapper {
    margin-top: 40px;
    padding: 20px 0;
    border-top: 2px solid #f0f0f0;
}

/* Header */
.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.comments-header h3 {
    font-weight: 600;
    color: #1a1a2e;
    margin: 0;
}

.comments-header h3 i {
    color: #6c757d;
    margin-right: 10px;
}

.header-right {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Comment Form */
.comment-form-section {
    margin-bottom: 30px;
}

.comment-textarea {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 12px 15px;
    transition: all 0.3s;
    font-size: 1rem;
    resize: vertical;
    min-height: 80px;
}

.comment-textarea:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

.reply-indicator {
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 8px;
    border-left: 3px solid #0d6efd;
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.reply-indicator .btn-link {
    padding: 0;
    font-size: 0.9rem;
}

.login-prompt {
    background: #f8f9fa;
    border-radius: 12px;
}

.guest-comment-form {
    max-width: 600px;
    margin: 0 auto;
}

/* Comments List */
.comments-list {
    margin-top: 20px;
}

.comment-item {
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
    animation: fadeIn 0.3s ease-out;
}

.comment-item:hover {
    background-color: #fafafa;
}

.comment-item.comment-reply {
    margin-left: 60px;
    border-bottom: none;
    padding: 15px 0;
}

.comment-avatar {
    border: 2px solid #f0f0f0;
    object-fit: cover;
}

.comment-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 5px;
}

.comment-author {
    font-weight: 600;
    color: #1a1a2e;
}

.comment-badge {
    display: flex;
    gap: 5px;
}

.comment-badge .badge {
    font-size: 0.7rem;
    padding: 3px 8px;
}

.comment-date {
    font-size: 0.85rem;
    color: #999;
}

.comment-body {
    color: #333;
    line-height: 1.7;
    word-wrap: break-word;
    margin: 8px 0 12px 0;
}

.comment-body .edit-textarea {
    width: 100%;
    border: 2px solid #0d6efd;
    border-radius: 8px;
    padding: 10px;
    font-size: 1rem;
}

.comment-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.comment-actions .btn-link {
    text-decoration: none;
    padding: 4px 8px;
    color: #6c757d;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.comment-actions .btn-link:hover {
    color: #0d6efd;
}

.comment-actions .like-btn i {
    margin-right: 4px;
    transition: color 0.2s;
}

.comment-actions .like-btn i.text-danger {
    color: #dc3545 !important;
}

.comment-actions .delete-btn:hover {
    color: #dc3545 !important;
}

/* Replies Container */
.replies-container {
    border-left: 2px solid #f0f0f0;
    padding-left: 15px;
    margin-top: 10px;
}

/* Empty State */
.empty-state {
    padding: 40px 20px;
}

.empty-state i {
    color: #d0d0d0;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .comments-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .header-right {
        justify-content: space-between;
    }
    
    .comment-item.comment-reply {
        margin-left: 30px;
    }
    
    .comment-actions .btn-link {
        font-size: 0.8rem;
        padding: 2px 6px;
    }
}

/* Loading Spinner */
.spinner-border {
    width: 2rem;
    height: 2rem;
}

/* Toast Messages */
.alert {
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    animation: fadeIn 0.3s ease-out;
}

/* Subscribed Button */
.subscribe-btn.active {
    background: #0d6efd;
    color: white;
}

.subscribe-btn.active:hover {
    background: #0b5ed7;
    color: white;
}