/**
 * bbPress dark-mode overrides.
 *
 * Repaints bbPress using the site's CSS variables. Covers the forum index,
 * topic list, single topic, reply form, and user profile surfaces. ~60 lines.
 */

/* Forum index + single-forum topic list */
#bbpress-forums,
#bbpress-forums .bbp-forums-list,
#bbpress-forums .bbp-topics-front,
#bbpress-forums .bbp-topics,
#bbpress-forums .bbp-replies {
    background: var(--bz-bg) !important;
    color: var(--bz-text) !important;
    border: 0 !important;
}

#bbpress-forums li.bbp-header,
#bbpress-forums li.bbp-body > ul.forum,
#bbpress-forums li.bbp-body > ul.topic {
    background: var(--bz-surface) !important;
    border: 1px solid var(--bz-border) !important;
    border-radius: var(--bz-radius) !important;
    color: var(--bz-text) !important;
}

#bbpress-forums li.bbp-header {
    color: var(--bz-text-muted) !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.8rem;
}

#bbpress-forums .bbp-body ul {
    border-bottom: 1px solid var(--bz-border) !important;
}

#bbpress-forums a { color: var(--bz-accent) !important; }
#bbpress-forums a:hover { color: var(--bz-accent-hover) !important; }

/* Single topic — reply cards */
#bbpress-forums div.reply,
#bbpress-forums div.topic {
    background: var(--bz-surface) !important;
    border: 1px solid var(--bz-border) !important;
    border-radius: var(--bz-radius) !important;
    color: var(--bz-text) !important;
    padding: var(--bz-gap-md) !important;
    margin-bottom: var(--bz-gap-md) !important;
}

#bbpress-forums .bbp-reply-author,
#bbpress-forums .bbp-topic-author {
    background: transparent !important;
    color: var(--bz-text-muted) !important;
    border-right: 1px solid var(--bz-border) !important;
}

#bbpress-forums .bbp-reply-content,
#bbpress-forums .bbp-topic-content {
    color: var(--bz-text) !important;
}

#bbpress-forums .bbp-reply-content pre,
#bbpress-forums .bbp-topic-content pre,
#bbpress-forums code {
    background: var(--bz-surface-2) !important;
    border: 1px solid var(--bz-border) !important;
    color: var(--bz-text) !important;
}

/* Reply form */
#bbpress-forums .bbp-reply-form fieldset,
#bbpress-forums .bbp-topic-form fieldset {
    background: var(--bz-surface) !important;
    border: 1px solid var(--bz-border) !important;
    border-radius: var(--bz-radius) !important;
}
#bbpress-forums input[type="text"],
#bbpress-forums input[type="email"],
#bbpress-forums input[type="password"],
#bbpress-forums textarea,
#bbpress-forums select {
    background: var(--bz-bg) !important;
    color: var(--bz-text) !important;
    border: 1px solid var(--bz-border) !important;
}

#bbpress-forums button,
#bbpress-forums button[type="submit"],
#bbpress-forums .button {
    background: var(--bz-accent) !important;
    color: var(--bz-bg) !important;
    border: 0 !important;
    border-radius: var(--bz-radius) !important;
    padding: 10px 20px !important;
}
#bbpress-forums button:hover { background: var(--bz-accent-hover) !important; }

/* Pagination */
.bbp-pagination-links a,
.bbp-pagination-links span.current {
    background: var(--bz-surface) !important;
    color: var(--bz-text) !important;
    border: 1px solid var(--bz-border) !important;
    border-radius: var(--bz-radius) !important;
    padding: 4px 10px !important;
    margin-right: 4px;
}
.bbp-pagination-links span.current {
    background: var(--bz-accent) !important;
    color: var(--bz-bg) !important;
    border-color: var(--bz-accent) !important;
}

/* User profile surfaces */
#bbp-your-profile .bbp-profile,
#bbp-user-profile,
#bbp-author-topics-started,
#bbp-author-replies-created {
    background: var(--bz-surface) !important;
    border: 1px solid var(--bz-border) !important;
    border-radius: var(--bz-radius) !important;
    color: var(--bz-text) !important;
}

/* Role badges */
.bbp-author-role {
    color: var(--bz-text-muted) !important;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
