/* IMADAhub — visual-only BuddyPress overrides.
   Scoped to #buddypress + BP body classes to avoid theme collisions.
   No data collection. No external requests. */

/* ---------- Design tokens (swap here to rebrand) ---------- */
:root {
    --imadahub-primary:          #1A1A1A;  /* near-black */
    --imadahub-primary-hover:    #000000;
    --imadahub-primary-soft:     #EEEDE9;  /* warm neutral */
    --imadahub-accent:           #141414;

    --imadahub-surface:          #FFFFFF;
    --imadahub-surface-alt:      #F7F5F1;  /* warm neutral, not FB blue */
    --imadahub-surface-hover:    #EDEBE5;

    --imadahub-text:             #1A1A1A;
    --imadahub-text-secondary:   #585858;
    --imadahub-text-muted:       #8A8A8A;

    --imadahub-border:           #D6D3CE;
    --imadahub-border-soft:      #E8E6E2;

    --imadahub-shadow-sm:        none;
    --imadahub-shadow-md:        0 1px 2px rgba(0,0,0,.04);
    --imadahub-shadow-lg:        0 4px 12px rgba(0,0,0,.06);

    --imadahub-radius-sm:        2px;
    --imadahub-radius:           3px;
    --imadahub-radius-lg:        4px;
    --imadahub-radius-full:      999px;

    --imadahub-gap-xs:           6px;
    --imadahub-gap-sm:           10px;
    --imadahub-gap:              18px;
    --imadahub-gap-lg:           28px;

    --imadahub-font:             -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                            Helvetica, Arial, sans-serif, "Apple Color Emoji",
                            "Segoe UI Emoji";
    --imadahub-font-serif:       Georgia, "Iowan Old Style", "Palatino Linotype",
                            Cambria, serif;
    --imadahub-font-size:        16px;
    --imadahub-line-height:      1.5;
    --imadahub-feed-width:       980px;
}

/* ---------- Logo treatment ---------- */
.imadahub-logo,
img.imadahub-logo,
a.imadahub-logo > img {
    display: inline-block;
    background: #FFFFFF;
    border-radius: var(--imadahub-radius-full);
    padding: 6px;
    box-sizing: content-box;
    box-shadow: var(--imadahub-shadow-sm);
    vertical-align: middle;
}

.imadahub-logo--sm { width: 32px; height: 32px; }
.imadahub-logo--md { width: 48px; height: 48px; }
.imadahub-logo--lg { width: 96px; height: 96px; }

/* ---------- Global surface ---------- */
body.buddypress,
body.bp-user,
body[class*="buddypress"] {
    background: var(--imadahub-surface-alt);
    font-family: var(--imadahub-font);
    font-size: var(--imadahub-font-size);
    line-height: var(--imadahub-line-height);
    color: var(--imadahub-text);
}

#buddypress {
    max-width: var(--imadahub-feed-width);
    margin: var(--imadahub-gap-lg) auto;
    padding: 0 var(--imadahub-gap);
    color: var(--imadahub-text);
}

#buddypress a {
    color: var(--imadahub-primary);
    text-decoration: none;
}

#buddypress a:hover {
    text-decoration: underline;
}

/* ---------- Cards ---------- */
#buddypress #whats-new-form,
#buddypress .activity-list > li,
#buddypress .bp-widget,
#buddypress .bp-messages-content,
#buddypress .dir-form,
#buddypress #members-list > li,
#buddypress #groups-list > li,
#buddypress #friends-list > li {
    background: var(--imadahub-surface);
    border: 1px solid var(--imadahub-border-soft);
    border-radius: var(--imadahub-radius-lg);
    box-shadow: none;
    padding: var(--imadahub-gap);
    margin-bottom: var(--imadahub-gap);
}

/* ---------- Avatars ---------- */
#buddypress img.avatar,
#buddypress .avatar img,
.bp-user img.avatar {
    border-radius: var(--imadahub-radius-full);
    object-fit: cover;
}

#buddypress #item-header-avatar img.avatar {
    width: 168px;
    height: 168px;
    border: 4px solid var(--imadahub-surface);
    box-shadow: var(--imadahub-shadow-md);
}

