/**
 * CMBA BuddyPress Group Page — Ultra-Modern Overrides
 *
 * Colors:
 *   Primary:   #1F4776 (dark navy)
 *   Secondary: #B88B4D (warm gold)
 *   Accent:    #235949 (deep emerald)
 *
 * Matches the style language of the CMBA Elementor Group Profile Card.
 *
 * BuddyPress structures handled:
 *   - Cover image header:  #cover-image-container > #header-cover-image
 *                           + #item-header-cover-image
 *   - Non-cover header:    #item-header.groups-header
 *   - Nav:                 #object-nav .bp-navs
 *   - Body:                .bp-wrap .item-body
 */

/* ================================================================
   CSS Custom Properties
   ================================================================ */
body.buddypress {
    --cmba-primary:        #1F4776;
    --cmba-secondary:      #B88B4D;
    --cmba-accent:         #235949;
    --cmba-primary-light:  #2a5a8f;
    --cmba-secondary-light:#d4a95e;
    --cmba-accent-light:   #2e7a63;
    --cmba-bg:             #f5f6f8;
    --cmba-card:           #ffffff;
    --cmba-border:         #eaedf1;
    --cmba-text:           #2D2D2B;
    --cmba-text-muted:     #6b7280;
    --cmba-radius:         14px;
    --cmba-radius-sm:      8px;
    --cmba-font:           "Intervogue", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ================================================================
   Page-Level Reset & Base
   ================================================================ */
body.buddypress .buddypress-wrap {
    font-family: var(--cmba-font);
    color: var(--cmba-text);
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 1.5rem 3rem;
}

/* ================================================================
   ★  COVER-IMAGE HEADER  ★
   Works WITH BuddyPress Nouveau's cover image positioning system.

   BP generates inline CSS that handles all structural layout:
     – Cover image height and positioning (absolute)
     – Avatar margin-top for cover overlap effect
     – Content/actions margin-top to position below cover
     – Float-based side-by-side layout + mobile stacking

   We ONLY add visual enhancements:
     – Container: rounded corners, shadow, dark gradient background
     – Cover: gradient overlay for photo blending
     – Elements: fonts, colors, borders, shadows, border-radius
   ================================================================ */

/* Outer wrapper — white card look */
body.buddypress #item-header.groups-header {
    background: #fff;
    border-radius: var(--cmba-radius);
    overflow: hidden;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .06), 0 1px 2px rgba(0, 0, 0, .04);
    margin-bottom: 0;
    padding: 0;
}

/* White card background for the content area below the cover image */
body.buddypress #cover-image-container {
    border-radius: var(--cmba-radius);
    overflow: hidden;
    background: #fff;
}

/* Cover image — visual polish only (height set by BP) */
body.buddypress #header-cover-image {
    background-color: transparent !important;
    border-radius: var(--cmba-radius) var(--cmba-radius) 0 0;
}

/* Subtle gradient overlay on cover photo for text legibility */
body.buddypress #cover-image-container::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 225px;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(0, 0, 0, .15) 60%,
        rgba(0, 0, 0, .4) 100%
    );
    z-index: 1;
    pointer-events: none;
    border-radius: var(--cmba-radius) var(--cmba-radius) 0 0;
}

/* Ensure content layer is above the gradient overlay */
body.buddypress #item-header-cover-image {
    position: relative;
    z-index: 2;
    padding: 0 1.25rem 1rem;
}

/* Reduce margin-bottom spacing BP adds below the header content */
#buddypress #item-header-cover-image {
    margin-bottom: .5em !important;
}

/* ── Avatar — visual styling only ──────────────── */
body.buddypress #item-header-cover-image #item-header-avatar a {
    text-decoration: none;
}

body.buddypress #item-header-cover-image #item-header-avatar img,
body.buddypress #item-header-cover-image #item-header-avatar a img {
    border-radius: var(--cmba-radius) !important;
    border: 3px solid #e5e7eb !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .1);
    background: #fff;
    transition: box-shadow .3s;
}

body.buddypress #item-header-cover-image #item-header-avatar a:hover img {
    box-shadow: 0 6px 28px rgba(0, 0, 0, .3);
}

/* ── Header Content text — dark on white card ──── */

