/*
Theme Name: BuddyX Child (ISM)
Theme URI: https://intelligentsm.net
Description: ISM community child theme for BuddyX, styled to match the previous Kleo look.
Author: ISM
Template: buddyx
Version: 1.0.0
Text Domain: buddyx-child
*/

/* ==========================================================================
   ISM brand tokens (carried over from the Kleo skin)
   accent #00b9f7 | headings Roboto Condensed | dark footer #1c1c1c
   ========================================================================== */
:root {
	/* ISM brand palette (from kleo-child: #367bb7 primary blue, #1f397f navy) */
	--accent: #367bb7;
	--ism-accent: #367bb7;
	--ism-accent-hover: #2d6699;
	--ism-navy: #1f397f;
	--ism-navy-hover: #18306b;
	--ism-heading: #1f397f;
	--ism-text: #444444;
	--ism-adminbar-bg: #111111;
	--ism-footer-bg: #1c1c1c;
	--ism-footer-alt: #272727;
	--ism-socket-bg: #171717;
	--ism-alt-bg: #f2f3f5;

	/* Map BuddyX's own custom properties onto the ISM accent */
	--button-background-color: #367bb7;
	--button-background-hover-color: #2d6699;
	--button-border-color: #367bb7;
	--button-border-hover-color: #2d6699;
	--button-text-color: #ffffff;
	--button-text-hover-color: #ffffff;
}

/* Typography — Roboto Condensed headings (Kleo), Roboto body */
body,
.site-content,
input, select, textarea, button {
	font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	color: var(--ism-text);
}
h1, h2, h3, h4, h5, h6,
.entry-title, .page-title,
.widget-title, .site-title {
	font-family: "Roboto Condensed", "Roboto", sans-serif;
	font-weight: 300;
	color: var(--ism-heading);
}

/* Accent: links, primary actions */
a { color: var(--ism-accent); }
a:hover, a:focus { color: var(--ism-accent-hover); }

.wp-block-button__link,
button.button, input[type="submit"], .button,
.bp-primary-action, .generic-button a,
.wp-element-button {
	background-color: var(--ism-accent);
	border-color: var(--ism-accent);
	color: #fff;
}
.wp-block-button__link:hover,
button.button:hover, input[type="submit"]:hover, .button:hover,
.bp-primary-action:hover, .wp-element-button:hover {
	background-color: var(--ism-accent-hover);
	border-color: var(--ism-accent-hover);
	color: #fff;
}

/* Alternate/section background tint to match Kleo */
.bp-nouveau .bp-list,
.widget_area .widget {
	background-color: #ffffff;
}

/* ==========================================================================
   Community area — hide the standard theme header on BuddyPress pages
   (Kleo's activity/feed was an immersive, header-less app-like view).
   The WordPress admin bar still provides profile/logout nav for members.
   ========================================================================== */
body.logged-in .site-header-wrapper,
body.logged-in #masthead,
body.logged-in .site-header {
	display: none !important;
}
/* Reclaim the space the header used to occupy */
body.buddypress .site-content,
body.buddypress #content {
	margin-top: 0 !important;
	padding-top: 24px !important;
}

/* ---- ISM top header bar (black) — logo / bell / name / apps-grid ---------- */
#ism-top-header {
	position: sticky; top: 0; z-index: 99990;
	background: var(--ism-adminbar-bg, #111); color: #fff;
}
#ism-top-header .ism-top-inner {
	max-width: 1240px; margin: 0 auto; height: 56px;
	display: flex; align-items: center; justify-content: space-between; padding: 0 24px;
}
#ism-top-header .ism-logo img { height: 40px; width: auto; display: block; }
#ism-top-header .ism-top-right { display: flex; align-items: center; gap: 18px; }
#ism-top-header .ism-bell { color: #fff; position: relative; display: flex; align-items: center; }
#ism-top-header .ism-bell .material-icons { font-size: 22px; }
#ism-top-header .ism-bell-count {
	position: absolute; top: -5px; right: -7px; background: #e0241b; color: #fff;
	border-radius: 10px; font-size: 10px; line-height: 16px; min-width: 16px; text-align: center; padding: 0 4px;
}
#ism-top-header .ism-username { color: #fff; font-size: 14px; }
/* The menu trigger lives in the header now (override the floating-trigger rule) */
#ism-top-header #ism_main_nav_trigger {
	position: static; background: none; border: none; border-radius: 0;
	padding: 4px; color: #fff; display: flex; align-items: center;
}
#ism-top-header #ism_main_nav_trigger:hover { background: none; color: var(--ism-accent); }
#ism-top-header #ism_main_nav_trigger .material-icons { font-size: 24px; margin: 0; }

/* Minimal footer copyright bar */
#ism-bottom-footer {
	background: var(--ism-socket-bg, #171717); color: #9a9a9a;
	text-align: center; padding: 14px; font-size: 13px;
}

/* Member activity layout: main content on the left, ISM widget column on the
   right (My Connections / My Groups / Global Search). */
/* BuddyX hides the member aside by default (.member-home aside{display:none});
   force the two-column grid with the ISM widget column on the right. */