/* ---------- Composer ("Hvad tænker du på?") ---------- */
#buddypress #whats-new-form {
    position: relative;
    padding: var(--imadahub-gap-lg) var(--imadahub-gap) var(--imadahub-gap)
             calc(var(--imadahub-gap) + 44px + var(--imadahub-gap-sm));
    min-height: calc(44px + 2 * var(--imadahub-gap));
}

#buddypress #whats-new-form label,
#buddypress #whats-new-form h5,
#buddypress #whats-new-form > legend,
#buddypress #whats-new-form .whats-new-form-label {
    display: block;
    margin: 0 0 var(--imadahub-gap-sm);
    padding: 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--imadahub-text);
}

/* Anchor the composer avatar inside the padded gutter so it can't overflow. */
#buddypress #whats-new-form #whats-new-avatar,
#buddypress #whats-new-form .whats-new-avatar,
#buddypress #whats-new-form .activity-avatar {
    position: absolute !important;
    left: var(--imadahub-gap) !important;
    top: var(--imadahub-gap) !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

#buddypress #whats-new-form #whats-new-avatar img,
#buddypress #whats-new-form .whats-new-avatar img,
#buddypress #whats-new-form .activity-avatar img {
    width: 44px;
    height: 44px;
    border-radius: var(--imadahub-radius-full);
    display: block;
}

#buddypress #whats-new {
    width: 100%;
    min-height: 96px;
    border: 1px solid var(--imadahub-border);
    background: var(--imadahub-surface);
    border-radius: var(--imadahub-radius);
    padding: 12px 14px;
    font-family: inherit;
    font-size: 16px;
    color: var(--imadahub-text);
    resize: vertical;
    transition: border-color .15s ease, box-shadow .15s ease;
}

#buddypress #whats-new:focus {
    outline: none;
    border-color: var(--imadahub-primary);
    box-shadow: 0 0 0 3px var(--imadahub-primary-soft);
}

/* Keep BP Nouveau composer chrome visible regardless of focus state */
#buddypress #whats-new-form #whats-new-options,
#buddypress #whats-new-form #whats-new-submit,
#buddypress #whats-new-form .whats-new-toolbar,
#buddypress #whats-new-form #aw-whats-new-submit,
#buddypress #whats-new-form .in-profile.not-visible,
#buddypress form#whats-new-form.not-submitted #whats-new-options,
#buddypress form#whats-new-form #whats-new-post-in-box-items {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    height: auto !important;
}

#buddypress #whats-new::placeholder {
    color: var(--imadahub-text-secondary);
}

#buddypress #whats-new-submit,
#buddypress #whats-new-form #aw-whats-new-submit {
    background: var(--imadahub-primary);
    color: #fff;
    border: none;
    border-radius: var(--imadahub-radius);
    padding: 8px 20px;
    font-weight: 600;
}

/* ---------- Activity items ---------- */
#buddypress .activity-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

#buddypress .activity-list > li {
    position: relative;
    padding: var(--imadahub-gap) var(--imadahub-gap) var(--imadahub-gap)
             calc(var(--imadahub-gap) + 44px + var(--imadahub-gap-sm));
    min-height: calc(44px + 2 * var(--imadahub-gap));
}

#buddypress .activity-list > li > .activity-avatar,
#buddypress .activity-list > li .activity-avatar {
    position: absolute !important;
    left: var(--imadahub-gap) !important;
    top: var(--imadahub-gap) !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
    max-width: none !important;
}

#buddypress .activity-avatar img.avatar {
    width: 44px;
    height: 44px;
    margin: 0;
}

#buddypress .activity-header {
    font-size: 15px;
    color: var(--imadahub-text);
}

#buddypress .activity-header a {
    font-weight: 600;
    color: var(--imadahub-text);
}

#buddypress .activity-header .time-since,
#buddypress .activity-header .activity-date {
    color: var(--imadahub-text-secondary);
    font-size: 13px;
}

#buddypress .activity-inner,
#buddypress .activity-content {
    margin-top: var(--imadahub-gap-sm);
    font-size: 15px;
    color: var(--imadahub-text);
    line-height: 1.4;
}

#buddypress .activity-meta {
    margin-top: var(--imadahub-gap-sm);
    padding-top: var(--imadahub-gap-sm);
    border-top: 1px solid var(--imadahub-border-soft);
    display: flex;
    gap: var(--imadahub-gap-xs);
}