/* Status badge — e.g. "PUBLIC GROUP" */
body.buddypress #item-header-cover-image .group-status,
body.buddypress .groups-header .group-status {
    display: inline-block;
    font-family: var(--cmba-font);
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: .3rem .75rem;
    border-radius: 20px;
    background: var(--cmba-primary);
    color: #fff;
    margin-right: .5rem;
    vertical-align: middle;
    line-height: 1.3;
    border: none;
}

body.buddypress #item-header-cover-image .group-status strong,
body.buddypress .groups-header .group-status strong {
    font-weight: 700;
    color: #fff;
}

/* Activity timestamp */
body.buddypress #item-header-cover-image .activity,
body.buddypress .groups-header .activity {
    font-family: var(--cmba-font);
    font-size: .8rem;
    font-weight: 500;
    color: var(--cmba-text-muted);
}

/* Group type list — e.g. "Group Type: COMMITTEES" */
body.buddypress #item-header-cover-image .bp-group-type-list,
body.buddypress .groups-header .bp-group-type-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .4rem;
    font-size: .8rem;
    color: var(--cmba-text);
}

body.buddypress #item-header-cover-image .bp-group-type-list strong,
body.buddypress .groups-header .bp-group-type-list strong {
    font-family: var(--cmba-font);
    font-weight: 600;
    color: var(--cmba-text-muted);
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .05em;
}

body.buddypress #item-header-cover-image .bp-group-type-list span,
body.buddypress .groups-header .bp-group-type-list span {
    display: inline-block;
    font-family: var(--cmba-font);
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    background: var(--cmba-secondary);
    color: #fff;
    padding: .28rem .75rem;
    border-radius: 20px;
    box-shadow: 0 2px 6px rgba(184, 139, 77, .3);
}

/* Item meta */
body.buddypress #item-header-cover-image .item-meta,
body.buddypress .groups-header .item-meta {
    color: var(--cmba-text-muted);
    font-family: var(--cmba-font);
    font-size: .85rem;
}

/* H2 group title — override BP's inline white to dark */
#buddypress div#item-header-cover-image h2,
#buddypress div#item-header-cover-image h2 a {
    font-family: var(--cmba-font);
    color: var(--cmba-text) !important;
    text-shadow: none !important;
}

/* Header buttons */
body.buddypress #item-header-cover-image .generic-button a,
body.buddypress .groups-header .generic-button a {
    font-family: var(--cmba-font);
    font-size: .8rem;
    font-weight: 600;
    padding: .5rem 1.15rem;
    border-radius: var(--cmba-radius-sm);
    background: var(--cmba-secondary);
    color: #fff !important;
    border: none;
    text-decoration: none;
    cursor: pointer;
    transition: background .25s, transform .15s, box-shadow .25s;
    box-shadow: 0 2px 8px rgba(184, 139, 77, .25);
}

body.buddypress #item-header-cover-image .generic-button a:hover,
body.buddypress .groups-header .generic-button a:hover {
    background: var(--cmba-secondary-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(184, 139, 77, .35);
}

/* ── Group Administrators section ────────────── */
body.buddypress .group-item-actions .moderators-lists {
    margin: 0;
}

body.buddypress .group-item-actions .moderators-lists dt.moderators-title {
    font-family: var(--cmba-font);
    font-size: .65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--cmba-text-muted);
    margin-bottom: .5rem;
    white-space: nowrap;
}

body.buddypress .group-item-actions .moderators-lists dd.user-list {
    margin: 0;
}

body.buddypress .group-item-actions .user-list li {
    display: inline-block;
}

body.buddypress .group-item-actions .moderators-lists img.avatar,
body.buddypress .group-item-actions .user-list img.avatar,
body.buddypress .group-item-actions .user-list a img {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px;
    min-height: 36px;
    border-radius: 50% !important;
    border: 2px solid #e5e7eb !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
    max-width: none !important;
    object-fit: cover;
    transition: border-color .2s, box-shadow .2s;
}

body.buddypress .group-item-actions .user-list img.avatar:hover,
body.buddypress .group-item-actions .user-list a img:hover {
    border-color: var(--cmba-secondary) !important;
    box-shadow: 0 3px 12px rgba(184, 139, 77, .3);
}

