/*
bbpress-buddypress-overrides.css

Restyles bbPress/BuddyPress's own default markup with the shared --uis-*
brand variables (declared in the parent theme's style.css :root block,
overridden per the main site's current Customizer values by
class-uis-forum-branding-sync.php's inline styles) so the forum doesn't
look like an unstyled default WordPress install next to the main site.

@package UIS_Forum_Theme
@version 1.2.0
*/

/* Reset FIRST, before anything else in this file: bbPress and BuddyPress
   both ship their own default stylesheets with their own hardcoded
   backgrounds on specific elements (list rows, notices, form wrappers,
   etc.) that this file's selectors below don't individually name. Without
   this reset, "our theme's text color" (set right below, and inherited by
   everything) can land on top of "bbPress's own background color" on any
   element this file doesn't happen to also cover explicitly -- which is
   exactly how you get an unreadable dark-on-dark combination that "isn't
   controlled from the Customizer": neither side ever intended that pairing,
   it's two separate stylesheets each only half-controlling the same
   element. Universal-selector specificity (0,0,0,1) is lower than every
   class/ID selector below, so this always loses to -- i.e. gets safely
   overridden by -- every intentional background further down this file
   (buttons, form fields, notices, .uis-forum-content) without needing
   !important anywhere.
*/
#bbpress-forums,
#bbpress-forums *,
.buddypress,
.buddypress * {
    background-color: transparent;
    background-image: none;
}

#bbpress-forums,
.buddypress {
    font-family: var(--uis-font-family);
    color: var(--uis-text-primary);
}

/* Links */
#bbpress-forums a,
.buddypress a {
    color: var(--uis-color-brand-blue);
}
#bbpress-forums a:hover,
.buddypress a:hover {
    color: var(--uis-color-brand-orange);
}

/* Buttons / submit inputs (bbPress uses plain <button>/<input type=submit>, BuddyPress uses .button) */
#bbpress-forums button,
#bbpress-forums input[type="submit"],
.buddypress .button,
.buddypress a.button,
.buddypress input[type="submit"] {
    background: var(--uis-color-brand-blue);
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    padding: 0.5rem 1.25rem;
    font-weight: 500;
    font-family: var(--uis-font-family);
    cursor: pointer;
    transition: background 0.2s ease;
}
#bbpress-forums button:hover,
#bbpress-forums input[type="submit"]:hover,
.buddypress .button:hover,
.buddypress a.button:hover,
.buddypress input[type="submit"]:hover {
    background: var(--uis-color-brand-orange);
}

/* Form fields */
#bbpress-forums input[type="text"],
#bbpress-forums input[type="email"],
#bbpress-forums input[type="password"],
#bbpress-forums textarea,
#bbpress-forums select,
.buddypress input[type="text"],
.buddypress input[type="email"],
.buddypress input[type="password"],
.buddypress textarea,
.buddypress select {
    border: 1px solid var(--uis-border-color);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-family: var(--uis-font-family);
    background: var(--uis-bg-card);
    color: var(--uis-text-primary);
}

/* Directory nav tabs (Members/Groups/Activity, bbPress forum/topic list rows) */
.buddypress div.item-list-tabs ul li a,
#bbpress-forums .bbp-forums-list li,
#bbpress-forums .bbp-topics-list li {
    font-family: var(--uis-font-family);
    color: var(--uis-text-secondary);
}
.buddypress div.item-list-tabs ul li.selected a,
.buddypress div.item-list-tabs ul li.current a {
    color: var(--uis-color-brand-blue);
    border-bottom: 2px solid var(--uis-color-brand-blue);
}

/* Headings inside forum/BP content -- per-level, matching the parent
   theme's H1-H4 Customizer controls (synced via class-uis-forum-branding-
   sync.php) rather than one flat color/size for every level. */
#bbpress-forums h1,
.buddypress h1 {
    color: var(--uis-h1-color);
    font-size: var(--uis-h1-size);
    font-family: var(--uis-font-family);
}
#bbpress-forums h2,
.buddypress h2 {
    color: var(--uis-h2-color);
    font-size: var(--uis-h2-size);
    font-family: var(--uis-font-family);
}
#bbpress-forums h3,
.buddypress h3 {
    color: var(--uis-h3-color);
    font-size: var(--uis-h3-size);
    font-family: var(--uis-font-family);
}
#bbpress-forums h4,
.buddypress h4 {
    color: var(--uis-h4-color);
    font-size: var(--uis-h4-size);
    font-family: var(--uis-font-family);
}

/* Pagination */
.buddypress .pagination-links a,
.buddypress .pagination-links span.current,
#bbpress-forums .bbp-pagination-links a {
    color: var(--uis-color-brand-blue);
}

/* Notices/messages */
.buddypress #message,
.buddypress .info,
#bbpress-forums .bbp-template-notice {
    background: var(--uis-bg-secondary);
    border-left: 4px solid var(--uis-color-brand-orange);
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
}

/* The card wrapper page.php puts around every page's content */
.uis-forum-content {
    background: var(--uis-bg-card);
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: var(--uis-glass-shadow);
}