body.bp-user .site-wrapper.member-home {
	display: grid !important;
	grid-template-columns: minmax(0, 1fr) 300px !important;
	grid-gap: 1.5rem;
	justify-content: center;
}
body.bp-user .site-wrapper.member-home .bp-wrap {
	grid-column: 1;
	min-width: 0;
}
body.bp-user .site-wrapper.member-home .primary-sidebar,
body.bp-user .site-wrapper.member-home aside#secondary {
	display: block !important;
	grid-column: 2;
	width: auto;
}
@media (max-width: 900px) {
	body.bp-user .site-wrapper.member-home {
		grid-template-columns: 1fr !important;
	}
	body.bp-user .site-wrapper.member-home .primary-sidebar,
	body.bp-user .site-wrapper.member-home aside#secondary {
		grid-column: 1;
	}
}
body.bp-user #secondary.widget-area .widget {
	background: #fff;
	border: 1px solid #e9e9e9;
	border-radius: 6px;
	padding: 16px 18px;
	margin-bottom: 18px;
}
body.bp-user #secondary.widget-area .widget-title,
body.bp-user #secondary.widget-area .widgettitle {
	color: var(--ism-navy);
	font-family: "Roboto Condensed", sans-serif;
	font-weight: 400;
	margin-bottom: 10px;
}

/* Activity feed: lift the cards onto the alt background like Kleo */
body.buddypress {
	background-color: var(--ism-alt-bg);
}
body.buddypress .site-content .content-area,
body.buddypress #buddypress {
	background: #ffffff;
}
/* Activity directory scope tabs + filter — horizontal bar (per 051 reference).
   Legacy index.php renders #subnav.item-list-tabs.activity-type-tabs as a <ul>;
   without styling it shows as a vertical bulleted list. */
#buddypress div.item-list-tabs.activity-type-tabs ul {
	list-style: none; margin: 0 0 16px; padding: 0;
	display: flex; align-items: center; flex-wrap: wrap;
	border-bottom: 1px solid #ddd;
}
#buddypress div.item-list-tabs.activity-type-tabs ul li { float: none; margin: 0; list-style: none; }
#buddypress div.item-list-tabs.activity-type-tabs ul li a {
	display: block; padding: 10px 14px; color: #666;
	font-size: 12px; text-transform: uppercase; letter-spacing: .3px;
	border-bottom: 2px solid transparent;
}
#buddypress div.item-list-tabs.activity-type-tabs ul li a:hover { color: var(--ism-navy); }
#buddypress div.item-list-tabs.activity-type-tabs ul li.selected a,
#buddypress div.item-list-tabs.activity-type-tabs ul li.current a {
	color: var(--ism-accent); border-bottom-color: var(--ism-accent); font-weight: 500;
}
#buddypress div.item-list-tabs.activity-type-tabs ul li a span { color: #999; margin-left: 4px; }
/* Push RSS + the Show: filter to the right */
#buddypress div.item-list-tabs.activity-type-tabs ul li.feed { margin-left: auto; }
#buddypress div.item-list-tabs.activity-type-tabs ul li.feed a { font-size: 0; }
#buddypress div.item-list-tabs.activity-type-tabs ul li.feed a::before { font-family: "Material Icons"; content: "\e0e5"; font-size: 18px; }
#buddypress div.item-list-tabs.activity-type-tabs ul li#activity-filter-select { display: flex; align-items: center; padding: 0 10px; }
#buddypress div.item-list-tabs.activity-type-tabs ul li#activity-filter-select label { text-transform: uppercase; font-size: 12px; color: #666; margin-right: 8px; }
#buddypress div.item-list-tabs.activity-type-tabs ul li#activity-filter-select select { padding: 5px 8px; max-width: 180px; }

/* Activity items — bold-bordered cards (per 051 reference) */
#buddypress ul.activity-list { list-style: none; margin: 0; padding: 0; }
#buddypress ul.activity-list > li {
	position: relative;
	list-style: none;
	background: #ffffff;
	border: 2px solid #1a1a1a;
	border-radius: 2px;
	margin: 0 0 18px;
	padding: 18px 20px;
	display: flex;
	gap: 14px;
}
#buddypress ul.activity-list > li.load-more { display: block; border-style: dashed; text-align: center; }
#buddypress ul.activity-list > li .activity-avatar { flex: 0 0 auto; }
#buddypress ul.activity-list > li .activity-avatar img { width: 44px; height: 44px; border-radius: 50%; }
#buddypress ul.activity-list > li .activity-content { flex: 1 1 auto; min-width: 0; margin: 0; }
#buddypress .activity-inner { background: #f4f5f7; border-radius: 4px; padding: 12px 14px; margin: 10px 0; }
#buddypress .activity-header,
#buddypress .activity-content { font-family: "Roboto", sans-serif; }
#buddypress .activity-header { font-size: 14px; color: #333; }
#buddypress .activity-header a { color: var(--ism-accent); }
/* Nested activity comments shouldn't carry the bold card border */
#buddypress ul.activity-list .activity-comments li { border: none; padding: 8px 0; margin: 0; background: none; }
/* Activity action buttons are ICON links, not filled buttons. Undo the generic
   .button/.bp-*-action background inside the activity stream (they were
   rendering as solid blue blocks). */