/* ── Description below cover image ───────────── */
body.buddypress .groups-header .desc-wrap,
body.buddypress #cover-image-container + .desc-wrap,
body.buddypress .desc-wrap {
    background: var(--cmba-card);
    border: 1px solid var(--cmba-border);
    border-top: none;
    border-radius: 0 0 var(--cmba-radius) var(--cmba-radius);
    margin: 0;
    padding: 1.5rem 2.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .03);
}

body.buddypress .desc-wrap .group-description {
    background: none;
    box-shadow: none;
    padding: 0;
    font-family: var(--cmba-font);
    font-size: .95rem;
    line-height: 1.65;
    color: #444;
}

body.buddypress .desc-wrap .group-description p {
    margin: 0 0 .5rem;
}

/* ── Non-cover header (fallback avatar styling) ── */
body.buddypress .groups-header #item-header-avatar a img,
body.buddypress .groups-header #item-header-avatar img.avatar {
    border-radius: var(--cmba-radius);
    border: 3px solid #e5e7eb;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .1);
    background: #fff;
}

/* ── Responsive description ──────────────────── */
@media screen and (max-width: 782px) {
    body.buddypress .desc-wrap {
        padding: 1.25rem;
    }
}

/* ================================================================
   Navigation — Clean pill-style tabs
   ================================================================ */
body.buddypress .bp-wrap #object-nav {
    background: var(--cmba-card);
    border-radius: var(--cmba-radius);
    margin-top: 1.25rem;
    padding: .65rem 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
    border: 1px solid var(--cmba-border);
    overflow: visible;
}

body.buddypress .bp-wrap #object-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin: 0;
    padding: 0;
}

body.buddypress .bp-wrap #object-nav ul li {
    list-style: none;
    margin: 0;
    background: transparent !important;
}

body.buddypress .bp-wrap #object-nav ul li a {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-family: var(--cmba-font);
    font-size: .88rem;
    font-weight: 500;
    color: var(--cmba-text-muted);
    padding: .6rem 1.15rem;
    border-radius: var(--cmba-radius-sm);
    text-decoration: none;
    transition: all .2s ease;
    border: none;
}

body.buddypress .bp-wrap #object-nav ul li a:hover,
body.buddypress .bp-wrap #object-nav ul li a:focus {
    background: rgba(31, 71, 118, .06);
    color: var(--cmba-primary);
}

/* Active / Selected nav item — gold pill to match screenshot */
body.buddypress .bp-wrap #object-nav ul li.selected a,
body.buddypress .bp-wrap #object-nav ul li.current a,
body.buddypress .bp-wrap #object-nav ul li.selected a:hover,
body.buddypress .bp-wrap #object-nav ul li.current a:hover,
body.buddypress .bp-wrap #object-nav ul li.selected a:focus,
body.buddypress .bp-wrap #object-nav ul li.current a:focus {
    background: var(--cmba-secondary);
    color: #fff;
    font-weight: 600;
}

/* Count badges in nav */
body.buddypress .bp-wrap #object-nav ul li a .count {
    font-size: .7rem;
    font-weight: 700;
    background: rgba(31, 71, 118, .1);
    color: var(--cmba-primary);
    border: none;
    border-radius: 20px;
    padding: .15rem .5rem;
    min-width: 1.2em;
    text-align: center;
}

body.buddypress .bp-wrap #object-nav ul li.selected a .count,
body.buddypress .bp-wrap #object-nav ul li.current a .count {
    background: rgba(255, 255, 255, .3);
    color: #fff;
}

@media screen and (max-width: 46.8em) {
    body.buddypress .bp-wrap #object-nav {
        margin-top: 1rem;
        padding: .5rem;
    }

    body.buddypress .bp-wrap #object-nav ul {
        gap: .25rem;
    }

    body.buddypress .bp-wrap #object-nav ul li a {
        font-size: .78rem;
        padding: .45rem .75rem;
    }
}

/* ================================================================
   Sub-Navigation (filter bars, screen navs)
   ================================================================ */