#buddypress .activity-meta a.button,
#buddypress .activity-meta .generic-button a {
    flex: 0 0 auto;
    text-align: left;
    background: transparent;
    border: none;
    padding: 4px 10px;
    border-radius: var(--imadahub-radius);
    color: var(--imadahub-text-secondary);
    font-weight: 500;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: color .15s ease;
}

#buddypress .activity-meta a.button:hover,
#buddypress .activity-meta .generic-button a:hover {
    background: transparent;
    color: var(--imadahub-primary);
    text-decoration: none;
}

#buddypress .activity-comments {
    margin-top: var(--imadahub-gap-sm);
    padding-top: var(--imadahub-gap-sm);
    border-top: 1px solid var(--imadahub-border-soft);
    background: transparent;
}

#buddypress .activity-comments li {
    background: var(--imadahub-surface-alt);
    border-radius: var(--imadahub-radius-lg);
    padding: var(--imadahub-gap-sm) 12px;
    margin-bottom: var(--imadahub-gap-xs);
}

#buddypress .activity-comments .acomment-content {
    background: transparent;
    padding: 0;
}

/* ---------- Embedded cards inside activity items (friendship, etc.) ----------
   Without these overrides the directory-grid styles bleed into embedded
   member/group cards rendered inside an activity, producing huge centered
   avatars and mis-aligned action buttons. */
#buddypress .activity-inner .item,
#buddypress .activity-content .item {
    display: flex;
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: var(--imadahub-gap);
    padding: var(--imadahub-gap-sm) 0;
    background: transparent;
    border: none;
    box-shadow: none;
    margin: 0;
}

#buddypress .activity-inner .item-avatar,
#buddypress .activity-content .item-avatar {
    margin: 0;
    flex: 0 0 auto;
}

#buddypress .activity-inner .item-avatar img.avatar,
#buddypress .activity-content .item-avatar img.avatar {
    width: 48px;
    height: 48px;
}

#buddypress .activity-inner .item-title,
#buddypress .activity-content .item-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

#buddypress .activity-inner .item-meta,
#buddypress .activity-content .item-meta {
    font-size: 13px;
    color: var(--imadahub-text-secondary);
    margin: 2px 0 0;
}

#buddypress .activity-inner .generic-button,
#buddypress .activity-content .generic-button {
    margin-left: auto;
    flex: 0 0 auto;
}

#buddypress .activity-inner .generic-button a,
#buddypress .activity-content .generic-button a {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
}

/* ---------- Hide low-signal activity items from the feed ----------
   Keeps: status updates, posts, comments, replies, @mentions.
   Hides: friendship events, new member sign-ups, avatar/profile edits,
          group-join/create events. Scope-safe (visual-only). */
#buddypress .activity-list > li.friendship_created,
#buddypress .activity-list > li.friends,
#buddypress .activity-list > li.new_member,
#buddypress .activity-list > li.updated_profile,
#buddypress .activity-list > li.new_avatar,
#buddypress .activity-list > li.joined_group,
#buddypress .activity-list > li.created_group,
#buddypress .activity-list > li.left_group,
#buddypress .activity-list > li[data-bp-activity-type="friendship_created"],
#buddypress .activity-list > li[data-bp-activity-type="friends"],
#buddypress .activity-list > li[data-bp-activity-type="new_member"],
#buddypress .activity-list > li[data-bp-activity-type="updated_profile"],
#buddypress .activity-list > li[data-bp-activity-type="new_avatar"],
#buddypress .activity-list > li[data-bp-activity-type="joined_group"],
#buddypress .activity-list > li[data-bp-activity-type="created_group"],
#buddypress .activity-list > li[data-bp-activity-type="left_group"] {
    display: none !important;
}

/* ---------- Hide directory filter bar (RSS link + "Vis:" dropdown) ---------- */
#buddypress .component-filters,
#buddypress #subnav.item-list-tabs.no-ajax,
#buddypress #subnav.no-ajax,
#buddypress li#activity-filter-select,
#buddypress li#members-order-select,
#buddypress li#groups-order-select,
#buddypress li#friends-order-select,
#buddypress .dir-search ~ .item-list-tabs.no-ajax,
#buddypress .feed,
#buddypress .rss-link,
#buddypress a.rss,
#buddypress a.bp-feed,
#buddypress .bp-feed-link {
    display: none !important;
}

