.comments-section {
    margin-top: 64px;
    padding-top: 32px;
    border-top: 1px solid #f2f2f2;
}

.comments-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
    color: #242424;
}

.comment-form {
    /* background: #f8f9fa; */
    background-color: #e9ecef;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 32px;
}

.comment-form textarea {
    width: 100%;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 12px;
    font-size: 16px;
    resize: vertical;
    min-height: 80px;
    margin-bottom: 16px;
}

.comment-form button {
    background: #1a8917;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.comment-form button:hover {
    background: #156d13;
}

#comments-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    margin-bottom: 16px;
}

.comment-item {
    display: flex;
    margin-bottom: 52px;
    padding-bottom: 32px;
    /* border: 3px solid blue; */
    border-bottom: 1px solid #f2f2f2;
    position: relative;
}

.comment-item:last-child {
    border-bottom: none;
    /* margin-bottom: 2rem; */
}

/* Top-level comments styling */
.comment-item.depth-0 {
    padding-bottom: 16px;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 24px;
}

.comment-item.depth-0:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-right: 16px;
    flex-shrink: 0;
}

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

.comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.comment-author {
    font-size: 14px;
    font-weight: 500;
    color: #242424;
    margin-right: 8px;
}

.comment-time {
    font-size: 12px;
    color: #6b6b6b;
}

.comment-text {
    font-size: 16px;
    color: #242424;
    margin-bottom: 12px;
}

.comment-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.comment-action {
    background: none;
    border: none;
    color: #6b6b6b;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.comment-action:hover {
    color: #242424;
}


/* Nested replies styling */
.replies {
    margin-top: 16px;
    position: relative;
}


/* Vertical line for nested comments */
.replies::before {
    content: '';
    position: absolute;
    left: 18px;
    top: 0;
    bottom: 16px;
    width: 2px;
    background-color: #e5e7eb;
}

/* Hide the line for the last reply */
.replies .comment-item:last-child::after {
    content: '';
    position: absolute;
    left: 18px;
    bottom: 0;
    width: 2px;
    height: 16px;
    background-color: white;
}

/* Nested comment indentation */
.replies .comment-item {
    margin-left: 36px;
    margin-bottom: 16px;
}

.replies .comment-item:last-child {
    margin-bottom: 0;
}

/* Recursive nesting - deeper levels */
.replies .replies {
    margin-left: 0;
}

.replies .replies::before {
    left: 18px;
}

.replies .replies .comment-item:last-child::after {
    left: 18px;
}

/* All nested comments (any depth > 0) should not have bottom border */
.replies .comment-item {
    border-bottom: none;
    padding-bottom: 0;
}

/* Smaller avatars for nested comments */
.replies .comment-avatar {
    width: 32px;
    height: 32px;
}

.replies .replies .comment-avatar {
    width: 28px;
    height: 28px;
}

/* aDDED LATER */

.comment-form-reply {
    margin-top: 16px;
    padding: 16px;
    background-color: #e9ecef;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.reply-form {
    margin-top: 12px;
    margin-bottom: 16px;
}

.comment-form-reply textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 12px;
    box-sizing: border-box;
    background: white;
    transition: border-color 0.2s ease;
}

.comment-form-reply textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.comment-form-reply textarea::placeholder {
    color: #9ca3af;
}

.comment-form-reply button {
    background-color: #3b82f6;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.comment-form-reply button:hover {
    background-color: #2563eb;
}

.comment-form-reply button:active {
    background-color: #1d4ed8;
}

.form-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.form-header .comment-avatar {
    margin-right: 12px;
}

.form-header .user-name {
    font-weight: 500;
    color: #1a1a1a;
    font-size: 15px;
}

/* Form actions */
.form-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.form-actions button.cancel-btn {
    background-color: transparent;
    color: #6b7280;
    border: 1px solid #1a8917;
    border-radius: 20px;
}

.form-actions button.reply-comment-btn {
    border: none;
    background: #1a8917;
    border-radius: 20px;
    /* border: 1px solid #1a8917; */
}

.form-actions button.reply-comment-btn:hover {
    background: #156d13;
}


.form-actions button.cancel-btn:hover {
    background-color: #f3f4f6;
    border: none;
    border: 1px solid #1a8917;
    color: #374151;
}