#buddypress .activity-meta a,
#buddypress .activity-meta button,
#buddypress .activity-meta .button,
#buddypress .activity-meta .btn,
#buddypress .activity-meta a.bp-primary-action,
#buddypress .activity-meta a.bp-secondary-action,
#buddypress .activity-meta .generic-button a,
#buddypress .activity-meta .item-button,
#buddypress .activity-meta .ism_media,
#buddypress .activity-meta [class*="reaction"] {
	background: none !important;
	background-color: transparent !important;
	border: none !important;
	box-shadow: none !important;
	color: #7a7a7a !important;
	padding: 4px 8px !important;
	margin: 0 !important;
	display: inline-flex !important;
	align-items: center;
	gap: 4px;
	vertical-align: middle;
	min-width: 0;
	font-size: 13px;
	text-transform: none;
}
#buddypress .activity-meta a:hover,
#buddypress .activity-meta .button:hover,
#buddypress .activity-meta a.bp-primary-action:hover,
#buddypress .activity-meta a.bp-secondary-action:hover { color: var(--ism-accent) !important; }
#buddypress .activity-meta .material-icons { font-size: 19px; line-height: 1; }
#buddypress .activity-meta .button span { color: inherit; background: none; }

/* ==========================================================================
   ISM admin bar + account (ISM custom) menu — dark bar, blue accents.
   ========================================================================== */
#wpadminbar {
	background: var(--ism-adminbar-bg) !important;
}
#wpadminbar .ab-top-menu > li.menupop > .ab-item:hover,
#wpadminbar li:hover > .ab-item,
#wpadminbar .ab-submenu .ab-item:hover {
	background: var(--ism-accent) !important;
	color: #fff !important;
}
/* The ISM custom menu lives under the account node — give it room + blue links */
#wpadminbar #wp-admin-bar-ism-menu-root-default a,
#wpadminbar .quicklinks li.ism-menu-item > .ab-item {
	color: #cfe0f2 !important;
}
#wpadminbar .quicklinks li.ism-menu-item:hover > .ab-item {
	color: #fff !important;
}
/* Hide the leftover BuddyPress notification bubble in the bar (Kleo did too) */
#wp-admin-bar-bp-notifications { display: none; }
/* Belt-and-suspenders: hide any leftover Kleo "Live Notifications" nav item */
.kleo-notifications-nav { display: none !important; }

/* ==========================================================================
   ISM custom drill-down menu (ported from Kleo) — fixed trigger + panel.
   ========================================================================== */
.unselectable {
	-moz-user-select: none;
	-webkit-user-select: none;
	-ms-user-select: none;
	user-select: none;
}
#ism_main_nav_trigger.ism_main_nav {
	position: fixed;
	top: 12px;
	right: 16px;
	z-index: 999998;
	padding: 7px 12px;
	color: #fff;
	background-color: var(--ism-navy);
	border: 1px solid #111;
	border-radius: 5px;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	transition: background-color .3s, color .3s;
}
#ism_main_nav_trigger.ism_main_nav i {
	vertical-align: text-bottom;
	margin-left: 6px;
}
#ism_main_nav_trigger.ism_main_nav:hover {
	color: #fff;
	background-color: var(--ism-accent);
}
div#ism_main_nav_container {
	position: fixed;
	top: 56px;
	right: 16px;
	height: 420px;
	width: 260px;
	background-color: #111;
	border: 1px solid #ccc;
	border-radius: 6px;
	z-index: 999999;
	color: #fff;
	display: none;
}
div#ism_main_nav_container hr { margin-top: 5px; border-color: #333; }
div#ism_main_nav_container_top { padding: 8px 12px; }
div#ism_main_nav_container_top a { color: #fff; }
div#ism_main_nav_container_results {
	position: relative;
	max-height: 280px;
	overflow: hidden;
	overflow-y: scroll;
	-ms-overflow-style: none;
	scrollbar-width: none;
}
div#ism_main_nav_container_results::-webkit-scrollbar { display: none; }
div#ism_main_nav_container_results div { padding: 0 12px; }
div#ism_main_nav_container_results div:hover { background-color: #333; }
div#mainNavFooter {
	height: 50px;
	position: absolute;
	bottom: 0;
	padding: 12px 12px 0;
	width: 100%;
	border-top: 1px solid #444;
	box-sizing: border-box;
}
div#mainNavFooter a {
	color: #fff;
	background-color: var(--ism-navy);
	border: 1px solid #999;
	border-radius: 4px;
	padding: 5px 10px;
	transition: background-color .3s;
}
div#mainNavFooter a:hover { color: #fff !important; background-color: var(--ism-accent); cursor: pointer; }
div.navList, div#navBack { height: 26px; line-height: 26px; }
div.navList span, div#navBack span { float: right; height: 26px; line-height: 26px; }
div.navList a { color: #fff; }
div.navList span:hover,
div#navBack span:hover,
div#ism_main_nav_container_top a:hover,
div.navList a:hover { cursor: pointer; color: var(--ism-accent) !important; }
span#closeMainNav {
	position: absolute;
	top: 6px;
	right: 8px;
	cursor: pointer;
	color: #fff;
	transition: color .3s;
}
span#closeMainNav:hover { color: red; }