body.buddypress .buddypress-wrap .bp-subnavs,
body.buddypress .buddypress-wrap .subnav-filters {
    background: transparent;
    margin: 1rem 0;
    overflow: visible;
}

body.buddypress .buddypress-wrap .bp-subnavs ul li a {
    font-family: var(--cmba-font);
    font-size: .82rem;
    color: var(--cmba-text-muted);
    padding: .5rem .9rem;
    border-radius: var(--cmba-radius-sm);
    transition: all .2s;
    border: none;
}

body.buddypress .buddypress-wrap .bp-subnavs ul li a:hover {
    background: rgba(31, 71, 118, .06);
    color: var(--cmba-primary);
}

body.buddypress .buddypress-wrap .bp-subnavs ul li.selected a,
body.buddypress .buddypress-wrap .bp-subnavs ul li.current a {
    background: rgba(31, 71, 118, .08);
    color: var(--cmba-primary);
    font-weight: 600;
}

/* ================================================================
   Item Body — Main content area
   ================================================================ */
body.buddypress .bp-wrap .item-body {
    background: var(--cmba-card);
    border-radius: var(--cmba-radius);
    padding: 2rem 2.5rem;
    margin-top: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
    border: 1px solid var(--cmba-border);
}

/* ================================================================
   Screen Headings inside body
   ================================================================ */
body.buddypress .item-body h2.bp-screen-title,
body.buddypress .item-body .screen-heading {
    font-family: var(--cmba-font);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--cmba-primary);
    margin: 0 0 1.25rem;
    padding-bottom: .75rem;
    border-bottom: 2px solid var(--cmba-border);
    letter-spacing: .01em;
}

/* ================================================================
   Members List inside Group
   ================================================================ */
body.buddypress #members-list {
    display: flex;
    flex-direction: column;
    gap: .65rem;
    padding: 0;
    margin: 0;
}

body.buddypress #members-list li.item-entry {
    list-style: none;
    margin: 0;
    background: var(--cmba-card);
    border: 1px solid var(--cmba-border);
    border-radius: var(--cmba-radius);
    transition: all .25s ease;
    overflow: hidden;
    position: relative;
}

body.buddypress #members-list li.item-entry::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--cmba-primary);
    opacity: 0;
    transition: opacity .25s;
    border-radius: var(--cmba-radius) 0 0 var(--cmba-radius);
}

body.buddypress #members-list li.item-entry:hover {
    border-color: #c8d4e3;
    box-shadow: 0 4px 20px rgba(31, 71, 118, .08), 0 1px 4px rgba(0, 0, 0, .04);
    transform: translateY(-1px);
}

body.buddypress #members-list li.item-entry:hover::before {
    opacity: 1;
}

body.buddypress #members-list li .list-wrap {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.15rem 1.5rem;
}

/* Member avatars */
body.buddypress #members-list .item-avatar {
    flex-shrink: 0;
}

body.buddypress #members-list .item-avatar img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f0f2f5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
    transition: border-color .25s;
}

body.buddypress #members-list li.item-entry:hover .item-avatar img {
    border-color: var(--cmba-primary);
}

/* Member info */
body.buddypress #members-list .item {
    flex: 1;
    min-width: 0;
}

body.buddypress #members-list .item .item-block h3,
body.buddypress #members-list .item .list-title {
    font-family: var(--cmba-font);
    font-size: 1.02rem;
    font-weight: 700;
    margin: 0 0 .2rem;
    line-height: 1.3;
}

body.buddypress #members-list .item .list-title a {
    color: var(--cmba-primary);
    text-decoration: none;
    transition: color .2s;
}

body.buddypress #members-list .item .list-title a:hover {
    color: var(--cmba-primary-light);
}

body.buddypress #members-list .item .joined.item-meta {
    font-size: .8rem;
    color: var(--cmba-text-muted);
    margin: 0;
    padding: 0;
}

/* Member action buttons */
body.buddypress #members-list .action,
body.buddypress #members-list .group-members-actions {
    display: flex;
    gap: .5rem;
    align-items: center;
}

body.buddypress #members-list .generic-button a {
    font-family: var(--cmba-font);
    font-size: .78rem;
    font-weight: 600;
    padding: .4rem .9rem;
    border-radius: var(--cmba-radius-sm);
    background: rgba(31, 71, 118, .08);
    color: var(--cmba-primary);
    border: none;
    text-decoration: none;
    transition: all .2s;
}