/* ---------- Buttons ---------- */
#buddypress .button,
#buddypress button.button,
#buddypress input[type="submit"],
#buddypress a.button,
#buddypress button[type="submit"] {
    background: var(--imadahub-primary);
    color: #fff;
    border: none;
    border-radius: var(--imadahub-radius);
    padding: 8px 16px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: background .15s ease;
    text-transform: none;
    line-height: 1.2;
}

#buddypress .button:hover,
#buddypress button.button:hover,
#buddypress input[type="submit"]:hover,
#buddypress a.button:hover {
    background: var(--imadahub-primary-hover);
    color: #fff;
    text-decoration: none;
}

#buddypress .button.outline,
#buddypress .generic-button.outline a {
    background: var(--imadahub-surface-alt);
    color: var(--imadahub-text);
}

#buddypress .button.outline:hover {
    background: var(--imadahub-border-soft);
}

/* ---------- Navigation tabs (profiles, groups, directories) ---------- */

/* Hide the BP "Profile" (xprofile) main nav item — profile editing
   options are surfaced under Settings via the Navigation class instead. */
#buddypress .bp-navs li#user-xprofile,
#buddypress .bp-navs li#user-profile,
#buddypress .item-list-tabs li#user-xprofile,
#buddypress .item-list-tabs li#user-profile {
    display: none !important;
}

#buddypress .bp-navs,
#buddypress .item-list-tabs {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--imadahub-border);
    box-shadow: none;
    padding: 0;
    margin-bottom: var(--imadahub-gap-lg);
    overflow: visible;
}

#buddypress .bp-navs ul,
#buddypress .item-list-tabs ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
}

#buddypress .bp-navs li,
#buddypress .item-list-tabs li {
    background: transparent;
    border: none;
    margin: 0;
}

#buddypress .bp-navs li a,
#buddypress .item-list-tabs li a {
    display: block;
    padding: 12px 18px;
    border-radius: 0;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    color: var(--imadahub-text-secondary);
    font-weight: 500;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: color .15s ease, border-color .15s ease;
}

#buddypress .bp-navs li a:hover,
#buddypress .item-list-tabs li a:hover {
    background: transparent;
    color: var(--imadahub-text);
    text-decoration: none;
}

#buddypress .bp-navs li.current a,
#buddypress .bp-navs li.selected a,
#buddypress .item-list-tabs li.current a,
#buddypress .item-list-tabs li.selected a {
    background: transparent;
    color: var(--imadahub-primary);
    border-bottom-color: var(--imadahub-primary);
}

#buddypress .bp-navs li a span,
#buddypress .item-list-tabs li a span {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: var(--imadahub-radius-sm);
    background: transparent;
    color: var(--imadahub-text-muted);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0;
}

#buddypress .bp-navs li.current a span,
#buddypress .bp-navs li.selected a span {
    background: transparent;
    color: var(--imadahub-primary);
}

/* ---------- Profile / group header ---------- */
#buddypress #item-header {
    display: block;
    position: relative;
    background: var(--imadahub-surface);
    border: 1px solid var(--imadahub-border-soft);
    border-radius: var(--imadahub-radius-lg);
    box-shadow: none;
    padding: 0;
    margin-bottom: var(--imadahub-gap);
    overflow: hidden;
}

/* Cover container: don't impose layout. Carries the fallback gradient
   sized to the top 200px so it only shows in the cover-banner area when
   no cover photo is uploaded. */
#buddypress #cover-image-container {
    position: relative;
    overflow: visible;
    background-color: transparent;
    background-image: linear-gradient(135deg,
        var(--imadahub-surface-alt) 0%,
        var(--imadahub-primary-soft) 100%);
    background-repeat: no-repeat;
    background-size: 100% 200px;
    background-position: top left;
    padding: 0;
    margin: 0;
}

/* Cover image: a natural-flow 200px block at the top of the card. BP
   injects the user's cover URL inline as background-image — we leave that
   property untouched (no !important on it) so BP always wins. When no
   cover is uploaded, this element is transparent and the parent's
   fallback gradient shows through. */
#buddypress #header-cover-image {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    display: block !important;
    width: 100% !important;
    height: 200px !important;
    margin: 0 !important;
    background-color: transparent;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}

