/* ==================== */
/* Comments Section - Complete Styling */
/* ==================== */

.comments-section {
    margin: 3rem 0;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.comments-title {
    font-family: var(--font-family-headings);
    color: var(--heading-text);
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

/* Fix for numbered list items */
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 3rem;
    counter-reset: comment-counter;
}

.comment {
    position: relative;
    padding: 2.5rem 0;
    border-bottom: 1px solid var(--border-color);
    counter-increment: comment-counter;
}

/* Remove number from list items */
.comment::before {
    display: none;
}

/* Comment Body */
.comment-body {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.75rem;
    align-items: flex-start;
    padding-left: 1rem; /* Added padding */
}

/* Avatar Styling */
.comment-avatar {
    width: 72px;
    height: 72px;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Comment Content */
.comment-content {
    padding-right: 1rem;
}

.comment-author {
    font-family: var(--font-family-comment-author);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--heading-text);
    margin-bottom: 0.5rem;
}

.comment-metadata {
    font-family: var(--font-family-comment-meta);
    color: var(--light-text);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.comment-text {
    font-family: var(--font-family-comment-text);
    color: var(--content-text);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.comment-actions {
    margin-top: 1rem;
}

.comment-reply-link {
    font-family: var(--font-family-comment-reply-link);
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    background-color: color-mix(in srgb, var(--primary-color) 10%, transparent);
    transition: all 0.2s ease;
}

.comment-reply-link:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Nested Comments */
.children {
    list-style: none;
    padding-left: 4rem;
    margin-top: 2rem;
    position: relative;
}

.children .comment-body {
    padding-left: 0;
}

/* ==================== */
/* Comment Form Styling */
/* ==================== */

.comment-respond {
    margin-top: 3rem;
    padding: 2rem;
    background-color: var(--sidebar-bg);
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.comment-reply-title {
    font-family: var(--font-family-headings);
    color: var(--heading-text);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.comment-form {
    display: grid;
    gap: 1.5rem;
}

.comment-form label {
    font-family: var(--font-family-form-labels);
    color: var(--text-color);
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: var(--font-family-inputs);
    background-color: var(--input-bg);
    color: var(--input-text);
    transition: all 0.2s ease;
}

.comment-form textarea {
    min-height: 150px;
    resize: vertical;
}

.comment-form .form-submit {
    margin: 1rem 0 0;
}

.comment-form .submit {
    background-color: var(--primary-color);
    color: var(--button-text);
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-family-buttons);
    font-weight: 600;
    transition: all 0.2s ease;
}

.comment-form .submit:hover {
    background-color: var(--button-hover);
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .comment-body {
        grid-template-columns: 60px 1fr;
        gap: 1.25rem;
    }
    
    .comment-avatar {
        width: 60px;
        height: 60px;
    }
    
    .children {
        padding-left: 2rem;
    }
}

@media (max-width: 480px) {
    .comment-body {
        grid-template-columns: 1fr;
    }
    
    .comment-avatar {
        margin-bottom: 1rem;
    }
    
    .comment-respond {
        padding: 1.5rem;
    }
}

/* Enhanced Avatar Styling */
.comment .comment-avatar {
    width: 72px;
    height: 72px;
    min-width: 72px; /* Prevent shrinking */
    position: relative;
}

.comment .comment-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: block; /* Remove any default inline spacing */
}

.comment .comment-avatar img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* For the default WordPress structure */
.comment-meta .avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* List Item */
.comments-section .commentlist li{
	list-style-type:none;
	
}

/* Custom Numbered Circles for Comments */
.comment-list {
    counter-reset: comment-counter; /* Initialize counter */
    list-style: none; /* Remove default numbers */
    padding: 0;
    margin: 0 0 3rem;
}

.comment {
    position: relative;
    padding-left: 4rem; /* Make space for number */
    padding-top: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    counter-increment: comment-counter; /* Increment counter */
}

/* Create the custom number element */
.comment::before {
    content: counter(comment-counter); /* Show counter value */
    position: absolute;
    left: 0;
    top: 2rem;
    width: 2.5rem;
    height: 2.5rem;
    background: #ff0000; /* Red background */
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-family-headings);
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* If you want to use your theme's primary color instead of red: */
/* .comment::before {
    background: var(--primary-color);
} */

/* Adjust for nested comments */
.children .comment::before {
    background: #cc0000; /* Slightly darker red for nested */
    font-size: 0.9rem;
    width: 2rem;
    height: 2rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .comment {
        padding-left: 3.5rem;
    }
    .comment::before {
        width: 2.2rem;
        height: 2.2rem;
        font-size: 1rem;
    }
}
