/* ==========================================================================
   Comments System - Premium Styling
   ========================================================================== */


comments-area * {
font-family: inherit;
}

.comments-area {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 2px solid var(--border-color);
}

.comments-title {
    margin-bottom: 30px;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment {
    margin-bottom: 30px;
    padding: 20px;
    background-color: var(--outer-bg);
    border-radius: 6px;
}

.comment-author {
    font-weight: 600;
    margin-bottom: 5px;
}

.comment-metadata {
    font-size: 14px;
    color: var(--text-color-light);
    margin-bottom: 15px;
}

.comment-content {
    margin-bottom: 15px;
}

.reply {
    text-align: right;
}

.comment-reply-link {
    font-size: 14px;
    color: var(--primary-color);
}



/* Container */
.comments-area {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

.comments-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--text-color);
}

/* Comment List */
.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comment-list li {
    margin-bottom: 24px;
}

.comment-list .children li {
    margin-bottom: 0;
}

.comment-list .children {
    list-style: none;
    margin: 24px 0 0 0;
    padding-left: 20px; /* Hierarchy indentation */
    border-left: 2px solid var(--border-color); /* Visual hierarchy guide */
}

/* Responsive adjustment for deep nesting */
@media screen and (max-width: 600px) {
    .comment-list .children {
        padding-left: 15px;
    }
}

/* Comment Body (Card Style) */
.comment-body {
    /* Reset inherited styles from main.css article */
    margin: 0;
    width: auto;
    max-width: 100%;
    
    background-color: var(--content-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.comment-body:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.dark-mode .comment-body:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Comment Meta (Header) */
.comment-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.comment-author-avatar img {
    border-radius: 50%;
    width: 48px;
    height: 48px;
    object-fit: cover;
}

.comment-author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.comment-author .fn {
    font-style: normal;
    font-weight: 700;
    color: var(--text-color);
    font-size: 16px;
}

.comment-author a {
    color: inherit;
    text-decoration: none;
}

.comment-metadata {
    font-size: 13px;
    color: var(--text-color-light);
}

.comment-metadata a {
    color: inherit;
    text-decoration: none;
}

.comment-metadata a:hover {
    color: var(--primary-color);
}

.comment-metadata .edit-link {
    margin-left: 5px;
    opacity: 0.7;
}

/* Comment Content */
.comment-content {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-color);
    margin-bottom: 20px;
}

.comment-content p:last-child {
    margin-bottom: 0;
}

/* Approval Message */
.comment-awaiting-moderation {
    background-color: rgba(255, 193, 7, 0.1); /* Subtle yellow background */
    color: #b78a00; /* Darker yellow text */
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 14px;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.dark-mode .comment-awaiting-moderation {
    background-color: rgba(255, 193, 7, 0.05);
    color: #ffd54f;
    border-color: rgba(255, 193, 7, 0.15);
}

/* Reply Button */
.reply {
    text-align: right;
}

.comment-reply-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-color);
    background-color: transparent;
    border: 1px solid var(--primary-color);
    border-radius: 50px; /* Pill shape */
    text-decoration: none;
    transition: all 0.2s ease;
}

.comment-reply-link:hover {
    background-color: var(--primary-color);
    color: #fff;
    transform: translateY(-1px);
}

/* Comment Form */
.comment-respond {
    margin-top: 50px;
    background-color: var(--outer-bg); /* Slightly different bg to separate form */
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.comment-respond * {
    font-family: inherit;
}

.comment-reply-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text-color);
    display: block;
}

.comment-reply-title small a {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-color-light);
    margin-left: 10px;
    text-decoration: underline;
}

.comment-notes,
.logged-in-as {
    font-size: 14px;
    color: var(--text-color-light);
    margin-bottom: 20px;
}

.comment-form {
    display: grid;
    gap: 20px;
}

.comment-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-color);
}

.comment-form-author,
.comment-form-email,
.comment-form-url {
    width: 100%;
}

.comment-form-comment {
    width: 100%;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--content-bg);
    color: var(--text-color);
    font-size: 15px;
    transition: border-color 0.2s ease;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.form-submit {
    margin-top: 10px;
}

.submit {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.submit:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

/* Comment Navigation */
.comments-pagination {
    margin: 40px 0;
    display: flex;
    justify-content: space-between;
}

.comments-pagination .nav-links {
    display: flex;
    gap: 10px;
}

.comments-pagination a {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.comments-pagination a:hover {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}