body.buddypress #members-list .generic-button a:hover {
    background: var(--cmba-primary);
    color: #fff;
}

/* ================================================================
   Invite Members Screen
   ================================================================ */
body.buddypress .bp-invites-content .item-list li {
    background: var(--cmba-card);
    border: 1px solid var(--cmba-border);
    border-radius: var(--cmba-radius);
    padding: 1rem 1.25rem;
    margin-bottom: .5rem;
    transition: box-shadow .2s;
}

body.buddypress .bp-invites-content .item-list li:hover {
    box-shadow: 0 2px 10px rgba(31, 71, 118, .06);
}

body.buddypress .bp-invites-content .action .generic-button a,
body.buddypress .bp-invites-content .action button {
    font-family: var(--cmba-font);
    font-size: .78rem;
    font-weight: 600;
    padding: .4rem .9rem;
    border-radius: var(--cmba-radius-sm);
    background: var(--cmba-secondary);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: all .2s;
}

body.buddypress .bp-invites-content .action .generic-button a:hover,
body.buddypress .bp-invites-content .action button:hover {
    background: var(--cmba-secondary-light);
}

/* Invite pagination arrows */
body.buddypress .bp-invites-content .bp-pagination .pagination-links a {
    background: var(--cmba-secondary);
    color: #fff;
    border-radius: var(--cmba-radius-sm);
    padding: .4rem .7rem;
}

body.buddypress .bp-invites-content .bp-pagination .pagination-links a:hover {
    background: var(--cmba-secondary-light);
}

/* ================================================================
   Search Forms
   ================================================================ */
body.buddypress .subnav-filters .bp-search form {
    position: relative;
}

body.buddypress .subnav-filters .bp-search input[type="search"],
body.buddypress .subnav-filters .bp-search input[type="text"] {
    font-family: var(--cmba-font);
    font-size: .88rem;
    padding: .65rem 1rem .65rem 2.5rem;
    border: 2px solid var(--cmba-border);
    border-radius: 10px;
    background: var(--cmba-card);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    color: var(--cmba-text);
    width: 100%;
    box-sizing: border-box;
}

body.buddypress .subnav-filters .bp-search input:focus {
    border-color: var(--cmba-secondary);
    box-shadow: 0 0 0 3px rgba(184, 139, 77, .08);
}

body.buddypress .subnav-filters .bp-search input::placeholder {
    color: #9ca3af;
}

body.buddypress .subnav-filters .bp-search button[type="submit"] {
    position: absolute;
    left: .75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--cmba-text-muted);
    cursor: pointer;
    padding: 0;
}

/* ================================================================
   Select / Filter Dropdowns
   ================================================================ */
body.buddypress .subnav-filters select,
body.buddypress .buddypress-wrap select {
    font-family: var(--cmba-font);
    font-size: .85rem;
    padding: .55rem .75rem;
    border: 2px solid var(--cmba-border);
    border-radius: 10px;
    background: var(--cmba-card);
    color: var(--cmba-text);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M2.22 4.47a.75.75 0 011.06 0L6 7.19l2.72-2.72a.75.75 0 011.06 1.06l-3.25 3.25a.75.75 0 01-1.06 0L2.22 5.53a.75.75 0 010-1.06z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .75rem center;
    background-size: 12px;
    padding-right: 2rem;
}

body.buddypress .subnav-filters select:focus,
body.buddypress .buddypress-wrap select:focus {
    border-color: var(--cmba-secondary);
    box-shadow: 0 0 0 3px rgba(184, 139, 77, .08);
}

/* ================================================================
   Buttons (global)
   ================================================================ */
body.buddypress .buddypress-wrap input[type="submit"],
body.buddypress .buddypress-wrap input[type="button"],
body.buddypress .buddypress-wrap button.submit,
body.buddypress .buddypress-wrap a.button {
    font-family: var(--cmba-font);
    font-size: .85rem;
    font-weight: 600;
    padding: .6rem 1.4rem;
    border-radius: var(--cmba-radius-sm);
    background: var(--cmba-secondary);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background .25s, transform .15s, box-shadow .25s;
    text-decoration: none;
    letter-spacing: .01em;
}

