/* ==========================================================
   ALLAGASH bbPRESS STYLESHEET

   Canonical consolidated replacement file. Duplicate, unfinished,
   and superseded rules have been removed while preserving the
   established bbPress appearance and behavior.
   ========================================================== */

/* ----------------------------------------------------------
   bbPress wrapper / global forum typography
   ---------------------------------------------------------- */

#bbpress-forums,
#bbpress-forums.bbpress-wrapper {
    margin-top: 0 !important;
    font-family: 'Alegreya', serif !important;
    font-size: 18px !important;
    color: var(--pine) !important;
}

/* Hide duplicate bbPress search form when sidebar/page search is present */
#bbpress-forums #bbp-search-form {
    display: none !important;
}

/* Hide Astra post navigation on bbPress pages */
body.bbpress .post-navigation,
body.bbpress .nav-links,
body.bbpress .ast-single-post-navigation {
    display: none !important;
}

/* ==========================================================
   BBPRESS PAGE BACKGROUND
   ========================================================== */

.single-forum .site-content,
.single-topic .site-content,
.post-type-archive-forum .site-content {
    background: var(--birch);
}


.single-topic article.ast-article-single {
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
}

@media (min-width: 922px) {
    body.bbpress #secondary {
        margin-top: 40px !important;
    }
}

@media (min-width: 922px) {
    body.single-topic.ast-separate-container #primary {
        margin-top: 20px !important;
    }
}

/* ----------------------------------------------------------
   Forum index table / forum list
   ---------------------------------------------------------- */

#bbpress-forums ul.bbp-forums {
    overflow: hidden;
    background: white;
    border: 1px solid var(--bbpress-panel-border) !important;
    border-radius: 8px;
    box-shadow: 0 4px 10px var(--bbpress-panel-shadow);
}

#bbpress-forums li.bbp-header {
    background: var(--pine) !important;
    color: var(--light-mist) !important;
    border: none !important;
    font-weight: 700 !important;
    padding-top: 15px;
    padding-bottom: 15px;
}

#bbpress-forums li.bbp-header a,
#bbpress-forums li.bbp-header ul.forum-titles li {
    color: var(--light-mist) !important;
}

#bbpress-forums li.bbp-header ul.forum-titles li {
    font-size: 18px !important;
}

#bbpress-forums li.bbp-body ul.forum,
#bbpress-forums li.bbp-body ul.topic {
    background: white !important;
    border-top: 1px solid var(--bbpress-panel-border-light) !important;
    border-bottom: 1px solid var(--bbpress-panel-border-light);
    padding-top: 15px !important;
    padding-bottom: 15px !important;
}

#bbpress-forums li.bbp-body ul.forum:first-child,
#bbpress-forums li.bbp-body ul.topic:first-child {
    border-top: none !important;
}

#bbpress-forums li.bbp-body ul.forum:nth-child(odd),
#bbpress-forums li.bbp-body ul.topic:nth-child(odd) {
    background: var(--bbpress-row-alt) !important;
}

#bbpress-forums li.bbp-forum-info {
    width: 54% !important;
    padding-left: 15px !important;
}

#bbpress-forums li.bbp-forum-topic-count,
#bbpress-forums li.bbp-forum-reply-count {
    width: 13% !important;
    font-size: 16px !important;
    color: var(--stone-gray) !important;
}

#bbpress-forums li.bbp-forum-freshness {
    width: 20% !important;
    font-size: 16px !important;
    color: var(--stone-gray) !important;
  padding-right: 12px !important;

}

#bbpress-forums .bbp-forum-title,
#bbpress-forums .bbp-topic-permalink {
    font-family: 'Alegreya', serif !important;
    font-size: 25px !important;
    line-height: 1.25 !important;
    color: var(--pine) !important;
    font-weight: 700 !important;
    text-decoration: none;
}

#bbpress-forums .bbp-forum-title:hover,
#bbpress-forums .bbp-topic-permalink:hover {
    text-decoration: underline !important;
    text-underline-offset: 3px;
}

/* ==========================================================
   MOBILE FORUM LINK CLUE
   Make forum titles look clearly tappable
   ========================================================== */

#bbpress-forums .bbp-forum-content {
    font-family: 'Alegreya', serif !important;
    font-size: 17px !important;
    line-height: 1.5 !important;
    color: var(--stone-gray) !important;
    margin-top: 5px !important;
}

