/*--------------------------------------------------------------
>>> TABLE OF CONTENTS:
----------------------------------------------------------------
# Global bbPress CSS
# Activity Page
# Widgets
--------------------------------------------------------------*/


/*--------------------------------------------------------------
# Global bbPress CSS
--------------------------------------------------------------*/

#bbpress-forums {
    font-size: inherit;
}

.page-header .archive-description {
    display: none;
}

.bbpress .entry-content {
    margin-top: 1em;
}

.forum-archive .bbp-breadcrumb {
    display: none;
}

#bbpress-forums ul.bbp-forums,
#bbpress-forums ul.bbp-lead-topic,
#bbpress-forums ul.bbp-replies,
#bbpress-forums ul.bbp-search-results,
#bbpress-forums ul.bbp-topics {
    font-size: 14px;
    margin-bottom: 0;
}

#bbpress-forums fieldset.bbp-form {
    min-width: calc(100% - 2px);
}

#bbpress-forums fieldset.bbp-form input[type="text"],
#bbpress-forums fieldset.bbp-form select {
    min-width: 100px;
    min-height: 35px;
}

#bbpress-forums fieldset.bbp-form input[type="text"] {
    width: 100%;
}

#bbpress-forums .widget_display_replies img.avatar,
#bbpress-forums .widget_display_topics img.avatar,
#bbpress-forums div.bbp-template-notice img.avatar,
#bbpress-forums p.bbp-topic-meta img.avatar,
#bbpress-forums ul.bbp-reply-revision-log img.avatar,
#bbpress-forums ul.bbp-topic-revision-log img.avatar {
    border: 0;
    border-radius: 50%;
}

.bbp-pagination-count {
    margin: 15px 0;
}

#bbpress-forums div.bbp-search-form {
    float: right;
    margin-bottom: 15px;
}

.bbp-search-form #bbp_search_submit {
    vertical-align: top;
}

#bbpress-forums li.bbp-header ul {
    font-size: 14px;
}

#bbpress-forums li.bbp-header,
#bbpress-forums fieldset.bbp-form {
    background-color: var(--bx-color-bg-muted);
}

#bbpress-forums div.odd,
#bbpress-forums ul.odd,
#bbpress-forums div.bbp-forum-header,
#bbpress-forums div.bbp-topic-header,
#bbpress-forums div.bbp-reply-header,
.widgetable .bbp-login-form,
.widgetable .bbp-logged-in,
#bbpress-forums li.bbp-header,
#bbpress-forums fieldset.bbp-form {
    background-color: var(--bx-color-bg-muted);
}

div.bbp-forum-header,
div.bbp-topic-header,
div.bbp-reply-header,
li.bbp-body div.hentry {
    padding: 10px 35px;
}

a#bbp-cancel-reply-to-link {
    margin-right: 15px;
}

#bbpress-forums li.bbp-body ul.forum,
#bbpress-forums li.bbp-body ul.topic {
    line-height: 1;
}

.mc4wp-form input,
a.bbp-forum-title,
a.bbp-topic-permalink {
    line-height: 30px;
    font-weight: 600;
    font-style: normal;
    font-size: 20px;
}

#bbpress-forums .bbp-forum-info div.bbp-forum-content {
    line-height: 25px;
    font-weight: 500;
    font-style: normal;
    font-size: 14px;
}

#bbpress-forums .bbp-forum-info .bbp-forum-content,
#bbpress-forums p.bbp-topic-meta {
    margin: 15px 0;
}

#bbpress-forums li.bbp-footer {
    display: none;
}

#bbpress-forums div.bbp-forum-author img.avatar,
#bbpress-forums div.bbp-reply-author img.avatar,
#bbpress-forums div.bbp-topic-author img.avatar {
    border-radius: 50%;
}


/* Search Form */

#bbpress-forums #bbp-search-form>div {
    display: flex;
    gap: 10px;
}