body.buddypress .buddypress-wrap input[type="submit"]:hover,
body.buddypress .buddypress-wrap input[type="button"]:hover,
body.buddypress .buddypress-wrap button.submit:hover,
body.buddypress .buddypress-wrap a.button:hover {
    background: var(--cmba-secondary-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(184, 139, 77, .25);
}

/* Danger / destructive buttons */
body.buddypress .buddypress-wrap .danger a,
body.buddypress .buddypress-wrap a.confirm {
    background: #dc2626;
    color: #fff;
}

body.buddypress .buddypress-wrap .danger a:hover,
body.buddypress .buddypress-wrap a.confirm:hover {
    background: #b91c1c;
}

/* ================================================================
   Pagination
   ================================================================ */
body.buddypress .bp-pagination {
    font-family: var(--cmba-font);
    font-size: .82rem;
    color: var(--cmba-text-muted);
    padding: .75rem 0;
    border-top: 1px solid var(--cmba-border);
    margin-top: 1rem;
}

body.buddypress .bp-pagination .pag-count {
    font-weight: 500;
}

body.buddypress .bp-pagination .pagination-links a,
body.buddypress .bp-pagination .pagination-links span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 .5rem;
    border-radius: var(--cmba-radius-sm);
    font-size: .82rem;
    font-weight: 500;
    text-decoration: none;
    transition: all .2s;
}

body.buddypress .bp-pagination .pagination-links a {
    color: var(--cmba-primary);
    background: rgba(31, 71, 118, .06);
}

body.buddypress .bp-pagination .pagination-links a:hover {
    background: var(--cmba-primary);
    color: #fff;
}

body.buddypress .bp-pagination .pagination-links span.current {
    background: var(--cmba-primary);
    color: #fff;
    font-weight: 700;
}

/* ================================================================
   Notices / Feedback Messages
   ================================================================ */
body.buddypress .bp-feedback {
    font-family: var(--cmba-font);
    border-radius: var(--cmba-radius-sm);
    padding: 1rem 1.5rem;
    margin: 1rem 0;
    font-size: .9rem;
    line-height: 1.5;
    border: 1px solid var(--cmba-border);
    background: #f9fafb;
}

body.buddypress .bp-feedback.info {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: var(--cmba-primary);
}

body.buddypress .bp-feedback.success {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: var(--cmba-accent);
}

body.buddypress .bp-feedback.error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}