#bbpress-forums .bbp-topic-meta,
#bbpress-forums .bbp-reply-header,
#bbpress-forums .bbp-breadcrumb,
#bbpress-forums .bbp-template-notice,
#bbpress-forums .bbp-forum-freshness {
    font-size: 15px !important;
    color: var(--stone-gray) !important;
}


/* ----------------------------------------------------------
   Single forum and single topic headings
   ---------------------------------------------------------- */

.single-forum h1.entry-title,
.single-topic h1.entry-title {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--pine);
}

.single-forum h1.entry-title img.emoji {
    width: 1em !important;
    height: 1em !important;
    margin: 0 12px 0 0 !important;
    vertical-align: -0.08em !important;
}

.single-forum .entry-header {
    margin-bottom: 6px;
}

/* Single topics are forum content, not blog posts. */
.single-topic .entry-header {
    margin-top: 0;
    margin-bottom: 12px;
    padding-top: 0;
}

.single-topic .entry-meta {
    display: none !important;
}

/* Hide empty / unhelpful bbPress notices on single forum pages */
.single-forum #bbpress-forums .bbp-template-notice.info:has(.bbp-forum-description),
.single-forum #bbpress-forums .bbp-template-notice:not(.info) {
    display: none !important;
}


/* ==========================================================
   NOTICES
   ========================================================== */

#bbpress-forums .bbp-template-notice {
    background: white !important;
    border: 1px solid var(--bbpress-panel-border-light) !important;
    border-left: 5px solid var(--pine) !important;
    border-radius: 6px;
    color: var(--dark-spruce) !important;
    margin: 8px 0 18px !important;
    padding: 10px 14px !important;
}

/* Keep the single-topic status notice compact and visually connected
   to the reply table rather than presenting it as a separate card. */
.single-topic #bbpress-forums .bbp-template-notice.info {
    background: var(--bbpress-row-alt) !important;
    border-top: 1px solid var(--bbpress-panel-border-light) !important;
    border-right: 1px solid var(--bbpress-panel-border-light) !important;
    border-bottom: 1px solid var(--bbpress-panel-border-light) !important;
    border-left: 4px solid var(--pine) !important;
    box-shadow: none !important;
    margin: 0 0 18px !important;
    padding: 11px 16px !important;
}

.single-topic #bbpress-forums .bbp-template-notice.info ul,
.single-topic #bbpress-forums .bbp-template-notice.info li {
    margin: 0 !important;
}


/* ==========================================================
   BBPRESS EDITOR
   ========================================================== */

#bbpress-forums .bbp-the-content-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 24px 0 20px;
    box-sizing: border-box;
}

/* ==========================================================
   ATTACHMENTS
   ========================================================== */


#bbpress-forums .bbp-attachments-form p {
    margin: 10px 0;
}

#bbpress-forums .bbp-attachments-form input[type="file"] {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;

    background: white;
    border: 1px solid var(--bbpress-input-border);
    border-radius: 4px;

    padding: 8px;
}

#bbpress-forums .bbp-attachments-form label {
    color: var(--dark-spruce);
    font-weight: 700;
}

#bbpress-forums .bbp-attachments-form a {
    color: var(--river-blue);
    text-decoration: none;
}

#bbpress-forums .bbp-attachments-form a:hover {
    text-decoration: underline;
}


/* ==========================================================
   SIDEBAR / SEARCH CARD
   ========================================================== */

body.bbpress .sidebar-main .widget,
body.bbpress aside .widget,
body.bbpress .widget_display_search {
    background: var(--bbpress-row-alt) !important;
    border: 1px solid var(--bbpress-panel-border) !important;
    border-radius: 8px;
    box-shadow: 0 4px 10px var(--bbpress-panel-shadow);

    padding: 28px !important;
    margin-bottom: 28px;
}

body.bbpress .sidebar-main .widget-title,
body.bbpress aside .widget-title,
body.bbpress .widget_display_search .widget-title {
    color: var(--pine);
    font-family: 'Alegreya', serif;
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1.2;

    margin-bottom: 22px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--bbpress-accent-border);
}

.widget_display_search input[type="search"],
.widget_display_search input[type="text"] {
    width: 100%;
    height: 46px;
    box-sizing: border-box;

    background: white;
    border: 1px solid var(--bbpress-input-border);
    border-radius: 6px;

    font-family: 'Alegreya', serif;
    font-size: 1rem;

    padding: 0 16px;
    margin-bottom: 18px;
}

.widget_display_search input[type="submit"] {
    margin-top: 0;
}

/* ==========================================================
   TOPIC / REPLY CONTENT
   ========================================================== */