/* Avatar: floats over the cover/content seam with -48px overlap. */
#buddypress #item-header-avatar {
    float: left !important;
    margin: -48px 0 var(--imadahub-gap-sm) var(--imadahub-gap-lg) !important;
    padding: 0 !important;
    position: relative;
    z-index: 10;
}

#buddypress #item-header-avatar img.avatar {
    display: block;
    width: 128px;
    height: 128px;
    border-radius: 50%;
    border: 4px solid var(--imadahub-surface);
    box-shadow: var(--imadahub-shadow-md);
    object-fit: cover;
    box-sizing: border-box;
    background: var(--imadahub-surface);
}

/* Content panel: a floating white card sitting below the cover, to the
   right of the avatar. Detached from the card edges so its shadow has
   room to breathe. Note: NO backdrop-filter / transform / filter here —
   those create a containing block that traps the absolute-positioned
   .imadahub-status-wrap descendant inside this panel. */
#buddypress #item-header-content {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin: 48px var(--imadahub-gap-lg) var(--imadahub-gap-lg)
            calc(128px + var(--imadahub-gap-lg));
    padding: var(--imadahub-gap) var(--imadahub-gap-lg);
    background: var(--imadahub-surface);
    border: none;
    border-radius: var(--imadahub-radius);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    min-height: calc(128px - 48px);
}

/* Display name (rendered by Identity class) sits above BP's
   @mentionname h2 via flex ordering, despite coming later in source. */
#buddypress #item-header-content .imadahub-display-name {
    order: -1;
    font-family: var(--imadahub-font) !important;
    font-size: 28px !important;
    font-weight: 700 !important;
    color: var(--imadahub-text) !important;
    letter-spacing: -0.01em;
    line-height: 1.2;
    margin: 0 0 var(--imadahub-gap-xs);
}

/* Status caption: floats on the cover photo as a frosted-glass bubble in
   the top-right of the card. Anchored to #item-header (which is position:
   relative), so it works whether or not #cover-image-container exists. */
#buddypress #item-header .imadahub-status-wrap {
    position: absolute !important;
    top: var(--imadahub-gap) !important;
    right: var(--imadahub-gap-lg) !important;
    left: auto !important;
    bottom: auto !important;
    max-width: 360px;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--imadahub-gap-xs);
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: none;
}

#buddypress #item-header .imadahub-status-wrap > * {
    pointer-events: auto;
}

#buddypress #item-header .imadahub-status-wrap .imadahub-status {
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-left: none;
    border-radius: var(--imadahub-radius);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    color: var(--imadahub-text) !important;
    font-style: normal !important;
    padding: 8px 12px;
    margin: 0;
    max-width: 100%;
}

#buddypress #item-header .imadahub-status-wrap .imadahub-status--empty {
    background: rgba(255, 255, 255, 0.75);
    color: var(--imadahub-text-secondary) !important;
}

#buddypress #item-header .imadahub-status-wrap .imadahub-status-edit {
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    margin-left: 0;
}

#buddypress #item-header .imadahub-status-wrap .imadahub-status-form {
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    padding: var(--imadahub-gap-sm);
    border-radius: var(--imadahub-radius);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    margin-top: 0;
    max-width: 100%;
}

#buddypress #item-header::after {
    content: "";
    display: block;
    clear: both;
}

/* BP Legacy adds padding-bottom: 20px on #item-header and margin-bottom: 10px
   on #cover-image-container by default. With our card skin those show as an
   empty white band below the content. */
body.bp-legacy #buddypress #item-header {
    padding-bottom: 0 !important;
}

body.bp-legacy #buddypress #cover-image-container {
    margin-bottom: 0 !important;
}

/* BP Legacy renders structural wrapper divs (#item-buttons, #item-meta,
   and an "active X ago" .activity span) that are often empty for the
   profile owner — they leave a big blank band below the cover. Hide them
   when empty, and always hide the redundant "active X ago" since we show
   our own Status field. */