@media only screen and (max-width: 767px) {

    ul li.bbp-forum-info,
    ul li.bbp-topic-title {
        width: 75%
    }

    .bbp-header ul li.bbp-forum-freshness,
    .bbp-body ul li.bbp-forum-freshness,
    .bbp-header ul li.bbp-topic-freshness,
    .bbp-body ul li.bbp-topic-freshness,
    .bbp-header ul li.bbp-forum-reply-count,
    .bbp-body ul li.bbp-forum-reply-count,
    .bbp-header ul li.bbp-topic-voice-count,
    .bbp-body ul li.bbp-topic-voice-count {
        display: none
    }

    .bbp-header ul li.bbp-topic-reply-count,
    .bbp-body ul li.bbp-topic-reply-count,
    .bbp-header ul li.bbp-forum-topic-count,
    .bbp-body ul li.bbp-forum-topic-count {
        border: none
    }

    .bbp-header ul li.bbp-forum-topic-count,
    .bbp-body ul li.bbp-forum-topic-count,
    .bbp-header ul li.bbp-topic-reply-count,
    .bbp-body ul li.bbp-topic-reply-count {
        width: 25%
    }

    #bbpress-forums div.bbp-search-form {
        float: none;
    }

    #bbpress-forums #bbp-search-form #bbp_search {
        width: 100%;
    }

    #bbpress-forums div.bbp-search-form input,
    #bbpress-forums div.bbp-search-form button {
        font-size: inherit;
        padding: 10px 20px;
    }
}

@media only screen and (max-width: 320px) {

    #bbpress-forums li.bbp-header li.bbp-forum-info,
    #bbpress-forums li.bbp-header li.bbp-topic-title {
        text-align: left;
    }

    #bbpress-forums li.bbp-header li.bbp-forum-info,
    #bbpress-forums li.bbp-body li.bbp-forum-info,
    #bbpress-forums li.bbp-header li.bbp-topic-title,
    #bbpress-forums li.bbp-body li.bbp-topic-title {
        width: 75%;
    }
}

.bbp-reply-form {
    background: var(--color-theme-white-box);
    border: 1px solid var(--global-border-color);
    padding: 15px;
    border-radius: var(--global-border-radius);
}

body .select2-container .select2-dropdown.bb-tag-list-dropdown.bb-tag-list-dropdown {
    top: 34px;
}

#bbp_topic_tags_dropdown+.select2-container input {
    padding: 0 10px;
}

#bbpress-forums fieldset.bbp-form input[type="password"],
#bbpress-forums fieldset.bbp-form input[type="text"], 
#bbpress-forums fieldset.bbp-form select {
    width: 100%;
    padding: 10px;
    min-height: 38px;
}

/* Phone tap targets (40px floor): form fields, submit buttons and page numbers.
 * After the base field rule above so the phone size wins. */
@media only screen and (max-width: 767px) {
    #bbpress-forums fieldset.bbp-form input[type="password"],
    #bbpress-forums fieldset.bbp-form input[type="text"],
    #bbpress-forums fieldset.bbp-form select,
    #bbpress-forums button.button {
        min-height: 40px;
    }

    #bbpress-forums .bbp-pagination-links a,
    #bbpress-forums .bbp-pagination-links span {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 40px;
        min-height: 40px;
    }
}

/*--------------------------------------------------------------
# Activity Page
--------------------------------------------------------------*/

.activity-list li.bbp_reply_create .activity-content .activity-inner,
.activity-list li.bbp_topic_create .activity-content .activity-inner {
    margin: 0;
    padding: 0;
    border: 0;
}

/*--------------------------------------------------------------
# Widgets
--------------------------------------------------------------*/

.widget.widget_display_replies li+li,
.widget.widget_display_views li+li,
.widget.widget_display_forums li+li,
.widget.widget_display_topics li+li {
    border-top: 1px solid var(--bx-color-border);
}

.widget.widget_display_replies li,
.widget.widget_display_views li,
.widget.widget_display_forums li,
.widget.widget_display_topics li {
    padding: 10px 0;
}

.widget.widget_display_stats dl {
    text-align: center;
}

.widget .mc4wp-form input,
.widget a.bbp-forum-title,
.widget a.bbp-topic-permalink {
    line-height: inherit;
    font-weight: inherit;
    font-style: normal;
    font-size: inherit;
}

.widget #bbp_search {
    width: 100%;
    margin-bottom: 10px;
}
/* bbPress paints permalinks, admin links and the author IP in fixed greys, unreadable on dark reply headers. */
.bbp-forum-header a.bbp-forum-permalink,
.bbp-reply-header a.bbp-reply-permalink,
.bbp-topic-header a.bbp-topic-permalink,
span.bbp-admin-links,
span.bbp-admin-links a,
#bbpress-forums .bbp-author-ip {
    color: var(--bx-color-fg-muted);
}

span.bbp-admin-links a:hover,
span.bbp-admin-links a:focus {
    color: var(--bx-color-accent);
}

/* bbPress gives post code a fixed #f9f9f9 box with a #ddd border through an ID
 * selector, so it stayed a white chip with invisible text in dark mode. Same
 * selector, theme surfaces: it follows light and dark mode. */