#bbpress-forums div.bbp-reply-content,
#bbpress-forums div.bbp-topic-content {
    color: var(--dark-spruce) !important;
    font-family: 'Alegreya', serif !important;
    font-size: 18px !important;
    line-height: 1.6 !important;
}

/* ==========================================================
   bbPRESS PROFILE EDIT CLEANUP
   ========================================================== */


/* Hide the unused Contact Info heading and Language field. */
#bbpress-forums #bbp-your-profile h2.entry-title:nth-of-type(2),
#bbpress-forums #bbp-your-profile label[for="locale"],
#bbpress-forums #bbp-your-profile select#locale {
    display: none !important;
}

/* Make the username visibly read-only */
#bbpress-forums #bbp-your-profile input#user_login {
    background: #f6f6f6 !important;
    color: #666 !important;
    pointer-events: none;
}

#bbpress-forums #bbp-your-profile label[for="user_login"]::after {
    content: " (cannot be changed)";
    display: block;
    margin-top: 2px;

    color: #777;
    font-size: .85em;
    font-weight: 400;
}

/* Hide bbPress post permalink number */
#bbpress-forums .bbp-reply-permalink {
    display: none !important;
}

/* ==========================================================
   Rounded bbPress cards
   ========================================================== */

/* Topic list */
#bbpress-forums ul.forums {
    border-radius: 10px;
    overflow: hidden;
}

/* Individual reply cards */
#bbpress-forums .bbp-replies-list > li {
    border-radius: 10px;
    overflow: hidden;
}

/* Information notices */
#bbpress-forums .bbp-template-notice {
    border-radius: 10px;
    overflow: hidden;
}

/* Reply editor */
#bbpress-forums fieldset.bbp-form {
    border-radius: 10px;
    overflow: hidden;
}


/* ==========================================================
   TOPIC / REPLY FORMS
   Uses the actual bbPress DOM: one outer form fieldset with the
   attachment plugin inserting a second fieldset inside it.
   ========================================================== */

/* One card only: the fieldset that is a direct child of the form. */
#bbpress-forums :is(.bbp-topic-form, .bbp-reply-form)
> form > fieldset.bbp-form {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;

    margin: 18px 0 28px !important;
    padding: 28px !important;

    background: var(--bbpress-row-alt) !important;
    border: 1px solid var(--bbpress-panel-border) !important;
    border-radius: 8px;
    box-shadow: 0 4px 10px var(--bbpress-panel-shadow);
}

/* Use the native bbPress legend as a heading fully inside the card.
   Floating it prevents the legend from interrupting the fieldset border. */
#bbpress-forums :is(.bbp-topic-form, .bbp-reply-form)
> form > fieldset.bbp-form > legend {
    display: block !important;
    position: static !important;
    float: left;

    width: min(70%, 680px);
    max-width: 100%;

    margin: 0 0 24px !important;
    padding: 0 0 12px !important;

    color: var(--pine) !important;
    border: 0 !important;

    /* A background rule renders reliably on native fieldset legends. */
    background-image: linear-gradient(
        to right,
        var(--bbpress-accent-border),
        var(--bbpress-accent-border)
    );
    background-repeat: no-repeat;
    background-position: left bottom;
    background-size: 100% 2px;

    font-family: "Alegreya", serif !important;
    font-size: 1.45rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
}

/* Begin the form fields below the floated heading. */
#bbpress-forums :is(.bbp-topic-form, .bbp-reply-form)
> form > fieldset.bbp-form > div {
    clear: both;
}

#bbpress-forums :is(.bbp-topic-form, .bbp-reply-form)
> form > fieldset.bbp-form > legend img.emoji {
    width: 1em !important;
    height: 1em !important;
    margin: 0 .2em 0 0 !important;
    vertical-align: -.1em !important;
}

/* Labels and normal field spacing inside the outer form only. */
#bbpress-forums :is(.bbp-topic-form, .bbp-reply-form)
> form > fieldset.bbp-form label {
    color: var(--dark-spruce);
    font-weight: 700;
}

#bbpress-forums :is(.bbp-topic-form, .bbp-reply-form)
> form > fieldset.bbp-form > div > p {
    margin: 0 0 22px !important;
}

/* Topic tags are not used on the Allagash forums. */
#bbpress-forums .bbp-topic-form
> form > fieldset.bbp-form > div > p:has(#bbp_topic_tags) {
    display: none !important;
}

