/* ==========================================================================
   Comments - Minimal Template
   ========================================================================== */

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

.comments-area {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
}

.comments-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-color);
}

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

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

.comment-list > li:last-child {
    margin-bottom: 0;
}

/* Threads — clearer reply visual */
.comment-list .children {
    list-style: none;
    margin: 10px 0 0 0;
    padding-left: 18px;
    border-left: 2px solid var(--primary-color);
}

.comment-list .children > li {
    margin-bottom: 8px;
}

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

/* Slightly differentiate replies from top-level comments */
.comment-list .children > li > .comment-body {
    background-color: var(--outer-bg);
}

@media screen and (max-width: 600px) {
    .comment-list .children {
        padding-left: 12px;
    }
}

/* Comment Body — compact card */
.comment-body {
    margin: 0;
    width: auto;
    max-width: 100%;
    padding: 12px 14px;
    background-color: var(--content-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: border-color 0.15s ease;
}

.comment-body:hover {
    border-color: var(--text-color-light);
}

/* Comment Meta — single compact row, properly aligned */
.comment-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    padding-bottom: 0;
    border-bottom: none;
}

.comment-author-avatar {
    display: flex;
    align-items: center;
}

.comment-author-avatar img {
    border-radius: 50%;
    width: 28px;
    height: 28px;
    object-fit: cover;
    flex-shrink: 0;
    display: block;
}

.comment-author-info {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    line-height: 1.2;
    min-width: 0;
}

.comment-author {
    line-height: 1.2;
}

.comment-author .fn {
    font-style: normal;
    font-weight: 600;
    color: var(--text-color);
    font-size: 13px;
    line-height: 1.2;
}

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

.comment-metadata {
    font-size: 12px;
    line-height: 1.2;
    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: 4px;
    opacity: 0.6;
}

/* Comment Content — aligned under name when avatar shown */
.comment-content {
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-color);
    margin-bottom: 8px;
    padding-left: 38px;
}

.comment-content p {
    margin: 0 0 6px 0;
}

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

/* Approval Message */
.comment-awaiting-moderation {
    font-size: 12px;
    color: #b78a00;
    margin-bottom: 6px;
    padding-left: 38px;
}

.dark-mode .comment-awaiting-moderation {
    color: #ffd54f;
}

/* Reply Button — pill style, scaled down */
.reply {
    text-align: left;
    padding-left: 38px;
    margin-top: 6px;
}

.comment-reply-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-color);
    background-color: transparent;
    border: 1px solid var(--primary-color);
    border-radius: 50px;
    text-decoration: none;
    line-height: 1.4;
    transition: all 0.2s ease;
}

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

/* No-avatar variant: remove left indents */
.no-avatar .comment-content,
.no-avatar .comment-awaiting-moderation,
.no-avatar .reply {
    padding-left: 0;
}

/* Comment Form */
.comment-respond {
    margin-top: 32px;
    background: none;
    padding: 24px 0 0 0;
    border-radius: 0;
    border: none;
    border-top: 1px solid var(--border-color);
}

.comments-area.form-position-above {
    display: flex;
    flex-direction: column;
}

.comments-area.form-position-above > .comment-respond {
    order: -1;
    margin-top: 0;
    margin-bottom: 32px;
    padding-top: 0;
    border-top: none;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

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

.comment-reply-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-color);
    display: block;
}

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

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

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

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

.comment-form-author,
.comment-form-email,
.comment-form-url,
.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: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--content-bg);
    color: var(--text-color);
    font-size: 14px;
    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 2px rgba(var(--primary-rgb), 0.08);
}

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

.submit {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 9px 22px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.submit:hover {
    background-color: var(--secondary-color);
}

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

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

.comments-pagination a {
    padding: 5px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.15s ease;
}

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