/* Dark footer + socket like Kleo */
.site-footer,
.footer-widgets,
#colophon {
	background-color: var(--ism-footer-bg);
	color: #cfcfcf;
}
.site-footer a,
.footer-widgets a { color: #ffffff; }
.site-info,
.site-footer .bottom-footer,
.copyright {
	background-color: var(--ism-socket-bg);
	color: #9a9a9a;
}

/* ==========================================================================
   Legacy BuddyPress frame (Kleo parity) — member & group profile pages.
   The site runs the bp-legacy template pack; buddyx-child overrides the
   member/group home + headers with Kleo's legacy templates. Markup:
     #buddypress > #item-header (#ism_profile_main_container /
     #ism_group_main_container) > #item-nav (#object-nav icon tabs) > #item-body
   The profile/group card styling ships inline in those templates; below are
   the grid, the horizontal icon nav, and the ISM Material-Icon mappings
   (ported 1:1 from kleo-child/style.css).
   ========================================================================== */

/* Bootstrap-3 xs grid subset — Kleo headers use .container/.row/.col-xs-* */
#buddypress .container { width: 100%; padding: 0 15px; margin: 0 auto; box-sizing: border-box; }
#buddypress .row { margin: 0 -15px; }
#buddypress .row:before, #buddypress .row:after { content: " "; display: table; }
#buddypress .row:after { clear: both; }
#buddypress [class*="col-xs-"] { position: relative; min-height: 1px; padding: 0 15px; float: left; box-sizing: border-box; }
#buddypress .col-xs-3 { width: 25%; }
#buddypress .col-xs-4 { width: 33.33333%; }
#buddypress .col-xs-5 { width: 41.66667%; }
#buddypress .col-xs-6 { width: 50%; }
#buddypress .col-xs-9 { width: 75%; }
#buddypress .col-xs-12 { width: 100%; }
/* col-sm/md/lg-* (ISM plugins: activity reports panel, checkins map modal) */
#buddypress [class*="col-sm-"], #buddypress [class*="col-md-"], #buddypress [class*="col-lg-"] {
	position: relative; min-height: 1px; padding: 0 15px; float: left; box-sizing: border-box;
}
#buddypress .col-sm-1,#buddypress .col-md-1,#buddypress .col-lg-1 { width: 8.3333%; }
#buddypress .col-sm-2,#buddypress .col-md-2,#buddypress .col-lg-2 { width: 16.6667%; }
#buddypress .col-sm-3,#buddypress .col-md-3,#buddypress .col-lg-3 { width: 25%; }
#buddypress .col-sm-4,#buddypress .col-md-4,#buddypress .col-lg-4 { width: 33.3333%; }
#buddypress .col-sm-5,#buddypress .col-md-5,#buddypress .col-lg-5 { width: 41.6667%; }
#buddypress .col-sm-6,#buddypress .col-md-6,#buddypress .col-lg-6 { width: 50%; }
#buddypress .col-sm-7,#buddypress .col-md-7,#buddypress .col-lg-7 { width: 58.3333%; }
#buddypress .col-sm-8,#buddypress .col-md-8,#buddypress .col-lg-8 { width: 66.6667%; }
#buddypress .col-sm-9,#buddypress .col-md-9,#buddypress .col-lg-9 { width: 75%; }
#buddypress .col-sm-10,#buddypress .col-md-10,#buddypress .col-lg-10 { width: 83.3333%; }
#buddypress .col-sm-11,#buddypress .col-md-11,#buddypress .col-lg-11 { width: 91.6667%; }
#buddypress .col-sm-12,#buddypress .col-md-12,#buddypress .col-lg-12 { width: 100%; }

/* Bootstrap button subset — ISM plugins (Maps, etc.) use .btn/.btn-* classes
   that Kleo's Bootstrap provided. Without a base, they collapse/overlap. */
#buddypress .btn {
	display: inline-block; font-weight: 400; text-align: center; vertical-align: middle;
	-webkit-user-select: none; user-select: none; border: 1px solid transparent;
	padding: 6px 14px; font-size: 13px; line-height: 1.5; border-radius: 4px;
	cursor: pointer; margin: 4px 6px 4px 0; text-decoration: none; color: #fff;
}
#buddypress .btn .material-icons { font-size: 16px; line-height: 1; vertical-align: middle; margin-right: 4px; }
#buddypress .btn-primary   { background: var(--ism-accent); border-color: var(--ism-accent); color: #fff; }
#buddypress .btn-primary:hover { background: var(--ism-accent-hover); color: #fff; }
#buddypress .btn-secondary { background: #5a6b7b; border-color: #5a6b7b; color: #fff; }
#buddypress .btn-secondary:hover { background: #495764; color: #fff; }
#buddypress .btn-success   { background: #2e9e4f; border-color: #2e9e4f; color: #fff; }
#buddypress .btn-success:hover { background: #25803f; color: #fff; }
#buddypress .btn-danger    { background: #d9534f; border-color: #d9534f; color: #fff; }
#buddypress .btn-danger:hover { background: #c44440; color: #fff; }
#buddypress .btn-info      { background: #2aa1c0; border-color: #2aa1c0; color: #fff; }
#buddypress .btn-default,
#buddypress .btn-light     { background: #f4f5f7; border-color: #ccc; color: #333; }
#buddypress .btn-sm        { padding: 3px 9px; font-size: 12px; }
#buddypress .btn-block     { display: block; width: 100%; margin-right: 0; }