/* Text controls in topic and reply forms. */
#bbpress-forums :is(.bbp-topic-form, .bbp-reply-form)
> form > fieldset.bbp-form input[type="text"],
#bbpress-forums :is(.bbp-topic-form, .bbp-reply-form)
> form > fieldset.bbp-form input[type="search"],
#bbpress-forums :is(.bbp-topic-form, .bbp-reply-form)
> form > fieldset.bbp-form select {
    width: 100%;
    max-width: 100%;
    height: 46px !important;
    min-height: 46px !important;
    box-sizing: border-box;

    background: white !important;
    border: 1px solid var(--bbpress-input-border) !important;
    border-radius: 6px;

    color: var(--dark-spruce) !important;
    font-family: "Alegreya", serif !important;
    font-size: 1rem !important;
    line-height: normal !important;

    padding: 0 16px !important;
}

#bbpress-forums :is(.bbp-topic-form, .bbp-reply-form)
> form > fieldset.bbp-form textarea {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 240px;
    box-sizing: border-box;

    background: white !important;
    border: 1px solid var(--bbpress-input-border) !important;
    border-radius: 4px;

    color: var(--dark-spruce) !important;
    font-family: "Alegreya", serif !important;
    font-size: 18px !important;
}

/* Editor occupies one clear block between title and lower options. */
#bbpress-forums :is(.bbp-topic-form, .bbp-reply-form)
.bbp-the-content-wrapper {
    margin: 24px 0 22px !important;
}

/* The attachment plugin inserts a nested fieldset with the same class.
   Treat it as a subsection, never as a second card. */
#bbpress-forums :is(.bbp-topic-form, .bbp-reply-form)
> form > fieldset.bbp-form fieldset.bbp-form {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;

    margin: 26px 0 0 !important;
    padding: 22px 0 0 !important;

    background: transparent !important;
    border: 0 !important;
    border-top: 1px solid var(--bbpress-panel-border) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

#bbpress-forums :is(.bbp-topic-form, .bbp-reply-form)
> form > fieldset.bbp-form fieldset.bbp-form > legend {
    display: block !important;
    position: static !important;
    width: auto;
    margin: 0 0 14px !important;
    padding: 0 !important;

    color: var(--pine) !important;
    border: 0 !important;

    font-family: "Alegreya", serif !important;
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
}

/* The plugin already supplies a useful Attachments label, so suppress
   its generic maximum-size notice to keep the subsection compact. */
#bbpress-forums :is(.bbp-topic-form, .bbp-reply-form)
> form > fieldset.bbp-form fieldset.bbp-form > .bbp-template-notice {
    display: none !important;
}

#bbpress-forums :is(.bbp-topic-form, .bbp-reply-form)
> form > fieldset.bbp-form fieldset.bbp-form p.bbp-attachments-form {
    margin: 0 !important;
}

#bbpress-forums :is(.bbp-topic-form, .bbp-reply-form)
> form > fieldset.bbp-form fieldset.bbp-form input[type="file"] {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 6px 0 8px;
    padding: 8px;

    background: white;
    border: 1px solid var(--bbpress-input-border);
    border-radius: 4px;
}

#bbpress-forums :is(.bbp-topic-form, .bbp-reply-form)
.d4p-attachment-addfile {
    color: var(--river-blue) !important;
    text-decoration: none !important;
}

#bbpress-forums :is(.bbp-topic-form, .bbp-reply-form)
.d4p-attachment-addfile:hover {
    text-decoration: underline !important;
}

/* Keep the submit action inside the same visual card. */
#bbpress-forums :is(.bbp-topic-form, .bbp-reply-form)
.bbp-submit-wrapper {
    display: flex;
    justify-content: flex-end;
    float: none !important;
    width: 100%;
    margin: 28px 0 0 !important;
}

/* ==========================================================
   BBPRESS BUTTON MAPPINGS
   ========================================================== */

button,
.button,
input[type="submit"],
input[type="button"] {
    transition:
        background-color 0.18s ease,
        color 0.18s ease;
}


/* ==========================================================
   SINGLE FORUM TOPIC LIST CLEANUP
   ========================================================== */

/* bbPress prints the same count above and below the list. Keep the useful
   upper count and remove the duplicate lower one. */
.single-forum #bbpress-forums ul.bbp-topics + .bbp-pagination {
    display: none !important;
}

/* The footer contains only an empty placeholder row. */
.single-forum #bbpress-forums ul.bbp-topics > li.bbp-footer {
    display: none !important;
}

.single-forum #bbpress-forums .bbp-pagination {
    margin: 0 0 8px !important;
}

