/* =========================================================
   Comments
   ========================================================= */

.comments-area {
    margin-top: 3.5rem;
    margin-bottom: 3rem;
    padding-top: 3rem;
    border-top: 1px solid var(--color-border);
}

.comments-title {
    font-family: var(--font-heading);
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--color-dark);      /* heading on light */
    margin: 0 0 2rem;
}

/* =========================================================
   Comment List
   ========================================================= */

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

.comment-list .children {
    list-style: none;
    padding-left: 2rem;
    margin-top: 1rem;
}

.comment {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--color-border);
}

.comment:last-child { border-bottom: none; }

.comment-body { display: flex; gap: 1rem; }

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

.comment-content-wrap { flex: 1; }

.comment-meta {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.comment-author .fn {
    font-weight: 700;
    font-size: 0.9375rem;
    color: var(--color-dark);      /* name = heading level */
}

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

.comment-metadata a {
    font-size: 0.8rem;
    color: var(--color-muted);     /* date = secondary on light */
    text-decoration: none;
}

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

.comment-content p {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--color-text);      /* body text */
    margin: 0 0 0.75rem;
}

.reply a {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
}

.reply a:hover { text-decoration: underline; }

.no-comments {
    color: var(--color-muted);     /* secondary on light */
    font-style: italic;
    margin-bottom: 2rem;
}

/* =========================================================
   Comment Form
   ========================================================= */

.comment-respond {
    margin-top: 2.5rem;
}

.comment-reply-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-dark);      /* heading on light */
    margin: 0 0 1.5rem;
}

.comment-reply-title small {
    font-size: 0.875rem;
    font-weight: 400;
    margin-left: 0.5rem;
}

.comment-reply-title small a {
    color: var(--color-primary);
    text-decoration: none;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.comment-form-field,
.comment-form-author,
.comment-form-email,
.comment-form-url {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.comment-form label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
}

.comment-form .required {
    color: var(--color-dark);
    margin-left: 2px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--color-border);
    border-radius: 0.375rem;
    font-size: 0.9375rem;
    font-family: inherit;
    color: var(--color-text);
    background: var(--color-white);
    transition: border-color 0.15s;
    outline: none;
    width: 100%;
}

.comment-form input:focus,
.comment-form textarea:focus {
    border-color: var(--color-dark);
}

.comment-form textarea { resize: vertical; min-height: 140px; }

.comment-form-cookies-consent {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--color-muted);     /* secondary on light */
}

.form-submit .submit {
    display: inline-flex;
    align-items: center;
    padding: 0.625rem 1.5rem;
    background: var(--color-dark);
    color: var(--color-white);
    font-weight: 600;
    font-size: 0.9375rem;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: opacity 0.15s;
}

.form-submit .submit:hover { opacity: 0.85; }

/* Logged-in note */
.comment-notes {
    font-size: 0.875rem;
    color: var(--color-muted);     /* secondary on light */
    margin-bottom: 0.5rem;
}

/* Comment form personal fields row */
.comment-form-fields-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 639px) {
    .comment-form-fields-row {
        grid-template-columns: 1fr;
    }
}