body.bp-legacy #buddypress #item-header #item-buttons:empty,
body.bp-legacy #buddypress #item-header #item-meta:empty,
body.bp-legacy #buddypress #item-header-content #item-buttons:empty,
body.bp-legacy #buddypress #item-header-content #item-meta:empty,
body.bp-legacy #buddypress #item-header > div:empty,
body.bp-legacy #buddypress #item-header-content > div:empty,
body.bp-legacy #buddypress #item-header-content > p:empty {
    display: none !important;
}

#buddypress #item-header-content > span.activity,
#buddypress #item-header-content .user-nicename + span.activity,
#buddypress #item-header-content h2 + span.activity,
body.bp-legacy #buddypress #item-header-content span.activity {
    display: none !important;
}

/* All header text: sans-serif, readable, no italic, no text-shadow, no
   theme-injected color tints. */
#buddypress #item-header-content,
#buddypress #item-header-content *,
#buddypress #item-header #item-header-content,
#buddypress #item-header #item-header-content * {
    font-family: var(--imadahub-font) !important;
    font-style: normal !important;
    text-shadow: none !important;
    opacity: 1 !important;
    filter: none !important;
    -webkit-text-stroke: 0 !important;
}

#buddypress #item-header-content,
#buddypress #item-header-content > h2,
#buddypress #item-header-content > .item-title,
#buddypress #item-header-content .user-nicename,
#buddypress #item-header-content h3,
#buddypress #item-header-content a {
    color: var(--imadahub-text) !important;
}

#buddypress #item-header-content h2,
#buddypress #item-header-content .item-title {
    font-family: var(--imadahub-font) !important;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--imadahub-text) !important;
    margin: 0 0 var(--imadahub-gap-xs);
    line-height: 1.2;
}

#buddypress #item-header-content h2 a,
#buddypress #item-header-content .item-title a {
    color: var(--imadahub-text) !important;
}

#buddypress #item-header-content .user-nicename,
#buddypress #item-header-content h2.user-nicename,
#buddypress #item-header-content h3:not(.imadahub-display-name),
#buddypress #item-header-content .item-meta {
    font-weight: 400 !important;
    color: var(--imadahub-text-secondary) !important;
    font-size: 14px !important;
    letter-spacing: 0 !important;
    line-height: 1.4 !important;
    margin: 2px 0 var(--imadahub-gap-xs) !important;
}

/* Hide BP's auto-rendered "latest activity" excerpt (timestamp + snippet) in
   the profile header. Replaced by the editable Status field (see PHP). */
#buddypress #latest-update,
#buddypress p#latest-update,
#buddypress #item-header p#latest-update,
#buddypress #item-header-content p#latest-update,
#buddypress #item-header .activity-read-more,
#buddypress #item-header-content .activity-read-more,
#buddypress #item-header .time-since,
#buddypress #item-header-content .time-since,
#buddypress #item-header-content span.time-since,
#buddypress #item-header p .time-since,
#buddypress #item-header-content [id^="latest-update"],
#buddypress #item-header-content [class*="latest-update"],
#buddypress .item-header-wrap #latest-update,
#buddypress .item-header-wrap .activity-read-more,
#buddypress .item-header-wrap .time-since,
#buddypress .bp-member-header #latest-update,
#buddypress .bp-member-header .activity-read-more,
#buddypress .bp-member-header .time-since {
    display: none !important;
}

/* Editable status shown in header */
#buddypress #item-header-content .imadahub-status {
    margin: var(--imadahub-gap-xs) 0 var(--imadahub-gap-sm);
    padding: 8px 12px;
    background: var(--imadahub-surface-alt);
    border-left: 3px solid var(--imadahub-border);
    border-radius: var(--imadahub-radius-sm);
    font-size: 15px;
    color: var(--imadahub-text) !important;
    font-style: italic !important;
    max-width: 540px;
}

#buddypress #item-header-content .imadahub-status--empty {
    color: var(--imadahub-text-muted) !important;
    background: transparent;
    border-left-color: var(--imadahub-border-soft);
}

#buddypress #item-header-content .imadahub-status-edit {
    display: inline-block;
    margin-left: var(--imadahub-gap-xs);
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--imadahub-text-secondary) !important;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid var(--imadahub-border);
    padding: 3px 8px;
    border-radius: var(--imadahub-radius-sm);
    background: transparent;
    font-family: inherit;
}

#buddypress #item-header-content .imadahub-status-edit:hover {
    border-color: var(--imadahub-text);
    color: var(--imadahub-text) !important;
}