.single-forum #bbpress-forums .bbp-pagination-count {
    color: var(--stone-gray) !important;
    font-size: 15px !important;
    line-height: 1.35 !important;
}

.single-forum #bbpress-forums ul.bbp-topics {
    margin-bottom: 24px !important;
    overflow: hidden;
    background: white;
    border: 1px solid var(--bbpress-panel-border) !important;
    border-radius: 8px;
    box-shadow: 0 4px 10px var(--bbpress-panel-shadow);
}

.single-forum #bbpress-forums ul.bbp-topics > li.bbp-header {
    padding: 14px 0 !important;
}

.single-forum #bbpress-forums ul.bbp-topics > li.bbp-body > ul.topic {
    min-height: 0 !important;
    padding-top: 18px !important;
    padding-bottom: 18px !important;
}

.single-forum #bbpress-forums ul.bbp-topics .bbp-topic-title {
    box-sizing: border-box;
    padding-left: 24px !important;
}

.single-forum #bbpress-forums ul.bbp-topics .bbp-topic-freshness {
    box-sizing: border-box;
    padding-right: 24px !important;
}

/* Keep the new-topic card connected to the topic list. */
.single-forum #bbpress-forums .bbp-topic-form > form > fieldset.bbp-form {
    margin-top: 0 !important;
}

/* ==========================================================
   BBPRESS FAVORITE / SUBSCRIBE
   ========================================================== */

#bbpress-forums #favorite-toggle {
    display: none !important;
}

/* ==========================================================
   BBPRESS AUTHOR / REPLIES COLUMNS
   (Reply pages only)
   ========================================================== */

/* Header and footer rows */
#bbpress-forums ul.bbp-replies > li.bbp-header,
#bbpress-forums ul.bbp-replies > li.bbp-footer {
    display: grid !important;
    grid-template-columns: 110px 1fr;
    align-items: center;

    min-height: 64px;
    padding: 0 !important;
}

/* Header/footer labels */
#bbpress-forums ul.bbp-replies > li.bbp-header .bbp-reply-author,
#bbpress-forums ul.bbp-replies > li.bbp-header .bbp-reply-content,
#bbpress-forums ul.bbp-replies > li.bbp-footer .bbp-reply-author,
#bbpress-forums ul.bbp-replies > li.bbp-footer .bbp-reply-content {
    width: auto !important;
    margin: 0 !important;
    padding: 0 14px !important;

    color: var(--light-mist) !important;
    font-family: 'Alegreya', serif !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    line-height: 64px;
    text-align: left !important;
}

/* Thin divider in header/footer */
#bbpress-forums ul.bbp-replies > li.bbp-header .bbp-reply-author,
#bbpress-forums ul.bbp-replies > li.bbp-footer .bbp-reply-author {
    position: relative;
    border-right: none;
}

#bbpress-forums ul.bbp-replies > li.bbp-header .bbp-reply-author::after,
#bbpress-forums ul.bbp-replies > li.bbp-footer .bbp-reply-author::after {
    content: "";
    position: absolute;
    top: 0;
    right: -6px;   /* Fine-tune if needed */
    width: 1px;
    height: 100%;
    background: rgba(255,255,255,.35);
}

/* Keep Replies close to the divider */
#bbpress-forums ul.bbp-replies > li.bbp-header .bbp-reply-content,
#bbpress-forums ul.bbp-replies > li.bbp-footer .bbp-reply-content {
    padding-left: 20px !important;
}


/* ==========================================================
   REPLY BODY COLUMNS
   Divider appears only in the body, not the date/action row
   ========================================================== */

#bbpress-forums .bbp-body .bbp-reply-author {
    box-sizing: border-box;
    border-right: 1px solid rgba(34,81,58,.20);
}

/* Do not place the divider through the date/moderation row */
#bbpress-forums .bbp-reply-header {
    border-right: none !important;
}

/* Remove the default "|" separator. */
#bbpress-forums .bbp-admin-links {
    color: transparent;
}

/* ==========================================================
   BBPRESS PRIMARY ACTION LINKS
   ========================================================== */