/* Space stacked form buttons (Settings Generate Password / Save Changes, etc.) */
#buddypress .standard-form input[type="submit"],
#buddypress .standard-form button[type="submit"],
#buddypress .standard-form a.button,
#buddypress .standard-form .generate-password,
#buddypress div.submit input { display: inline-block; margin: 4px 10px 8px 0; }

/* Item header wrapper */
#buddypress div#item-header { padding: 0 0 10px; margin-bottom: 8px; }

/* Horizontal icon nav (object-nav) under the profile/group card */
#buddypress div#item-nav { margin: 12px 0 18px; }
#buddypress div#item-nav .item-list-tabs ul,
#buddypress div#item-nav ul {
	list-style: none; margin: 0; padding: 0;
	display: flex; flex-wrap: wrap; align-items: flex-end;
	border-bottom: 1px solid #ccc;
}
#buddypress div#item-nav ul li { float: none; margin: 0; }
#buddypress div#item-nav ul li a {
	display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
	padding: 6px 14px 8px; color: #888; font-size: 10px; line-height: 1.3;
	text-align: center; white-space: nowrap; border-bottom: 3px solid transparent;
	text-transform: uppercase; letter-spacing: .3px;
}
#buddypress div#item-nav ul li a:before {
	font-family: "Material Icons"; font-size: 28px; line-height: 1;
	margin-bottom: 3px; color: #888; -webkit-font-feature-settings: 'liga'; font-feature-settings: 'liga';
}
#buddypress div#item-nav ul li a:hover,
#buddypress div#item-nav ul li a:hover:before { color: #000 !important; }
#buddypress div#item-nav ul li.current a,
#buddypress div#item-nav ul li.current a:before,
#buddypress div#item-nav ul li.selected a,
#buddypress div#item-nav ul li.selected a:before { color: var(--ism-navy) !important; }
#buddypress div#item-nav ul li.current a,
#buddypress div#item-nav ul li.selected a { border-bottom-color: var(--ism-navy); }
/* count bubble — small circle on the icon's top-right (per reference) */
#buddypress div#item-nav ul li a { position: relative; }
#buddypress div#item-nav ul li a span {
	position: absolute; top: 0; right: 6px;
	background-color: var(--ism-navy); color: #fff; border-radius: 10px;
	min-width: 16px; height: 16px; line-height: 16px; text-align: center;
	padding: 0 4px; font-size: 10px; margin: 0;
}

/* Per-component Material Icons (ported from kleo-child) */
#buddypress div#item-nav ul #settings-personal-li a::before, #buddypress div#item-nav ul #admin-groups-li a::before { content: "\e8b8"; }
#buddypress div#item-nav ul #activity-personal-li a::before, #buddypress div#item-nav ul #home-groups-li a::before { content: "\e91a"; }
#buddypress div#item-nav ul #groups-personal-li a::before, #buddypress div#item-nav ul #members-groups-li a::before { content: "\e7fb"; }
#buddypress div#item-nav ul #forums-personal-li a::before, #buddypress div#item-nav ul #nav-forum-groups-li a::before { content: "\e0bf"; }
#buddypress div#item-nav ul #fileManager-personal-li a::before, #buddypress div#item-nav ul #fileManagerGroup-groups-li a::before { content: "\e2c8"; }
#buddypress div#item-nav ul #filebase-personal-li a::before, #buddypress div#item-nav ul #group_filebase-groups-li a::before { content: "\e2c8"; }
#buddypress div#item-nav ul #maps-personal-li a::before, #buddypress div#item-nav ul #group_maps-groups-li a::before { content: "\e562"; }
#buddypress div#item-nav ul #ism_events_main-personal-li a::before, #buddypress div#item-nav ul #group_events-groups-li a::before { content: "\e878"; }
#buddypress div#item-nav ul #ism_calendar_main-personal-li a::before, #buddypress div#item-nav ul #group_calendar-groups-li a::before { content: "\e8a3"; }
#buddypress div#item-nav ul #invite-anyone-personal-li a::before,
#buddypress div#item-nav ul #invite-groups-li a::before,
#buddypress div#item-nav ul #nav-invite-anyone-groups-li a::before { content: "\e163"; }
#buddypress div#item-nav ul #ism_media_gallery-personal-li a::before, #buddypress div#item-nav ul #group_galleries-groups-li a::before { content: "\e3b6"; }
#buddypress div#item-nav ul #xprofile-personal-li a::before { content: "\e7fd"; }
#buddypress div#item-nav ul #messages-personal-li a::before { content: "\e158"; }
#buddypress div#item-nav ul #friends-personal-li a::before { content: "\e7fe"; }
#buddypress div#item-nav ul #group_links-groups-li a::before { content: "\e157"; }
#buddypress div#item-nav ul #group_videos-groups-li a::before { content: "\e63a"; }
#buddypress div#item-nav ul #request-membership-groups-li a::before { content: "\e7fe"; }