#buddypress #item-header-content .imadahub-status-form {
    display: flex;
    gap: var(--imadahub-gap-xs);
    margin-top: var(--imadahub-gap-xs);
    align-items: center;
    flex-wrap: wrap;
    max-width: 600px;
}

#buddypress #item-header-content .imadahub-status-input {
    flex: 1 1 280px;
    min-width: 200px;
    padding: 8px 12px;
    border: 1px solid var(--imadahub-border);
    border-radius: var(--imadahub-radius);
    font-family: var(--imadahub-font) !important;
    font-size: 15px;
    color: var(--imadahub-text) !important;
    background: var(--imadahub-surface);
}

#buddypress #item-header-content .imadahub-status-input:focus {
    outline: none;
    border-color: var(--imadahub-text);
    box-shadow: 0 0 0 3px var(--imadahub-primary-soft);
}

#buddypress #item-header-content .imadahub-status-save,
#buddypress #item-header-content .imadahub-status-cancel {
    flex: 0 0 auto;
    padding: 6px 14px;
    font-size: 13px;
}


/* ---------- Directory listings (members, groups) ---------- */
#buddypress #members-list,
#buddypress #groups-list,
#buddypress #friends-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--imadahub-gap);
}

#buddypress #members-list > li,
#buddypress #groups-list > li,
#buddypress #friends-list > li {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--imadahub-gap);
}

#buddypress #members-list .item-avatar,
#buddypress #groups-list .item-avatar,
#buddypress #friends-list .item-avatar {
    margin-bottom: var(--imadahub-gap-sm);
}

#buddypress #members-list .item-avatar img.avatar,
#buddypress #groups-list .item-avatar img.avatar {
    width: 96px;
    height: 96px;
}

#buddypress #members-list .item-title,
#buddypress #groups-list .item-title {
    font-weight: 600;
    font-size: 16px;
    color: var(--imadahub-text);
    margin-bottom: var(--imadahub-gap-xs);
}

#buddypress #members-list .item-meta,
#buddypress #groups-list .item-meta {
    font-size: 13px;
    color: var(--imadahub-text-secondary);
}

/* ---------- Forms ---------- */
#buddypress input[type="text"],
#buddypress input[type="email"],
#buddypress input[type="url"],
#buddypress input[type="password"],
#buddypress input[type="search"],
#buddypress textarea,
#buddypress select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--imadahub-border);
    border-radius: var(--imadahub-radius);
    background: var(--imadahub-surface);
    font-family: inherit;
    font-size: 15px;
    color: var(--imadahub-text);
    transition: border-color .15s ease, box-shadow .15s ease;
}

#buddypress input[type="text"]:focus,
#buddypress input[type="email"]:focus,
#buddypress input[type="url"]:focus,
#buddypress input[type="password"]:focus,
#buddypress input[type="search"]:focus,
#buddypress textarea:focus,
#buddypress select:focus {
    outline: none;
    border-color: var(--imadahub-primary);
    box-shadow: 0 0 0 3px var(--imadahub-primary-soft);
}

#buddypress label {
    font-weight: 600;
    color: var(--imadahub-text);
}

/* ---------- Pagination ---------- */
#buddypress .pagination {
    display: flex;
    justify-content: center;
    gap: var(--imadahub-gap-xs);
    margin: var(--imadahub-gap) 0;
}

#buddypress .pag-count {
    color: var(--imadahub-text-secondary);
    font-size: 13px;
}

#buddypress .pagination-links a,
#buddypress .pagination-links span {
    padding: 8px 12px;
    border-radius: var(--imadahub-radius);
    background: var(--imadahub-surface);
    box-shadow: var(--imadahub-shadow-sm);
    color: var(--imadahub-text);
    font-weight: 600;
}

#buddypress .pagination-links a:hover {
    background: var(--imadahub-surface-hover);
}

#buddypress .pagination-links span.current {
    background: var(--imadahub-primary);
    color: #fff;
}

/* ---------- Notifications list ---------- */
#buddypress table.notifications {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    background: var(--imadahub-surface);
    border-radius: var(--imadahub-radius-lg);
    box-shadow: var(--imadahub-shadow-sm);
    overflow: hidden;
}