/* Compact bbPress action buttons */
#bbpress-forums .bbp-topic-edit-link,
#bbpress-forums .bbp-reply-edit-link,
#bbpress-forums .bbp-topic-reply-link,
#bbpress-forums .bbp-reply-to-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;

    width: auto !important;
    min-width: var(--button-action-width);
    min-height: var(--button-action-height);

    margin: 0 !important;

    padding:
        var(--button-action-padding-block)
        var(--button-action-padding-inline) !important;

    gap: var(--button-action-gap);

    background: var(--button-bg);
    color: var(--button-text) !important;

    border: 0;
    border-radius: var(--button-action-radius);
    box-shadow: none;

    font-family: "Alegreya", serif;
    font-size: var(--button-action-font-size);
    font-weight: var(--button-action-font-weight);
    line-height: 1;

    text-align: center;
    text-decoration: none !important;

    cursor: pointer;

    transition:
        background-color var(--button-transition),
        color var(--button-transition);
}

/* Hover */
#bbpress-forums .bbp-topic-edit-link:hover,
#bbpress-forums .bbp-topic-edit-link:focus,
#bbpress-forums .bbp-reply-edit-link:hover,
#bbpress-forums .bbp-reply-edit-link:focus,
#bbpress-forums .bbp-topic-reply-link:hover,
#bbpress-forums .bbp-topic-reply-link:focus,
#bbpress-forums .bbp-reply-to-link:hover,
#bbpress-forums .bbp-reply-to-link:focus {
    background: var(--button-bg-hover);
    color: var(--button-text) !important;

    box-shadow: none;
    text-decoration: none !important;
    transform: none;
}

/* Keep Edit and Reply aligned right at all screen sizes */
#bbpress-forums .bbp-admin-links {
    float: right !important;
    clear: none !important;
    display: inline-block !important;
    margin: 0 !important;
    text-align: right !important;
}

/* ==========================================================
   BBPRESS EDITOR TOOLBAR — MATCH WPDISCUZ
   ========================================================== */

/* Pine toolbar */
#bbpress-forums .mce-toolbar-grp,
#bbpress-forums .mce-top-part {
    background: var(--pine) !important;
    border-color: var(--pine) !important;
    box-shadow: none !important;
}

/* Toolbar spacing */
#bbpress-forums .mce-toolbar-grp {
    padding-top: 5px  !important;
    padding-bottom: 9px !important;
    padding-right: 7px !important;
    padding-left: 7px !important;
}

/* Individual toolbar buttons */
#bbpress-forums .mce-toolbar .mce-btn {
    margin: 0 2px !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 4px !important;
    box-shadow: none !important;
}

/* Consistent clickable area */
#bbpress-forums .mce-toolbar .mce-btn button {
    width: 34px !important;
    height: 29px !important;
    padding: 3px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    background: transparent !important;
    border: 0 !important;
    border-radius: 4px !important;
    box-shadow: none !important;
}

/* Default icon color */
#bbpress-forums .mce-toolbar .mce-ico {
    color: var(--light-mist) !important;
    text-shadow: none !important;
}

/* Match the wpDiscuz translucent hover */
#bbpress-forums .mce-toolbar .mce-btn:hover,
#bbpress-forums .mce-toolbar .mce-btn:focus,
#bbpress-forums .mce-toolbar .mce-btn.mce-active {
    background: rgba(255, 255, 255, 0.16) !important;
    border: 0 !important;
    box-shadow: none !important;
}

/* Prevent TinyMCE from adding a dark inner background */
#bbpress-forums .mce-toolbar .mce-btn:hover button,
#bbpress-forums .mce-toolbar .mce-btn:focus button,
#bbpress-forums .mce-toolbar .mce-btn.mce-active button {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
}

/* Slightly larger TinyMCE icons */
#bbpress-forums .mce-ico {
    font-size: 26px !important;
    line-height: 26px !important;
}

/* Keep icons white on hover and active */
#bbpress-forums .mce-toolbar .mce-btn:hover .mce-ico,
#bbpress-forums .mce-toolbar .mce-btn:focus .mce-ico,
#bbpress-forums .mce-toolbar .mce-btn.mce-active .mce-ico {
    color: var(--light-mist) !important;
    text-shadow: none !important;
}

/* Remove TinyMCE toolbar divider shadows */
#bbpress-forums .mce-top-part::before {
    box-shadow: none !important;
}

/* ==========================================================
   TOPIC SUBSCRIBE ACTION
   ========================================================== */

/* Keep Subscribe above the bbPress content and align it right. */
:is(.single-forum, .single-topic) #bbpress-forums #subscription-toggle {
    display: flex !important;
    justify-content: flex-end !important;
    position: static !important;
    float: none !important;
    clear: both !important;

    margin: 0 0 14px !important;
    padding: 0 !important;

    text-align: right !important;
}

/* Lower the forum-page action visually without displacing the topic list. */
.single-forum #bbpress-forums #subscription-toggle {
    margin: 0 0 8px !important;
    transform: translateY(14px);
}