#bbpress-forums div.bbp-reply-content code,
#bbpress-forums div.bbp-reply-content pre,
#bbpress-forums div.bbp-topic-content code,
#bbpress-forums div.bbp-topic-content pre {
    background-color: var(--bx-color-bg-muted);
    border-color: var(--bx-color-border);
}

/* QA round 3: a select inside a 38px field with 10px padding left a 16px box for a 24px
   line, so "Normal", "Open" and the forum name were cut in half. */
#bbpress-forums fieldset.bbp-form select {
    padding-block: 6px;
}

/* The editor's link dialog is WordPress's own light panel; theme text on it and the dark
   fields made the labels unreadable in dark mode. It follows the theme surfaces. */
html #wp-link-wrap,
html #wp-link-wrap #link-modal-title,
html #wp-link-wrap #link-selector,
html #wp-link-wrap .query-results li {
    background-color: var(--bx-color-bg-elevated);
    color: var(--bx-color-fg);
}

html #wp-link-wrap #link-modal-title,
html #wp-link-wrap .query-results,
html #wp-link-wrap .query-results li {
    border-color: var(--bx-color-border);
}

html #wp-link-wrap .submitbox {
    background-color: var(--bx-color-bg-muted);
    border-top-color: var(--bx-color-border);
}

html #wp-link-wrap .query-results li:hover,
html #wp-link-wrap .query-results li.unselectable {
    background-color: var(--bx-color-bg-muted);
}

html #wp-link-wrap .query-results li .item-info {
    color: var(--bx-color-fg-muted);
}

html #wp-link-wrap .query-notice,
html #wp-link-wrap .query-notice .query-notice-default,
html #wp-link-wrap .query-notice .query-notice-hint {
    background-color: var(--bx-color-bg-muted);
    color: var(--bx-color-fg);
}

/* bbPress sizes the Forum select to its content on the edit screen; every other field is full width. */
#bbpress-forums fieldset.bbp-form select#bbp_forum_id {
    width: 100%;
    max-width: none;
}

/* bbPress paints the current page chip light grey with the page text colour on it: 4.3:1 in light mode and 1.05:1 in dark. Fill it with the accent, as the other pagination in the theme does. */
#bbpress-forums .bbp-pagination-links span.current {
    background-color: var(--bx-color-accent);
    border-color: var(--bx-color-accent);
    color: var(--bx-color-accent-inverse);
}

/* Notices: bbPress paints them in fixed pastel yellow, blue and red, which stay
 * bright on the dark page. Map them onto the shared status tokens; :root lifts
 * these over bbPress's equal-specificity rules without !important. */
:root div.bbp-template-notice,
:root div.indicator-hint,
:root div.bbp-template-notice.important {
    background-color: var(--bx-color-warning-bg);
    border-color: var(--bx-color-warning);
    color: var(--bx-color-fg);
}

:root div.bbp-template-notice.info {
    background-color: var(--bx-color-info-bg);
    border-color: var(--bx-color-info);
}

:root div.bbp-template-notice.error,
:root div.bbp-template-notice.warning {
    background-color: var(--bx-color-error-bg);
    border-color: var(--bx-color-error);
}

:root div.bbp-template-notice a,
:root div.bbp-template-notice.error a,
:root div.bbp-template-notice.warning a {
    color: var(--bx-color-fg);
    text-decoration: underline;
}

/* Profile tabs: bbPress fills the current tab with a fixed #eee and fades it,
 * which leaves the light dark-mode text almost invisible. The accent edge keeps
 * the current tab visible where the muted fill is close to the page. */
:root #bbpress-forums #bbp-single-user-details #bbp-user-navigation li.current a {
    background-color: var(--bx-color-bg-muted);
    border-inline-start: 3px solid var(--bx-color-accent);
    color: var(--bx-color-fg);
    font-weight: 600;
    opacity: 1;
}

/* These beat bbPress's own ID selectors on forum rows, headers and the reply form. Kept unchanged, in source order and specificity, so live sites render exactly as before. */
/* stylelint-disable declaration-no-important */
#bbpress-forums li.bbp-header,
#bbpress-forums li.bbp-footer {
    padding: 20px 35px !important;
}

#bbpress-forums li.bbp-body ul.forum,
#bbpress-forums li.bbp-body ul.topic {
    padding: 25px 35px !important;
}

#bbpress-forums div.odd,
#bbpress-forums ul.odd,
#bbpress-forums div.even,
#bbpress-forums ul.even {
    background: var(--bx-color-bg-elevated) !important;
}

.bbp-reply-form fieldset.bbp-form {
    background: transparent !important;
    border: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}
/* stylelint-enable declaration-no-important */