#buddypress table.notifications td,
#buddypress table.notifications th {
    padding: 12px;
    border-bottom: 1px solid var(--imadahub-border-soft);
}

#buddypress table.notifications tr.unread td {
    background: var(--imadahub-primary-soft);
}

/* ---------- Messages ---------- */
#buddypress .bp-messages,
#buddypress #message-threads {
    background: var(--imadahub-surface);
    border-radius: var(--imadahub-radius-lg);
    box-shadow: var(--imadahub-shadow-sm);
    overflow: hidden;
}

#buddypress .bp-messages .bp-feedback,
#buddypress .messages-content .bp-messages-content {
    padding: var(--imadahub-gap);
}

/* ---------- Feedback / alerts ---------- */
#buddypress .bp-feedback,
#buddypress #message {
    border-radius: var(--imadahub-radius);
    padding: 12px var(--imadahub-gap);
    background: var(--imadahub-primary-soft);
    color: var(--imadahub-text);
    border: none;
    margin-bottom: var(--imadahub-gap);
}

#buddypress .bp-feedback.error,
#buddypress #message.error {
    background: #FFEBE9;
    color: #BC0000;
}

#buddypress .bp-feedback.success,
#buddypress #message.success {
    background: #E3F7E8;
    color: #1B5E20;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    #buddypress {
        padding: 0 var(--imadahub-gap-sm);
        margin-top: var(--imadahub-gap);
    }

    /* Shorter cover on mobile. Avatar centered; content stacks below. */
    #buddypress #header-cover-image {
        height: 140px !important;
    }

    #buddypress #item-header-avatar {
        float: none !important;
        display: block;
        margin: -48px auto var(--imadahub-gap-sm) !important;
        text-align: center;
    }

    #buddypress #item-header-avatar img.avatar {
        width: 96px;
        height: 96px;
    }

    #buddypress #item-header-content {
        margin-left: 0;
        margin-top: 0;
        padding: 0 var(--imadahub-gap) var(--imadahub-gap);
        text-align: center;
        align-items: center;
    }

    #buddypress #item-header-content .imadahub-display-name {
        font-size: 22px !important;
    }

    /* Status on mobile: pinned across the bottom of the cover. */
    #buddypress #item-header .imadahub-status-wrap {
        top: calc(140px - 48px - var(--imadahub-gap)) !important;
        right: var(--imadahub-gap-sm) !important;
        left: var(--imadahub-gap-sm) !important;
        max-width: none;
        align-items: center;
    }

    #buddypress .bp-navs ul,
    #buddypress .item-list-tabs ul {
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    #buddypress .bp-navs li a,
    #buddypress .item-list-tabs li a {
        white-space: nowrap;
    }
}

/* ---------- Settings: Status form + contact box ---------- */
#buddypress .imadahub-settings-heading {
    font-size: 22px;
    font-weight: 700;
    color: var(--imadahub-text);
    margin: 0 0 var(--imadahub-gap-xs);
}

#buddypress .imadahub-settings-help {
    color: var(--imadahub-text-secondary);
    margin: 0 0 var(--imadahub-gap);
}

#buddypress .imadahub-settings-form {
    display: flex;
    flex-wrap: wrap;
    gap: var(--imadahub-gap-sm);
    align-items: stretch;
    margin-bottom: var(--imadahub-gap-lg);
}

#buddypress .imadahub-settings-input {
    flex: 1 1 280px;
    min-width: 200px;
}

#buddypress .imadahub-settings-submit {
    flex: 0 0 auto;
}

#buddypress .imadahub-settings-contact {
    margin-top: var(--imadahub-gap-lg);
    padding: var(--imadahub-gap) var(--imadahub-gap-lg);
    background: var(--imadahub-primary-soft);
    border-left: 3px solid var(--imadahub-primary);
    border-radius: var(--imadahub-radius);
}

#buddypress .imadahub-settings-contact__title {
    margin: 0 0 var(--imadahub-gap-xs);
    font-size: 15px;
    font-weight: 600;
    color: var(--imadahub-text);
}

#buddypress .imadahub-settings-contact__body {
    margin: 0;
    color: var(--imadahub-text);
    font-size: 14px;
    line-height: 1.5;
}

#buddypress .imadahub-settings-contact__body a {
    font-weight: 600;
    color: var(--imadahub-primary);
}