/*
 * Style the bbPress Subscribe link like the shared
 * Allagash action buttons.
 */
:is(.single-forum, .single-topic) #bbpress-forums #subscription-toggle a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    min-width: var(--button-action-width) !important;
    min-height: var(--button-action-height) !important;

    padding:
        var(--button-action-padding-block)
        var(--button-action-padding-inline) !important;

    gap: var(--button-action-gap) !important;

    background: var(--button-bg) !important;
    color: var(--button-text) !important;

    border: 0 !important;
    border-radius: var(--button-action-radius) !important;
    box-shadow: none !important;

    font-family: "Alegreya", serif !important;
    font-size: var(--button-action-font-size) !important;
    font-weight: var(--button-action-font-weight) !important;
    line-height: 1 !important;

    text-decoration: none !important;
    white-space: nowrap !important;

    transition:
        background-color var(--button-transition),
        color var(--button-transition) !important;
}

/* Envelope icon */
:is(.single-forum, .single-topic) #bbpress-forums #subscription-toggle a::before {
    content: "\2709";
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: var(--button-action-icon-size);
    height: var(--button-action-icon-size);

    font-family: Arial, sans-serif;
    font-size: var(--button-action-icon-size);
    font-weight: 400;
    line-height: 1;
}

/* Hover and keyboard focus */
:is(.single-forum, .single-topic) #bbpress-forums #subscription-toggle a:hover,
:is(.single-forum, .single-topic) #bbpress-forums #subscription-toggle a:focus-visible {
    background: var(--button-bg-hover) !important;
    color: var(--button-text) !important;
    text-decoration: none !important;
}

/* Remove Astra/bbPress focus decoration without removing visibility */
:is(.single-forum, .single-topic) #bbpress-forums #subscription-toggle a:focus-visible {
    outline: 2px solid var(--river-blue) !important;
    outline-offset: 3px !important;
}


/* Remove orphaned bbPress separator beside Subscribe */
:is(.single-forum, .single-topic) #bbpress-forums #subscription-toggle::before,
:is(.single-forum, .single-topic) #bbpress-forums #subscription-toggle::after {
    content: none !important;
    display: none !important;
}


/* ==========================================================
   BBPRESS LOGIN-MANAGER ADAPTER
   bbPress owns only wrapper placement; login.css owns the panel.
   ========================================================== */

body:not(.logged-in) #bbpress-forums .bbp-no-topic,
body:not(.logged-in) #bbpress-forums .bbp-no-reply {
    display: flow-root;
    width: 100%;
    margin: 0;
    padding: 0;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0;
    box-shadow: none !important;
    line-height: 1.4;
    box-sizing: border-box;
}

body:not(.logged-in) #bbpress-forums .allagash-bbpress-login-panel {
    width: 100%;
    max-width: none;
    margin: 20px 0 36px;
    padding: 36px 28px;
}

body:not(.logged-in) #bbpress-forums .bbp-no-topic > .allagash-bbpress-login-panel,
body:not(.logged-in) #bbpress-forums .bbp-no-reply > .allagash-bbpress-login-panel {
    margin-top: 14px;
}


/* ==========================================================
   ALLAGASH bbPRESS MOBILE RULES

   Load after the base bbPress stylesheet.
   Mobile and stacked-column adjustments only.
   ========================================================== */


/* ==========================================================
   TABLET / STACKED ASTRA LAYOUT
   Applies when Astra moves the sidebar below the main content.
   ========================================================== */

@media (max-width: 921px) {

    /* Reduce the gap below the site header. */
    body.bbpress .site-content {
        padding-top: 24px !important;
    }

    /* Remove Astra spacing around the main bbPress article. */
    body.bbpress #primary {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    body.bbpress article.ast-article-single,
    body.bbpress .entry-header {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    /* Keep the stacked sidebar close to the main content. */
    body.bbpress #secondary {
        margin-top: 24px !important;
        padding-top: 0 !important;
    }

    /* Prevent the final content element from adding another gap. */
    body.bbpress #primary .entry-content > *:last-child {
        margin-bottom: 0 !important;
    }
}


/* ==========================================================
   MOBILE bbPRESS LAYOUT
   ========================================================== */