body.buddypress .bp-feedback.loading {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

/* ================================================================
   Activity Stream inside Group
   ================================================================ */
body.buddypress .activity-list {
    padding: 0;
    margin: 0;
}

body.buddypress .activity-list li.activity-item {
    list-style: none;
    background: var(--cmba-card);
    border: 1px solid var(--cmba-border);
    border-radius: var(--cmba-radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: .75rem;
    transition: box-shadow .25s;
}

body.buddypress .activity-list li.activity-item:hover {
    box-shadow: 0 2px 12px rgba(31, 71, 118, .06);
}

body.buddypress .activity-list .activity-avatar img {
    border-radius: 50%;
    border: 2px solid #f0f2f5;
}

body.buddypress .activity-list .activity-header {
    font-family: var(--cmba-font);
    font-size: .9rem;
    color: var(--cmba-text);
    line-height: 1.5;
}

body.buddypress .activity-list .activity-header a {
    color: var(--cmba-primary);
    font-weight: 600;
    text-decoration: none;
}

body.buddypress .activity-list .activity-header a:hover {
    text-decoration: underline;
    text-decoration-color: var(--cmba-secondary);
}

body.buddypress .activity-list .activity-inner {
    font-size: .9rem;
    color: #444;
    line-height: 1.65;
    margin-top: .5rem;
}

body.buddypress .activity-list .activity-meta {
    margin-top: .75rem;
    padding-top: .75rem;
    border-top: 1px solid var(--cmba-border);
}

body.buddypress .activity-list .activity-meta a {
    font-family: var(--cmba-font);
    font-size: .78rem;
    font-weight: 600;
    color: var(--cmba-text-muted);
    text-decoration: none;
    padding: .3rem .6rem;
    border-radius: var(--cmba-radius-sm);
    transition: all .2s;
}

body.buddypress .activity-list .activity-meta a:hover {
    background: rgba(31, 71, 118, .06);
    color: var(--cmba-primary);
}

/* ================================================================
   Admin / Settings Sections inside Group
   ================================================================ */
body.buddypress .group-settings-selections {
    font-family: var(--cmba-font);
}

body.buddypress .group-settings-selections fieldset {
    border: 1px solid var(--cmba-border);
    border-radius: var(--cmba-radius);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}

body.buddypress .group-settings-selections legend {
    font-family: var(--cmba-font);
    font-size: .85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--cmba-primary);
    padding: 0 .5rem;
}

body.buddypress .group-settings-selections label {
    font-size: .9rem;
    color: var(--cmba-text);
    cursor: pointer;
}

/* Textareas & text inputs in admin/settings screens */
body.buddypress .buddypress-wrap input[type="text"],
body.buddypress .buddypress-wrap input[type="email"],
body.buddypress .buddypress-wrap input[type="url"],
body.buddypress .buddypress-wrap textarea {
    font-family: var(--cmba-font);
    font-size: .9rem;
    padding: .65rem 1rem;
    border: 2px solid var(--cmba-border);
    border-radius: 10px;
    background: var(--cmba-card);
    color: var(--cmba-text);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    width: 100%;
    box-sizing: border-box;
}

body.buddypress .buddypress-wrap input[type="text"]:focus,
body.buddypress .buddypress-wrap input[type="email"]:focus,
body.buddypress .buddypress-wrap input[type="url"]:focus,
body.buddypress .buddypress-wrap textarea:focus {
    border-color: var(--cmba-secondary);
    box-shadow: 0 0 0 3px rgba(184, 139, 77, .08);
}

/* ================================================================
   Send Invites Screen
   ================================================================ */
body.buddypress #send-invite-form .invite-list li {
    background: var(--cmba-card);
    border: 1px solid var(--cmba-border);
    border-radius: var(--cmba-radius-sm);
    padding: .75rem;
    margin-bottom: .5rem;
}

/* ================================================================
   Group Request Membership / Requests
   ================================================================ */
body.buddypress .membership-requests-list li {
    background: var(--cmba-card);
    border: 1px solid var(--cmba-border);
    border-radius: var(--cmba-radius);
    padding: 1.15rem 1.5rem;
    margin-bottom: .65rem;
}

/* ================================================================
   BuddyPress Container Resets
   ================================================================ */
body.buddypress .bp-wrap {
    border: none;
    box-shadow: none;
}

body.buddypress .buddypress-wrap.bp-dir-hori-nav:not(.bp-vertical-navs) nav:not(.tabbed-links) {
    border: none !important;
    box-shadow: none !important;
}

/* ================================================================
   Links — accent underline on hover
   ================================================================ */
body.buddypress .buddypress-wrap a {
    color: var(--cmba-primary);
    transition: color .2s;
}

body.buddypress .buddypress-wrap a:hover {
    color: var(--cmba-primary-light);
}

body.buddypress .item-body a:not(.button):not(.generic-button):not([class*="btn"]) {
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color .2s, color .2s;
}

body.buddypress .item-body a:not(.button):not(.generic-button):not([class*="btn"]):hover {
    border-bottom-color: var(--cmba-secondary);
}

/* ================================================================
   Responsive: Full-width stacking
   ================================================================ */
@media screen and (max-width: 46.8em) {
    body.buddypress .buddypress-wrap {
        padding: 0 1rem 2rem;
    }

    body.buddypress .bp-wrap .item-body {
        padding: 1.25rem;
    }

    body.buddypress #members-list li .list-wrap {
        flex-direction: column;
        text-align: center;
        gap: .75rem;
        padding: 1rem;
    }
}

/* ================================================================
   Scrollbar styling (webkit)
   ================================================================ */
body.buddypress .buddypress-wrap ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

body.buddypress .buddypress-wrap ::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

body.buddypress .buddypress-wrap ::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

body.buddypress .buddypress-wrap ::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