/* Subnav items Kleo hid */
#buddypress div#item-nav ul li#nav-notifications-groups-li,
#buddypress div#item-nav ul li#notifications-personal-li,
#buddypress div#item-nav ul li#checkins-personal-li { display: none; }
#buddypress div#item-nav ul #filebase-personal-li,
#buddypress div#item-nav ul #group_filebase-groups-li { margin-left: 5px; margin-right: 5px; }

/* ---- Member icon-nav: reference order + labels --------------------------- */
/* Reference: PROFILE ACTIVITY CONNECT GROUPS GALLERIES FILES PLANNER MAPS
   FORUM MANAGE. Reorder visually via flexbox `order` (keeps DOM/behavior). */
#buddypress div#item-nav ul li#xprofile-personal-li        { order: 1; }
#buddypress div#item-nav ul li#activity-personal-li        { order: 2; }
#buddypress div#item-nav ul li#friends-personal-li         { order: 3; }
#buddypress div#item-nav ul li#groups-personal-li          { order: 4; }
#buddypress div#item-nav ul li#ism_media_gallery-personal-li { order: 5; }
#buddypress div#item-nav ul li#fileManager-personal-li,
#buddypress div#item-nav ul li#filebase-personal-li        { order: 6; }
#buddypress div#item-nav ul li#ism_events_main-personal-li { order: 7; }
#buddypress div#item-nav ul li#maps-personal-li            { order: 8; }
#buddypress div#item-nav ul li#forums-personal-li          { order: 9; }
#buddypress div#item-nav ul li#settings-personal-li        { order: 10; }
/* 'Send Invites' isn't a top icon in the reference (invites live in the
   Connect/Manage section). */
#buddypress div#item-nav ul li#invite-anyone-personal-li   { display: none; }

/* Relabel to match the reference: keep the icon (::before), swap the text. */
#buddypress div#item-nav ul li#friends-personal-li > a,
#buddypress div#item-nav ul li#settings-personal-li > a,
#buddypress div#item-nav ul li#forums-personal-li > a,
#buddypress div#item-nav ul li#fileManager-personal-li > a,
#buddypress div#item-nav ul li#filebase-personal-li > a { font-size: 0; }
#buddypress div#item-nav ul li > a::after { font-size: 10px; text-transform: uppercase; letter-spacing: .3px; color: inherit; line-height: 1.3; }
#buddypress div#item-nav ul li#friends-personal-li > a::after  { content: "Connect"; }
#buddypress div#item-nav ul li#settings-personal-li > a::after { content: "Manage"; }
#buddypress div#item-nav ul li#forums-personal-li > a::after   { content: "Forum"; }
#buddypress div#item-nav ul li#fileManager-personal-li > a::after,
#buddypress div#item-nav ul li#filebase-personal-li > a::after { content: "Files"; }

/* ---- Group icon-nav: reference order + labels (052) ---------------------- */
/* MANAGE ACTIVITY MEMBERS GALLERIES FILES PLANNER MAPS LINKS FORUM INVITES */
#buddypress div#item-nav ul li#admin-groups-li               { order: 1; }
#buddypress div#item-nav ul li#home-groups-li                { order: 2; }
#buddypress div#item-nav ul li#members-groups-li             { order: 3; }
#buddypress div#item-nav ul li#group_galleries-groups-li     { order: 4; }
#buddypress div#item-nav ul li#fileManagerGroup-groups-li,
#buddypress div#item-nav ul li#group_filebase-groups-li      { order: 5; }
#buddypress div#item-nav ul li#group_events-groups-li        { order: 6; }
#buddypress div#item-nav ul li#group_maps-groups-li          { order: 7; }
#buddypress div#item-nav ul li#group_external_links-groups-li{ order: 8; }
#buddypress div#item-nav ul li#nav-forum-groups-li           { order: 9; }
#buddypress div#item-nav ul li#nav-invite-anyone-groups-li   { order: 10; }
/* Relabel: group Home tab is the activity stream -> "Activity"; invites -> "Invites" */
#buddypress div#item-nav ul li#home-groups-li > a,
#buddypress div#item-nav ul li#nav-invite-anyone-groups-li > a { font-size: 0; }
#buddypress div#item-nav ul li#home-groups-li > a::after            { content: "Activity"; }
#buddypress div#item-nav ul li#nav-invite-anyone-groups-li > a::after { content: "Invites"; }

/* Item body */
#buddypress div#item-body { clear: both; }

/* Secondary subnav bar (Profile View/Edit/Change…, Settings General/Email,
   Forum tabs, group subnavs). Legacy renders #subnav as a <ul> which shows as
   a vertical list; lay it out as a horizontal tab bar (per the references). */
#buddypress #subnav ul {
	list-style: none; margin: 0 0 18px; padding: 0;
	display: flex; flex-wrap: wrap; align-items: center;
	border-bottom: 1px solid #ddd;
}
#buddypress #subnav ul li { float: none; margin: 0; list-style: none; }
#buddypress #subnav ul li a {
	display: block; padding: 8px 14px; color: #666; font-size: 12px;
	text-transform: uppercase; letter-spacing: .3px; border-bottom: 2px solid transparent;
}
#buddypress #subnav ul li a:hover { color: var(--ism-navy); }
#buddypress #subnav ul li.current a,
#buddypress #subnav ul li.selected a {
	color: var(--ism-accent); border-bottom-color: var(--ism-accent); font-weight: 500;
}
/* Push any right-aligned subnav filter (e.g. order-by) to the right */
#buddypress #subnav ul li.last,
#buddypress #subnav ul li#members-order-select { margin-left: auto; }