@media (max-width: 768px) {

    /* ----------------------------------------------------------
       Global typography and spacing
       ---------------------------------------------------------- */

    #bbpress-forums {
        margin-top: 18px;
        font-size: 15px !important;
    }

    .single-forum h1.entry-title,
    .single-topic h1.entry-title {
        font-size: 2rem !important;
    }


    /* ----------------------------------------------------------
       Forum index
       ---------------------------------------------------------- */


	#bbpress-forums li.bbp-header ul.forum-titles li {
    font-size: 1.3rem!important;
	}	

  #bbpress-forums .bbp-topic-freshness-author .bbp-author-avatar {
        display: none !important;
	}

    /* Hide numeric columns to preserve room for forum information. */
    #bbpress-forums .bbp-forum-topic-count,
    #bbpress-forums .bbp-forum-reply-count {
        display: none !important;
    }

    #bbpress-forums li.bbp-forum-info,
    #bbpress-forums li.bbp-header .bbp-forum-info {
        width: 70% !important;
        padding-left: 8px !important;
        padding-right: 8px !important;

    }

    #bbpress-forums li.bbp-forum-freshness,
    #bbpress-forums li.bbp-header .bbp-forum-freshness {
        width: 30% !important;
        text-align: center;
padding-right: 3px!important;
 
    }

    #bbpress-forums li.bbp-header,
    #bbpress-forums li.bbp-header .bbp-forum-info,
    #bbpress-forums li.bbp-header .bbp-forum-freshness {
        font-size: 14px !important;
    }

    #bbpress-forums li.bbp-body ul.forum {
        padding-top: 18px !important;
        padding-bottom: 18px !important;
    }

    #bbpress-forums .bbp-forum-title,
    #bbpress-forums .bbp-topic-permalink {
        font-size: 1.1rem !important;
        line-height: 1.25 !important;
    }

    /* Make forum names visibly tappable. */
    #bbpress-forums .bbp-forum-title {
        text-decoration: underline;
        text-decoration-thickness: 1px;
        text-underline-offset: 4px;
        text-decoration-color:
            color-mix(in srgb, var(--pine) 50%, transparent);
    }

    #bbpress-forums .bbp-forum-content {
        margin-top: 0px !important;
        font-size: 0.9rem !important;
        line-height: 1.3 !important;
    }


    /* ----------------------------------------------------------
       Single-forum topic list
       ---------------------------------------------------------- */

    .single-forum #bbpress-forums ul.bbp-topics .bbp-topic-title {
        padding-left: 14px !important;
    }

    .single-forum #bbpress-forums ul.bbp-topics .bbp-topic-freshness {
        padding-right: 14px !important;
    }


    /* ----------------------------------------------------------
       Topic and reply forms
       ---------------------------------------------------------- */

    #bbpress-forums :is(.bbp-topic-form, .bbp-reply-form)
    > form > fieldset.bbp-form {
        padding: 18px !important;
    }

    #bbpress-forums :is(.bbp-topic-form, .bbp-reply-form)
    > form > fieldset.bbp-form > legend {
        width: 100%;
        margin-bottom: 20px !important;
        font-size: 1.25rem !important;
    }

    #bbpress-forums :is(.bbp-topic-form, .bbp-reply-form)
    > form > fieldset.bbp-form textarea {
        min-height: 260px;
    }

    #bbpress-forums :is(.bbp-topic-form, .bbp-reply-form)
    > form > fieldset.bbp-form fieldset.bbp-form {
        margin-top: 22px !important;
        padding-top: 18px !important;
    }


    /* ----------------------------------------------------------
       Sidebar cards
       ---------------------------------------------------------- */

    body.bbpress .sidebar-main .widget,
    body.bbpress aside .widget,
    body.bbpress .widget_display_search {
        padding: 20px !important;
    }


    /* ----------------------------------------------------------
       Logged-out login panel
       ---------------------------------------------------------- */

    body:not(.logged-in) #bbpress-forums
    .allagash-bbpress-login-panel {
        margin: 18px 0 30px;
        padding: 28px 18px;
    }

    body:not(.logged-in) #bbpress-forums
    .allagash-bbpress-login-title {
        font-size: 32px;
    }

    body:not(.logged-in) #bbpress-forums
    .allagash-bbpress-login-intro {
        margin-bottom: 30px;
        font-size: 18px;
    }
}


/* ==========================================================
   SMALL PHONE ACTION BUTTONS
   ========================================================== */

@media (max-width: 600px) {

    #bbpress-forums .bbp-topic-edit-link,
    #bbpress-forums .bbp-reply-edit-link,
    #bbpress-forums .bbp-topic-reply-link,
    #bbpress-forums .bbp-reply-to-link {
        min-width: 75px;
    }
}

