/* Nested Comments Styling */

.nested-comment {
    background-color: #f8f9fa;
    margin-left: 0;
    transition: all 0.3s ease;
}

.nested-comment:hover {
    background-color: #f1f3f4;
}

.nested-comments {
    position: relative;
}

.nested-comments::before {
    content: '';
    position: absolute;
    left: -15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #007bff, #e9ecef);
    opacity: 0.5;
}

/* Threading lines for deeper nesting */
.nested-comment[style*="border-left: 3px solid #007bff"] {
    border-left-color: #007bff !important;
}

/* Reply form styling */
.reply-form {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.reply-form textarea {
    border: 1px solid #ced4da;
    border-radius: 6px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.reply-form textarea:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Comment actions styling */
.comment-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.comment-actions .btn {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
}

/* Reply button with count styling */
.btn-outline-secondary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
}

/* Depth-based indentation colors */
.nested-comments .nested-comment {
    border-left-width: 3px;
    border-left-style: solid;
}

.nested-comments .nested-comment[data-depth="1"] {
    border-left-color: #007bff;
}

.nested-comments .nested-comment[data-depth="2"] {
    border-left-color: #28a745;
}

.nested-comments .nested-comment[data-depth="3"] {
    border-left-color: #ffc107;
}

.nested-comments .nested-comment[data-depth="4"] {
    border-left-color: #dc3545;
}

.nested-comments .nested-comment[data-depth="5"] {
    border-left-color: #6f42c1;
}

/* Badge sizing for nested comments */
.nested-comment .badge {
    font-size: 0.7rem;
}

.nested-comment .ai-scores-group .badge {
    font-size: 0.65rem;
    padding: 0.25em 0.4em;
}

.nested-comment .user-scores-group .badge {
    font-size: 0.65rem;
    padding: 0.25em 0.4em;
}

/* Responsive design */
@media (max-width: 768px) {
    .nested-comments {
        margin-left: 0.5rem;
    }

    .nested-comment {
        margin-left: 0;
        border-left-width: 2px;
    }

    .comment-actions {
        flex-direction: column;
        gap: 4px;
    }

    .comment-actions .btn {
        width: 100%;
        text-align: center;
    }
}

/* Animation for new replies */
@keyframes slideInNested {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.nested-comment.new-reply {
    animation: slideInNested 0.5s ease-out;
}

/* Max depth indicator */
.max-depth-indicator {
    font-style: italic;
    color: #6c757d;
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 4px;
    margin-top: 0.5rem;
}

/* Comment thread line */
.comment-thread-line {
    position: absolute;
    left: -1px;
    top: 0;
    bottom: 0;
    width: 1px;
    background-color: #dee2e6;
    opacity: 0.7;
}