/* ---- Two-column frame: #buddypress (content) + ISM right sidebar ---------- */
/* The legacy home.php wraps content + sidebar in .ism-bp-row; BuddyX's own
   single sidebar is gone, so we render ours. Force #primary to full width so
   the row has room (BuddyX otherwise reserves space for an absent sidebar). */
body.bp-user #primary.site-main,
body.single-item.groups #primary.site-main,
body.groups.single-item #primary.site-main { width: 100%; max-width: 100%; flex: 1 1 100%; }

/* BP directory pages (activity / members / groups): force the 2-column layout
   so the ISM right sidebar (#secondary, injected by sidebar-buddypress.php) sits
   beside the content. BuddyX leaves .site-wrapper single-column when its own
   directory widget areas are empty. */
body.buddypress.directory .site-wrapper {
	display: flex; align-items: flex-start; gap: 28px;
}
body.buddypress.directory .site-wrapper > #primary { flex: 1 1 auto; min-width: 0; width: auto; max-width: none; }
body.buddypress.directory .site-wrapper > #secondary { flex: 0 0 300px; width: 300px; }
@media (max-width: 980px) {
	body.buddypress.directory .site-wrapper { flex-direction: column; }
	body.buddypress.directory .site-wrapper > #secondary { flex-basis: auto; width: 100%; }
}

.ism-bp-row { display: flex; align-items: flex-start; gap: 28px; }
.ism-bp-row > #buddypress { flex: 1 1 auto; min-width: 0; }
.ism-bp-sidebar { flex: 0 0 300px; width: 300px; }
.ism-bp-sidebar .sticky-sidebar { position: sticky; top: 84px; }
@media (max-width: 980px) {
	.ism-bp-row { flex-direction: column; }
	.ism-bp-sidebar { flex-basis: auto; width: 100%; }
}

/* Sidebar widgets — borderless sections (per reference), not boxed cards */
.ism-bp-sidebar .widget {
	background: transparent !important; border: none !important; box-shadow: none !important;
	border-radius: 0 !important; padding: 0 0 22px !important; margin-bottom: 0 !important;
}
.ism-bp-sidebar .widget-title, .ism-bp-sidebar .widgettitle {
	color: var(--ism-navy); font-family: "Roboto Condensed", sans-serif; font-weight: 400;
	font-size: 15px; margin: 0 0 10px; text-transform: none;
}
.ism-bp-sidebar .search-form, .ism-bp-sidebar input[type="search"], .ism-bp-sidebar select { width: 100%; }
/* Dedupe: the role/global sidebar and the member sidebar both carry a search
   widget; keep the first, hide any later duplicate. */
.ism-bp-sidebar .widget_search ~ .widget_search { display: none; }

/* User card (avatar / name / Log Out) — top of the sidebar in every reference */
.ism-user-card { display: flex; align-items: center; gap: 12px; padding-bottom: 16px !important; }
.ism-user-card-avatar img { width: 64px; height: 64px; border-radius: 50%; }
.ism-user-card-meta { display: flex; flex-direction: column; }
.ism-user-card-name { color: var(--ism-accent); font-weight: 500; }
.ism-user-card-logout { color: var(--ism-text); font-size: 13px; }

