/* =============================================================
   Comments — flat design, matches main.css design tokens
   ============================================================= */

/* ── Wrapper ────────────────────────────────────────────────── */
.comments-area {
    margin-top: 2rem;
}

/* ── Section heading ─────────────────────────────────────────── */
.comments-title {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--ink, #243240);
    border-bottom: 2px solid var(--brand, #1565c0);
    padding-bottom: .5rem;
    margin-bottom: 1.25rem;
}

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

.comment-item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border, #e0e6ed);
}

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

/* Threaded replies: indent with left accent bar */
.comment-item .children {
    list-style: none;
    margin: 0;
    padding: 0 0 0 1.25rem;
    border-left: 3px solid var(--border, #e0e6ed);
}

.comment-item .children .comment-item {
    padding: .75rem 0;
}

/* ── Comment body layout ─────────────────────────────────────── */
.comment-body {
    display: flex;
    gap: .875rem;
    align-items: flex-start;
}

/* ── Avatar ──────────────────────────────────────────────────── */
.comment-avatar {
    flex: 0 0 48px;
    width: 48px;
}

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

/* ── Content wrap ────────────────────────────────────────────── */
.comment-content-wrap {
    flex: 1 1 auto;
    min-width: 0;
}

/* ── Comment header: author + date ──────────────────────────── */
.comment-header {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: .25rem .75rem;
    margin-bottom: .375rem;
}

.comment-author-name,
.comment-author-name a {
    font-weight: 600;
    font-size: .9rem;
    color: var(--ink, #243240);
    text-decoration: none;
}

.comment-author-name a:hover {
    color: var(--brand, #1565c0);
}

.comment-date {
    font-size: .78rem;
    color: var(--muted, #667085);
    text-decoration: none;
}

.comment-date:hover {
    color: var(--brand, #1565c0);
}

/* ── Moderation notice ───────────────────────────────────────── */
.comment-awaiting-moderation {
    font-size: .8rem;
    color: var(--muted, #667085);
    font-style: italic;
    margin: 0 0 .375rem;
}

/* ── Comment text ────────────────────────────────────────────── */
.comment-text {
    font-size: .9rem;
    line-height: 1.6;
    color: var(--ink, #243240);
}

.comment-text p {
    margin: 0 0 .5rem;
}

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

/* ── Footer: reply + edit links ──────────────────────────────── */
.comment-footer {
    margin-top: .5rem;
    display: flex;
    gap: .75rem;
    align-items: center;
}

.comment-footer .comment-reply-link,
.comment-footer .comment-edit-link a {
    font-size: .78rem;
    font-weight: 600;
    color: var(--brand, #1565c0);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.comment-footer .comment-reply-link:hover,
.comment-footer .comment-edit-link a:hover {
    color: var(--brand-strong, #0f4c92);
}

.comment-footer .comment-edit-link {
    opacity: .65;
}

/* ── "Comments closed" message ───────────────────────────────── */
.comments-closed {
    font-size: .85rem;
    color: var(--muted, #667085);
    padding: .75rem 0;
    border-top: 1px solid var(--border, #e0e6ed);
    margin-top: 1rem;
}

/* ── Comment form ────────────────────────────────────────────── */
#respond {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--border, #e0e6ed);
}

#reply-title {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--ink, #243240);
    margin-bottom: 1.25rem;
}

#reply-title .small {
    font-size: .8rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    margin-left: .5rem;
}

#reply-title .small a {
    color: var(--muted, #667085);
    text-decoration: none;
}

#reply-title .small a:hover {
    color: var(--brand, #1565c0);
}

/* ── Form fields ─────────────────────────────────────────────── */
.comment-form p {
    margin-bottom: 1rem;
}

.comment-form-author input,
.comment-form-email input,
.comment-form-url input,
.comment-form-comment textarea {
    display: block;
    width: 100%;
    padding: .625rem .75rem;
    font-size: .9rem;
    font-family: inherit;
    color: var(--ink, #243240);
    background: var(--surface, #f2f2f2);
    border: 1px solid transparent;
    border-bottom: 2px solid var(--border, #e0e6ed);
    outline: none;
    transition: border-color .15s, background .15s;
    box-sizing: border-box;
}

.comment-form-author input:focus,
.comment-form-email input:focus,
.comment-form-url input:focus,
.comment-form-comment textarea:focus {
    background: #fff;
    border-bottom-color: var(--brand, #1565c0);
}

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

/* ── Submit button ───────────────────────────────────────────── */
.comment-submit-btn {
    background-color: var(--brand, #1565c0) !important;
    color: #fff !important;
    font-weight: 600;
    letter-spacing: .04em;
    border: none;
    cursor: pointer;
    padding: 0 1.5rem;
    height: 36px;
    line-height: 36px;
    font-size: .875rem;
    text-transform: uppercase;
    transition: background-color .15s;
}

.comment-submit-btn:hover,
.comment-submit-btn:focus {
    background-color: var(--brand-strong, #0f4c92) !important;
}

/* ── Comment navigation ──────────────────────────────────────── */
.comment-navigation {
    display: flex;
    justify-content: space-between;
    padding: .75rem 0;
    font-size: .85rem;
}

.comment-navigation a {
    color: var(--brand, #1565c0);
    text-decoration: none;
}

.comment-navigation a:hover {
    color: var(--brand-strong, #0f4c92);
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 600px) {
    .comment-avatar {
        flex: 0 0 36px;
        width: 36px;
    }

    .comment-avatar img {
        width: 36px;
        height: 36px;
    }

    .comment-body {
        gap: .625rem;
    }

    .comment-item .children {
        padding-left: .75rem;
    }
}