/* ---- Member card grid (Connect / Members dir / connections) — per 055 ----- */
#buddypress #members-list {
	list-style: none; margin: 16px 0 0; padding: 0;
	columns: 3; column-gap: 18px;
}
#buddypress #members-list > li {
	break-inside: avoid; -webkit-column-break-inside: avoid; page-break-inside: avoid;
	display: inline-block; width: 100%; margin: 0 0 18px; list-style: none; float: none;
}
#buddypress #members-list .member-inner-list {
	background: #fff; border: 1px solid #e3e3e3; border-radius: 4px; padding: 14px 16px; overflow: hidden;
}
#buddypress #members-list .item-avatar { float: left; margin-right: 12px; }
#buddypress #members-list .item-avatar img { width: 44px; height: 44px; border-radius: 50%; }
#buddypress #members-list .item-title a { font-weight: 500; color: #222; font-size: 14px; }
#buddypress #members-list .item-title a:hover { color: var(--ism-accent); }
#buddypress #members-list .item-meta { font-size: 12px; color: #999; margin-top: 2px; }
#buddypress #members-list .update { clear: both; display: block; padding-top: 10px; font-size: 13px; color: #555; }
#buddypress #members-list .action { clear: both; padding-top: 12px; }
#buddypress #members-list .action a,
#buddypress #members-list .action button {
	display: inline-block; padding: 5px 12px; border: 1px solid #ccc; border-radius: 3px;
	font-size: 11px; text-transform: uppercase; letter-spacing: .3px;
	color: #555 !important; background: #f7f7f7 !important; box-shadow: none;
}
#buddypress #members-list .action a:hover,
#buddypress #members-list .action button:hover { background: var(--ism-navy) !important; color: #fff !important; border-color: var(--ism-navy); }
@media (max-width: 1100px) { #buddypress #members-list { columns: 2; } }
@media (max-width: 700px)  { #buddypress #members-list { columns: 1; } }

/* Group card grid (groups directory) — mirrors the member grid (052/056) */
#buddypress #groups-list {
	list-style: none; margin: 16px 0 0; padding: 0; columns: 3; column-gap: 18px;
}
#buddypress #groups-list > li {
	break-inside: avoid; -webkit-column-break-inside: avoid; page-break-inside: avoid;
	display: inline-block; width: 100%; margin: 0 0 18px; list-style: none; float: none;
}
#buddypress #groups-list .group-inner-list {
	background: #fff; border: 1px solid #e3e3e3; border-radius: 4px; padding: 14px 16px; overflow: hidden;
}
#buddypress #groups-list .item-avatar { float: left; margin-right: 12px; }
#buddypress #groups-list .item-avatar img { width: 50px; height: 50px; border-radius: 8px; }
#buddypress #groups-list .item-title { font-weight: 500; font-size: 14px; }
#buddypress #groups-list .item-title a { color: #222; }
#buddypress #groups-list .item-title a:hover { color: var(--ism-accent); }
#buddypress #groups-list .item-meta, #buddypress #groups-list .group-details { font-size: 12px; color: #999; }
#buddypress #groups-list .desc { clear: both; padding-top: 10px; font-size: 13px; color: #555; }
#buddypress #groups-list .action { clear: both; padding-top: 12px; }
#buddypress #groups-list .action a, #buddypress #groups-list .action button {
	display: inline-block; padding: 5px 12px; border: 1px solid #ccc; border-radius: 3px;
	font-size: 11px; text-transform: uppercase; letter-spacing: .3px;
	color: #555 !important; background: #f7f7f7 !important; box-shadow: none;
}
#buddypress #groups-list .action a:hover, #buddypress #groups-list .action button:hover { background: var(--ism-navy) !important; color: #fff !important; border-color: var(--ism-navy); }
@media (max-width: 1100px) { #buddypress #groups-list { columns: 2; } }
@media (max-width: 700px)  { #buddypress #groups-list { columns: 1; } }

/* ISM Connections / Groups widgets (right column) — ported from kleo-child */
span.ism_friends_widget_nav_item, span.ism_groups_widget_nav_item { cursor: pointer; }
span.ism_friends_widget_nav_item:hover, span.ism_friends_widget_nav_item.current,
span.ism_groups_widget_nav_item:hover, span.ism_groups_widget_nav_item.current { color: var(--ism-accent); }
div.ism_friends_widget_section, div.ism_groups_widget_section { display: none; }
div.ism_friends_widget_section.selected, div.ism_groups_widget_section.selected { display: block; }
div.ism_friends_widget_container, div.ism_groups_widget_container { display: flex; align-items: flex-start; gap: 10px; margin-top: 12px; }
div.ism_friends_widget_image, div.ism_groups_widget_image { flex: 0 0 30px; }
div.ism_friends_widget_image img, div.ism_groups_widget_image img { width: 30px; height: 30px; border-radius: 100%; }
div.ism_friends_widget_body, div.ism_groups_widget_body { flex: 1 1 auto; min-width: 0; line-height: 1.25; }
a.ism_friends_widget_a, a.ism_groups_widget_a { color: #222; font-size: 13px; font-weight: 500; display: block; }
a.ism_friends_widget_a:hover, a.ism_groups_widget_a:hover { color: var(--ism-accent); }
span.ism_friends_widget_time_since, span.ism_groups_widget_time_since { color: #bbb; font-size: 11px; display: block; }
/* Sort tabs (Newest | Active | …) */
.ism_groups_widget_nav, .ism_friends_widget_nav { font-size: 12px; color: #999; margin-bottom: 4px; }
.ism_widget_sep { color: #d5d5d5; }
.ism_widget_empty { color: #999; font-size: 13px; }

/* ==========================================================================
   Magnific Popup hide. ism_media's edit-media / gallery popups are markup that
   sits in the page with class .mfp-hide and is only shown when Magnific Popup
   opens it. Kleo loaded Magnific Popup's CSS (which defines
   .mfp-hide { display:none !important }); BuddyX does not, so those hidden
   popups — including their big fa-spin loader — leak onto every activity item.
   Restore the hide so they stay out of the page until opened.
   ========================================================================== */
.mfp-hide { display: none !important; }

/* ==========================================================================
   ISM|GO ribbon size. The ismgo plugin's .ism-go-logo sizing rule is commented
   out in its source CSS, so the ISM|GO logo image renders at natural size and
   overflows .sb-container (20rem×10rem), stretching the right-edge tab. Cap the
   logo to the tab and clip overflow so it stays a compact ribbon.
   ========================================================================== */
#ismGO .sb-container .ism-go-logo {
	max-width: 100% !important;
	max-height: 100% !important;
	width: auto !important;
	height: auto !important;
}
#ismGO .sb-container.desktopSlidingPane { overflow: hidden !important; }
