/*!
 * CLI BuddyPress Design: complete BuddyPress (Nouveau) styling for Critical Link International.
 * All rules are scoped to #buddypress (and BuddyPress widgets) so nothing else on the site is touched.
 * Colours, fonts and sizes come from the variables below; change them in Settings > CLI BuddyPress Design.
 */

:root {
	--cbp-primary: #b4471f;
	--cbp-primary-dark: #8c3718;
	--cbp-tint: #f8ece7;
	--cbp-accent: #3d5a40;
	--cbp-accent-soft: #e9eee9;
	--cbp-sage: #a9b9a6;
	--cbp-sage-dark: #8aa087;
	--cbp-ink: #1d231e;
	--cbp-muted: #636c64;
	--cbp-bg: #f5f6f3;
	--cbp-surface: #ffffff;
	--cbp-line: #e3e7e1;
	--cbp-radius: 22px;
	--cbp-radius-sm: 14px;
	--cbp-cols: 3;
	--cbp-max: 1200px;
	--cbp-font-heading: "Cormorant Infant", Georgia, "Times New Roman", serif;
	--cbp-font-body: "Noto Sans", "Open Sans", Arial, sans-serif;
	--cbp-shadow: 0 14px 34px -16px rgba(29, 35, 30, .28);
	--cbp-shadow-sm: 0 6px 18px -10px rgba(29, 35, 30, .22);
}

/* ================================================================
   1. Base
   ================================================================ */
body #buddypress {
	box-sizing: border-box;
	max-width: var(--cbp-max);
	margin: 0 auto;
	padding: 8px 24px 80px;
	font-family: var(--cbp-font-body);
	font-size: 16px;
	line-height: 1.65;
	color: var(--cbp-ink);
}
body #buddypress *, body #buddypress *::before, body #buddypress *::after { box-sizing: border-box; }
body #buddypress a { color: var(--cbp-accent); text-decoration: none; transition: color .2s ease, background-color .2s ease, border-color .2s ease; }
body #buddypress a:hover, body #buddypress a:focus { color: var(--cbp-primary); }
body #buddypress h1, body #buddypress h2, body #buddypress h3, body #buddypress h4, body #buddypress h5 {
	font-family: var(--cbp-font-heading);
	font-weight: 600;
	letter-spacing: -.01em;
	line-height: 1.15;
	color: var(--cbp-ink);
	margin: 0 0 .5em;
}
body #buddypress h2 { font-size: 36px; }
body #buddypress h3 { font-size: 28px; }
body #buddypress h4 { font-size: 22px; }
body #buddypress p { margin: 0 0 1em; }
body #buddypress img.avatar { border-radius: 50%; object-fit: cover; background: var(--cbp-accent-soft); }
body #buddypress :focus-visible { outline: 3px solid var(--cbp-sage-dark); outline-offset: 2px; }
body #buddypress hr { border: 0; border-top: 1px solid var(--cbp-line); margin: 28px 0; }
body #buddypress .bp-wrap { width: 100%; }
body #buddypress .screen-heading, body #buddypress .bp-widget > h2 { font-size: 34px; margin: 36px 0 20px; }

/* ================================================================
   2. Buttons
   ================================================================ */
body #buddypress .button, body #buddypress a.button, body #buddypress input[type="submit"], body #buddypress input[type="button"], body #buddypress input[type="reset"], body #buddypress .generic-button a, body #buddypress .generic-button button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 11px 24px;
	border: 1.5px solid var(--cbp-ink);
	border-radius: 999px;
	background: transparent;
	color: var(--cbp-ink);
	font: 600 13px/1.2 var(--cbp-font-body);
	letter-spacing: .05em;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	box-shadow: none;
	transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
body #buddypress .button:hover, body #buddypress a.button:hover, body #buddypress input[type="submit"]:hover, body #buddypress input[type="button"]:hover, body #buddypress .generic-button a:hover, body #buddypress .generic-button button:hover {
	background: var(--cbp-ink);
	border-color: var(--cbp-ink);
	color: #fff;
}
body #buddypress input[type="submit"], body #buddypress .button.accept, body #buddypress .button.confirm, body #buddypress .button.submit, body #buddypress #aw-whats-new-submit, body #buddypress .button.primary, body #buddypress .group-button.join-group a, body #buddypress .friendship-button.not_friends a, body #buddypress .generic-button .add {
	background: var(--cbp-primary);
	border-color: var(--cbp-primary);
	color: #fff;
}
body #buddypress input[type="submit"]:hover, body #buddypress .button.accept:hover, body #buddypress .button.confirm:hover, body #buddypress .button.submit:hover, body #buddypress #aw-whats-new-submit:hover, body #buddypress .button.primary:hover, body #buddypress .group-button.join-group a:hover, body #buddypress .friendship-button.not_friends a:hover, body #buddypress .generic-button .add:hover {
	background: var(--cbp-primary-dark);
	border-color: var(--cbp-primary-dark);
	color: #fff;
}
body #buddypress .button.reject, body #buddypress .button.cancel, body #buddypress .ac-reply-cancel, body #buddypress .button.bp-secondary-action, body #buddypress .generic-button .remove {
	border-color: var(--cbp-line);
	color: var(--cbp-muted);
	background: #fff;
}
body #buddypress .button.reject:hover, body #buddypress .button.cancel:hover, body #buddypress .ac-reply-cancel:hover, body #buddypress .generic-button .remove:hover {
	background: var(--cbp-tint);
	border-color: var(--cbp-primary);
	color: var(--cbp-primary);
}
body #buddypress .button.disabled, body #buddypress .button[disabled], body #buddypress input[type="submit"][disabled] { opacity: .5; pointer-events: none; }
body #buddypress .generic-button { margin: 0; }
body #buddypress .action, body #buddypress .member-header-actions, body #buddypress .members-meta.action, body #buddypress .groups-meta.action { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ================================================================
   3. Form fields
   ================================================================ */
body #buddypress input[type="text"], body #buddypress input[type="email"], body #buddypress input[type="password"], body #buddypress input[type="url"], body #buddypress input[type="number"], body #buddypress input[type="tel"], body #buddypress input[type="date"], body #buddypress input[type="search"], body #buddypress select, body #buddypress textarea {
	width: 100%;
	padding: 12px 16px;
	border: 1.5px solid var(--cbp-line);
	border-radius: var(--cbp-radius-sm);
	background: #fff;
	color: var(--cbp-ink);
	font: inherit;
	box-shadow: none;
	transition: border-color .2s ease, box-shadow .2s ease;
}
body #buddypress input:focus, body #buddypress select:focus, body #buddypress textarea:focus {
	outline: none;
	border-color: var(--cbp-accent);
	box-shadow: 0 0 0 4px rgba(61, 90, 64, .14);
}
body #buddypress textarea { min-height: 120px; resize: vertical; }
body #buddypress .standard-form label { display: block; }
body #buddypress .standard-form .select-wrap { display: block; }
body #buddypress .standard-form .submit .button, body #buddypress .standard-form .submit input, body #buddypress .submit .button, body #buddypress .submit input { margin-right: 10px; margin-bottom: 8px; }
body #buddypress legend { padding: 0; }
body #buddypress label, body #buddypress legend { display: inline-block; margin-bottom: 6px; font-weight: 600; font-size: 14px; color: var(--cbp-ink); }
body #buddypress input[type="checkbox"], body #buddypress input[type="radio"] { width: auto; accent-color: var(--cbp-primary); margin-right: 6px; }
body #buddypress .checkbox label, body #buddypress .radio label, body #buddypress .field_type_checkbox label, body #buddypress .field_type_radio label { font-weight: 500; }
body #buddypress ::placeholder { color: #98a09a; }
body #buddypress .standard-form {
	background: #fff;
	border: 1px solid var(--cbp-line);
	border-radius: var(--cbp-radius);
	padding: 32px;
	box-shadow: var(--cbp-shadow-sm);
}
body #buddypress .standard-form .standard-form { padding: 0; border: 0; box-shadow: none; background: transparent; }
body #buddypress .standard-form p, body #buddypress .editfield { margin-bottom: 22px; }
body #buddypress .standard-form .description, body #buddypress .standard-form .field-visibility-settings-toggle, body #buddypress .standard-form .field-visibility-settings-notoggle { font-size: 13px; color: var(--cbp-muted); }
body #buddypress .field-visibility-settings { background: var(--cbp-accent-soft); border-radius: var(--cbp-radius-sm); padding: 14px 18px; }
body #buddypress .standard-form .submit, body #buddypress .submit { margin-top: 8px; }
body #buddypress fieldset { border: 0; padding: 0; margin: 0 0 24px; }
body #buddypress legend { font-family: var(--cbp-font-heading); font-size: 24px; font-weight: 600; }
body #buddypress .select-wrap { position: relative; display: inline-block; min-width: 190px; }
body #buddypress .select-wrap select {
	-webkit-appearance: none;
	appearance: none;
	padding-right: 46px;
	border-radius: 999px;
	cursor: pointer;
	background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d231e' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>") no-repeat right 16px center / 14px;
}
body #buddypress .select-wrap .select-arrow { display: none; }

/* Search */
body #buddypress form.bp-dir-search-form, body #buddypress .bp-search form {
	display: flex;
	align-items: center;
	width: 100%;
	max-width: 440px;
	padding: 5px 5px 5px 20px;
	background: #fff;
	border: 1.5px solid var(--cbp-line);
	border-radius: 999px;
	box-shadow: var(--cbp-shadow-sm);
}
body #buddypress form.bp-dir-search-form:focus-within { border-color: var(--cbp-accent); box-shadow: 0 0 0 4px rgba(61, 90, 64, .14); }
body #buddypress .bp-dir-search-form input[type="search"] { flex: 1; min-width: 0; padding: 8px; border: 0; background: transparent; box-shadow: none; }
body #buddypress .bp-dir-search-form input[type="search"]:focus { box-shadow: none; }
body #buddypress .nouveau-search-submit, body #buddypress .bp-dir-search-form button[type="submit"] {
	position: relative;
	flex: none;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--cbp-primary);
	color: #fff;
	cursor: pointer;
	transition: background-color .2s ease;
}
body #buddypress .nouveau-search-submit:hover { background: var(--cbp-primary-dark); }
body #buddypress .nouveau-search-submit .dashicons { display: none; }
body #buddypress .nouveau-search-submit::before {
	content: "";
	position: absolute;
	inset: 0;
	background: #fff;
	-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'><circle cx='11' cy='11' r='7'/><path d='m20 20-3.5-3.5'/></svg>") center / 18px no-repeat;
	mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'><circle cx='11' cy='11' r='7'/><path d='m20 20-3.5-3.5'/></svg>") center / 18px no-repeat;
}

/* ================================================================
   4. Navigation: directory tabs, profile tabs, sub tabs
   ================================================================ */
body #buddypress .bp-navs { background: transparent; border: 0; overflow: visible; margin: 0 0 8px; }
body #buddypress .bp-navs ul { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 24px; padding: 0; list-style: none; background: transparent; border: 0; }
body #buddypress .bp-navs li { float: none; margin: 0; padding: 0; background: transparent; border: 0; width: auto; }
body #buddypress .bp-navs li a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 20px;
	border: 1.5px solid var(--cbp-line);
	border-radius: 999px;
	background: #fff;
	color: var(--cbp-ink);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
}
body #buddypress .bp-navs li a:hover, body #buddypress .bp-navs li a:focus { border-color: var(--cbp-accent); color: var(--cbp-accent); background: #fff; }
body #buddypress .bp-navs li.selected > a, body #buddypress .bp-navs li.current > a, body #buddypress .bp-navs li.current.selected > a {
	background: var(--cbp-primary);
	border-color: var(--cbp-primary);
	color: #fff;
}
body #buddypress .bp-navs li a .count {
	min-width: 24px;
	padding: 0 9px;
	border-radius: 999px;
	background: var(--cbp-tint);
	color: var(--cbp-primary);
	font-size: 12px;
	line-height: 22px;
	text-align: center;
}
body #buddypress .bp-navs li.selected a .count, body #buddypress .bp-navs li.current a .count { background: rgba(255, 255, 255, .24); color: #fff; }
body #buddypress .bp-navs li.dynamic a { border-style: dashed; }

/* Sub navigation (inside a profile or group) */
body #buddypress .bp-subnavs ul { display: inline-flex; gap: 4px; padding: 5px; background: var(--cbp-accent-soft); border-radius: 999px; }
body #buddypress .bp-subnavs li a { min-height: 36px; padding: 0 18px; border: 0; background: transparent; font-size: 13px; }
body #buddypress .bp-subnavs li a:hover { background: rgba(255, 255, 255, .7); color: var(--cbp-accent); }
body #buddypress .bp-subnavs li.selected > a, body #buddypress .bp-subnavs li.current > a { background: var(--cbp-accent); color: #fff; }
body #buddypress .bp-subnavs li.selected a .count, body #buddypress .bp-subnavs li.current a .count { background: rgba(255, 255, 255, .24); color: #fff; }

/* Force a horizontal layout even when the vertical template option is on */
body #buddypress.bp-vertical-navs .bp-navs.vertical, body #buddypress .bp-navs.vertical { width: 100%; float: none; }
body #buddypress.bp-vertical-navs .item-body, body #buddypress.bp-vertical-navs .bp-wrap .item-body { width: 100%; float: none; margin: 0; padding: 0; }

/* Filters bar */
body #buddypress .subnav-filters { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 28px; padding: 0; list-style: none; }
body #buddypress .subnav-filters > div, body #buddypress .subnav-filters .subnav-search { margin: 0; float: none; }
body #buddypress .subnav-search { flex: 1 1 320px; }
body #buddypress .component-filters, body #buddypress .last.filter { display: flex; align-items: center; gap: 10px; float: none; }
body #buddypress .subnav-filters .filter label { margin: 0 8px 0 0; }

/* ================================================================
   5. Directories (members, groups) as cards
   ================================================================ */
body #buddypress #members-list, body #buddypress #groups-list, body #buddypress ul.members-list, body #buddypress ul.groups-list, body #buddypress ul.item-list.grid, body #buddypress ul.bp-list.grid {
	display: grid;
	grid-template-columns: repeat(var(--cbp-cols), minmax(0, 1fr));
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}
body #buddypress #members-list > li, body #buddypress #groups-list > li, body #buddypress ul.members-list > li, body #buddypress ul.groups-list > li {
	margin: 0;
	padding: 0;
	width: auto;
	float: none;
	background: #fff;
	border: 1px solid var(--cbp-line);
	border-radius: var(--cbp-radius);
	box-shadow: var(--cbp-shadow-sm);
	overflow: hidden;
	transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
body #buddypress #members-list > li:hover, body #buddypress #groups-list > li:hover, body #buddypress ul.members-list > li:hover, body #buddypress ul.groups-list > li:hover {
	transform: translateY(-4px);
	border-color: var(--cbp-sage);
	box-shadow: var(--cbp-shadow);
}
body #buddypress .list-wrap {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	height: 100%;
	padding: 0 24px 26px;
	text-align: center;
	background: transparent;
	border: 0;
}
body #buddypress .list-wrap::before {
	content: "";
	align-self: stretch;
	height: 84px;
	margin: 0 -24px -42px;
	background:
		radial-gradient(70% 120% at 85% 0%, rgba(255, 255, 255, .45), transparent 60%),
		linear-gradient(135deg, var(--cbp-sage), var(--cbp-sage-dark));
}
body #buddypress .list-wrap .item-avatar { position: relative; float: none; width: auto; margin: 0; }
body #buddypress .list-wrap .item-avatar img.avatar { width: 84px; height: 84px; border: 4px solid #fff; box-shadow: var(--cbp-shadow-sm); }
body #buddypress .list-wrap .item { float: none; width: 100%; margin: 0; padding: 0; }
body #buddypress .item-block { margin: 0; }
body #buddypress .list-title, body #buddypress .list-title a { font-family: var(--cbp-font-heading); font-size: 25px; font-weight: 600; line-height: 1.15; color: var(--cbp-ink); margin: 0; }
body #buddypress .list-title a:hover { color: var(--cbp-primary); }
body #buddypress .item-meta, body #buddypress .last-activity, body #buddypress .meta { font-size: 13px; color: var(--cbp-muted); margin: 4px 0 0; }
body #buddypress .is-online .item-avatar::after, body #buddypress li.is-online .item-avatar::after {
	content: "";
	position: absolute;
	right: 4px;
	bottom: 6px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #35a46a;
	border: 3px solid #fff;
}
body #buddypress .member-short-description, body #buddypress .group-desc, body #buddypress .item-desc { font-size: 14px; color: var(--cbp-muted); margin-top: 8px; }
body #buddypress .list-wrap .action, body #buddypress .list-wrap .members-meta, body #buddypress .list-wrap .groups-meta { margin-top: auto; justify-content: center; padding-top: 6px; }
body #buddypress .list-wrap .generic-button a, body #buddypress .list-wrap .generic-button button { padding: 8px 18px; font-size: 12px; }
body #buddypress .group-details, body #buddypress .item-meta .group-type, body #buddypress .group-type {
	display: inline-block;
	padding: 3px 12px;
	border-radius: 999px;
	background: var(--cbp-accent-soft);
	color: var(--cbp-accent);
	font-size: 12px;
	font-weight: 600;
}

/* Pagination */
body #buddypress .bp-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin: 36px 0 0; padding: 0; font-size: 14px; color: var(--cbp-muted); background: transparent; border: 0; }
body #buddypress .bp-pagination .pag-count, body #buddypress .bp-pagination p { margin: 0; }
body #buddypress .pagination-links { display: flex; flex-wrap: wrap; gap: 6px; }
body #buddypress .pagination-links .page-numbers, body #buddypress .pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	padding: 0 12px;
	border: 1.5px solid var(--cbp-line);
	border-radius: 999px;
	background: #fff;
	color: var(--cbp-ink);
	font-weight: 600;
	text-decoration: none;
}
body #buddypress .pagination-links .page-numbers:hover { border-color: var(--cbp-accent); color: var(--cbp-accent); }
body #buddypress .pagination-links .page-numbers.current { background: var(--cbp-primary); border-color: var(--cbp-primary); color: #fff; }
body #buddypress .pagination-links .page-numbers.dots { border: 0; background: transparent; }

/* ================================================================
   6. Profile and group header
   ================================================================ */
body #buddypress #item-header { margin: 0 0 32px; }
body #buddypress #cover-image-container {
	position: relative;
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--cbp-line);
	border-radius: calc(var(--cbp-radius) + 6px);
	box-shadow: var(--cbp-shadow);
}
body #buddypress #header-cover-image {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 1;
	display: block;
	width: 100%;
	height: 230px !important;
	background-color: var(--cbp-sage);
	background-image:
		radial-gradient(60% 90% at 82% 0%, rgba(255, 255, 255, .5), transparent 62%),
		radial-gradient(50% 80% at 14% 100%, rgba(61, 90, 64, .38), transparent 70%),
		linear-gradient(135deg, var(--cbp-sage) 0%, #c3cfc0 48%, var(--cbp-sage-dark) 100%);
	background-position: center;
	background-size: cover;
	border: 0;
}
body #buddypress #item-header-cover-image {
	position: relative;
	z-index: 2;
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 8px 28px;
	margin: 0;
	padding: 158px 36px 32px;
}
body #buddypress #item-header-avatar { float: none; flex: none; width: auto; margin: 0; }
body #buddypress #item-header-avatar img.avatar {
	display: block;
	width: 150px;
	height: 150px;
	border: 6px solid #fff;
	box-shadow: var(--cbp-shadow);
}
body #buddypress #item-header-content { float: none; flex: 1 1 320px; width: auto; min-width: 0; margin: 0; padding: 82px 0 0; color: var(--cbp-ink); }
body #buddypress #item-header-content h2, body #buddypress #item-header-content .user-nicename, body #buddypress #item-header-content .bp-group-title {
	margin: 0 0 4px;
	font-size: 42px;
	line-height: 1.05;
}
body #buddypress #item-header-content .user-nicename a { color: inherit; }
body #buddypress #item-header-content .mention-name, body #buddypress #item-header-content .nicename { font-size: 15px; color: var(--cbp-muted); font-family: var(--cbp-font-body); font-weight: 500; }
body #buddypress #item-header-content .activity, body #buddypress #item-header-content .item-meta .activity, body #buddypress .highlight {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 6px 0 10px;
	padding: 5px 14px;
	border-radius: 999px;
	background: var(--cbp-accent-soft);
	color: var(--cbp-accent);
	font-size: 13px;
	font-weight: 600;
}
body #buddypress #item-header-content .activity::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #35a46a; }
body #buddypress #item-header-content .group-status, body #buddypress #item-header-content .highlight { margin-right: 8px; }
body #buddypress #item-header-content .group-description, body #buddypress #item-header-content .group-description p { color: var(--cbp-muted); max-width: 70ch; margin: 8px 0 0; }
body #buddypress #item-header-content .member-header-actions, body #buddypress #item-header-content .group-header-actions { margin-top: 14px; }
body #buddypress #item-actions { margin-top: 14px; font-size: 13px; color: var(--cbp-muted); }
body #buddypress #item-actions h3 { font-family: var(--cbp-font-body); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 8px; }
body #buddypress #item-actions .avatar { width: 34px; height: 34px; border: 2px solid #fff; }
body #buddypress .item-header-meta, body #buddypress #item-meta { margin-top: 10px; color: var(--cbp-muted); }
body #buddypress .bp-user #item-header, body #buddypress .bp-single-group #item-header { background: transparent; }

/* ================================================================
   7. Profile content: view, edit, tables
   ================================================================ */
body #buddypress .bp-widget { margin: 0 0 32px; }
body #buddypress table, body #buddypress table.bp-tables-user, body #buddypress table.profile-fields {
	width: 100%;
	margin: 0 0 28px;
	border-collapse: separate;
	border-spacing: 0;
	background: #fff;
	border: 1px solid var(--cbp-line);
	border-radius: var(--cbp-radius);
	overflow: hidden;
}
body #buddypress table th { padding: 14px 20px; background: #f7f8f5; border: 0; border-bottom: 1px solid var(--cbp-line); text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--cbp-muted); }
body #buddypress table td { padding: 16px 20px; border: 0; border-bottom: 1px solid var(--cbp-line); vertical-align: middle; background: transparent; }
body #buddypress table tr:last-child td { border-bottom: 0; }
body #buddypress table tbody tr:hover td { background: #fbfcfa; }
body #buddypress table.profile-fields td.label { width: 32%; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--cbp-muted); }
body #buddypress table.profile-fields td.data, body #buddypress table.profile-fields td.data p { margin: 0; font-size: 17px; }
body #buddypress table tr.unread td, body #buddypress table tr.unread { background: var(--cbp-tint); }
body #buddypress table tr.unread td:first-child { box-shadow: inset 4px 0 0 var(--cbp-primary); }
body #buddypress table .notification-actions a, body #buddypress table td.actions a, body #buddypress table td.notification-actions a { display: inline-flex; margin-right: 8px; padding: 5px 14px; border: 1.5px solid var(--cbp-line); border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--cbp-ink); }
body #buddypress table .notification-actions a:hover { border-color: var(--cbp-primary); color: var(--cbp-primary); }
body #buddypress .notifications-options-nav, body #buddypress .bp-notifications-options-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 0 20px; }
body #buddypress .profile-edit .editfield { padding: 0; }
body #buddypress .profile-edit .editfield label, body #buddypress .profile-edit .editfield legend { margin-bottom: 8px; }
body #buddypress .profile-edit .bp-navs ul { margin-bottom: 24px; }

/* ================================================================
   8. Activity
   ================================================================ */
body #buddypress #whats-new-form, body #buddypress .activity-update-form {
	display: grid;
	grid-template-columns: 56px minmax(0, 1fr);
	gap: 6px 16px;
	margin: 0 0 32px;
	padding: 24px;
	background: #fff;
	border: 1px solid var(--cbp-line);
	border-radius: var(--cbp-radius);
	box-shadow: var(--cbp-shadow-sm);
}
body #buddypress #whats-new-form #whats-new-avatar, body #buddypress .activity-update-form .activity-form-avatar { grid-row: 1 / span 3; }
body #buddypress #whats-new-avatar img, body #buddypress .activity-update-form .avatar { width: 56px; height: 56px; }
body #buddypress #whats-new-form .activity-greeting { margin: 4px 0 6px; font-family: var(--cbp-font-heading); font-size: 24px; font-weight: 600; color: var(--cbp-ink); }
body #buddypress #whats-new-content, body #buddypress #whats-new-textarea, body #buddypress #whats-new-options { grid-column: 2; margin: 0; width: 100%; }
body #buddypress #whats-new, body #buddypress #whats-new-textarea textarea { min-height: 112px; padding: 16px 18px; border-radius: 18px; background: #f7f8f5; border-color: transparent; }
body #buddypress #whats-new:focus, body #buddypress #whats-new-textarea textarea:focus { background: #fff; border-color: var(--cbp-accent); }
body #buddypress #whats-new-options { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
body #buddypress #whats-new-submit { margin-left: auto; }
body #buddypress #activity-stream, body #buddypress ul.activity-list { margin: 0; padding: 0; list-style: none; display: block; }
body #buddypress li.activity-item, body #buddypress ul.activity-list > li {
	position: relative;
	display: flex;
	gap: 0 18px;
	margin: 0 0 18px;
	padding: 24px;
	background: #fff;
	border: 1px solid var(--cbp-line);
	border-radius: var(--cbp-radius);
	box-shadow: var(--cbp-shadow-sm);
	transition: box-shadow .25s ease, border-color .25s ease;
	flex-wrap: wrap;
}
body #buddypress li.activity-item:hover { border-color: var(--cbp-sage); box-shadow: var(--cbp-shadow); }
body #buddypress li.activity-item .activity-avatar, body #buddypress li.activity-item .item-avatar { flex: none; width: auto; margin: 0; float: none; }
body #buddypress li.activity-item .activity-avatar img.avatar { width: 56px; height: 56px; }
body #buddypress li.activity-item .activity-content { flex: 1 1 0; min-width: 0; margin: 0; padding: 0; float: none; }
body #buddypress .activity-header { margin: 0 0 12px; font-size: 14px; color: var(--cbp-muted); }
body #buddypress .activity-header p { margin: 0; }
body #buddypress .activity-header a:first-of-type { font-weight: 700; color: var(--cbp-ink); }
body #buddypress .activity-header a:first-of-type:hover { color: var(--cbp-primary); }
body #buddypress .activity-header .time-since, body #buddypress .activity-time-since { color: var(--cbp-muted); font-size: 13px; }
body #buddypress .activity-inner, body #buddypress .activity-content .activity-inner { margin: 0 0 14px; font-size: 16px; line-height: 1.7; color: var(--cbp-ink); }
body #buddypress .activity-inner p:last-child { margin-bottom: 0; }
body #buddypress .activity-inner blockquote, body #buddypress .activity-inner .activity-quote { margin: 14px 0; padding: 14px 20px; border-left: 4px solid var(--cbp-sage); background: #f7f8f5; border-radius: 0 var(--cbp-radius-sm) var(--cbp-radius-sm) 0; }
body #buddypress .activity-inner img { max-width: 100%; height: auto; border-radius: var(--cbp-radius-sm); }
body #buddypress .activity-meta, body #buddypress .activity-meta.action { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 4px 0 0; }
body #buddypress .activity-meta .button, body #buddypress .activity-meta a.button, body #buddypress .activity-meta .generic-button a {
	padding: 6px 14px;
	border: 1.5px solid var(--cbp-line);
	background: #fff;
	color: var(--cbp-muted);
	font-size: 12px;
	letter-spacing: .04em;
	text-transform: none;
	font-weight: 600;
}
body #buddypress .activity-meta .button:hover, body #buddypress .activity-meta a.button:hover { border-color: var(--cbp-primary); background: var(--cbp-tint); color: var(--cbp-primary); }
body #buddypress .activity-meta .fav.unfav, body #buddypress .activity-meta .button.unfav, body #buddypress .activity-meta .bp-like-button.has-like { border-color: var(--cbp-primary); background: var(--cbp-tint); color: var(--cbp-primary); }
body #buddypress .activity-meta .delete-activity:hover, body #buddypress .activity-meta .delete-activity { text-transform: none; }
body #buddypress .activity-meta .comment-count { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--cbp-accent-soft); color: var(--cbp-accent); font-size: 12px; text-align: center; }
body #buddypress li.activity-item .activity-comments { flex: 1 1 100%; margin: 6px 0 0; padding: 0; width: 100%; }
body #buddypress .activity-comments ul { margin: 0; padding: 0; list-style: none; }
body #buddypress .activity-comments ul li { display: flex; flex-wrap: wrap; gap: 12px; margin: 10px 0 0; padding: 14px 16px; background: #f7f8f5; border: 0; border-radius: var(--cbp-radius-sm); }
body #buddypress .activity-comments ul ul { flex: 1 1 100%; margin-top: 8px; }
body #buddypress .acomment-avatar { flex: none; float: none; margin: 0; }
body #buddypress .acomment-avatar img { width: 36px; height: 36px; }
body #buddypress .acomment-meta { flex: 1 1 0; min-width: 0; margin: 0; font-size: 13px; color: var(--cbp-muted); }
body #buddypress .acomment-content { flex: 1 1 100%; padding-left: 48px; margin: -6px 0 0; font-size: 15px; }
body #buddypress .acomment-content p { margin: 0 0 6px; }
body #buddypress .acomment-options { flex: 1 1 100%; padding-left: 48px; font-size: 13px; }
body #buddypress .acomment-options a { margin-right: 14px; font-weight: 600; }
body #buddypress form.ac-form { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px; margin: 12px 0 0; padding: 0; background: transparent; border: 0; box-shadow: none; }
body #buddypress .ac-form .ac-reply-avatar { flex: none; }
body #buddypress .ac-form .ac-reply-avatar img { width: 36px; height: 36px; }
body #buddypress .ac-form .ac-reply-content { flex: 1 1 260px; }
body #buddypress .ac-form textarea { min-height: 72px; border-radius: 16px; }
body #buddypress .ac-form input[type="submit"], body #buddypress .ac-form .ac-reply-cancel { padding: 9px 20px; font-size: 12px; margin-right: 8px; }
body #buddypress .ac-form .ac-form-buttons, body #buddypress .ac-form .ac-reply-content > input, body #buddypress .ac-form .ac-reply-cancel { margin-top: 10px; }
body #buddypress .activity-state, body #buddypress .activity-read-more { font-size: 14px; }
body #buddypress li.load-more, body #buddypress li.load-newest { list-style: none; text-align: center; margin: 12px 0; }
body #buddypress li.load-more a, body #buddypress li.load-newest a { display: inline-flex; padding: 11px 26px; border: 1.5px solid var(--cbp-ink); border-radius: 999px; background: transparent; color: var(--cbp-ink); font-size: 13px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
body #buddypress li.load-more a:hover, body #buddypress li.load-newest a:hover { background: var(--cbp-ink); color: #fff; }

/* ================================================================
   9. Messages
   ================================================================ */
body #buddypress .bp-messages-content, body #buddypress #bp-message-thread-list, body #buddypress .message-lists { margin: 0; padding: 0; list-style: none; }
body #buddypress #bp-message-thread-list li, body #buddypress .message-lists li, body #buddypress li.thread-item {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px;
	margin: 0 0 12px;
	padding: 18px 22px;
	background: #fff;
	border: 1px solid var(--cbp-line);
	border-radius: var(--cbp-radius-sm);
	transition: border-color .2s ease, box-shadow .2s ease;
}
body #buddypress #bp-message-thread-list li:hover, body #buddypress .message-lists li:hover, body #buddypress li.thread-item:hover { border-color: var(--cbp-sage); box-shadow: var(--cbp-shadow-sm); }
body #buddypress li.unread, body #buddypress .thread-item.unread { background: var(--cbp-tint); border-color: #efd3c8; }
body #buddypress .thread-subject .subject, body #buddypress .thread-subject { font-weight: 700; }
body #buddypress .thread-excerpt, body #buddypress .thread-from, body #buddypress .thread-date { color: var(--cbp-muted); font-size: 14px; }
body #buddypress .bp-messages-nav, body #buddypress .bp-messages-filters { margin-bottom: 20px; }
body #buddypress #send-reply, body #buddypress #send_message_form, body #buddypress .message-form { margin-top: 24px; }
body #buddypress .message-thread-header, body #buddypress #message-thread { background: #fff; border: 1px solid var(--cbp-line); border-radius: var(--cbp-radius); padding: 24px; margin-bottom: 20px; }

/* ================================================================
   10. Notices and feedback
   ================================================================ */
body #buddypress .bp-feedback, body #buddypress #message.info, body #buddypress #message.updated, body #buddypress .bp-template-notice {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 24px;
	padding: 14px 20px;
	background: var(--cbp-accent-soft);
	border: 0;
	border-radius: var(--cbp-radius-sm);
	color: var(--cbp-ink);
	box-shadow: inset 4px 0 0 var(--cbp-accent);
}
body #buddypress .bp-feedback p, body #buddypress #message p { margin: 0; }
body #buddypress .bp-feedback .bp-icon { display: none; }
body #buddypress .bp-feedback.error, body #buddypress #message.error, body #buddypress .bp-template-notice.error { background: #fbeceb; box-shadow: inset 4px 0 0 #b3261e; }
body #buddypress .bp-feedback.warning { background: #fbf3e0; box-shadow: inset 4px 0 0 #b8892b; }
body #buddypress .bp-feedback.success, body #buddypress #message.updated, body #buddypress .bp-template-notice.updated { background: #e8f4ec; box-shadow: inset 4px 0 0 #2e7d4f; }
body #buddypress .bp-feedback.loading { background: #f7f8f5; box-shadow: inset 4px 0 0 var(--cbp-sage); color: var(--cbp-muted); }
body #buddypress .bp-feedback a { font-weight: 700; text-decoration: underline; }
body #buddypress .user-badge, body #buddypress .bp-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--cbp-tint); color: var(--cbp-primary); font-size: 12px; font-weight: 700; }

/* ================================================================
   11. Sign up, activation, group creation
   ================================================================ */
body #buddypress #register-page, body #buddypress #activate-page, body #buddypress .registration-form, body #buddypress #signup-form { max-width: 760px; margin-left: auto; margin-right: auto; }
body #buddypress #register-page .page-title, body #buddypress #activate-page .page-title { text-align: center; }
body #buddypress #signup-form.standard-form, body #buddypress #register-page form { padding: 40px; }
body #buddypress #signup-form .register-section { padding: 0 0 8px; margin: 0 0 28px; border-bottom: 1px solid var(--cbp-line); }
body #buddypress #signup-form .register-section:last-of-type { border-bottom: 0; }
body #buddypress #signup-form h2, body #buddypress #signup-form .register-section h2 { font-size: 30px; margin-bottom: 18px; }
body #buddypress #signup-submit { width: 100%; padding: 15px 24px; font-size: 14px; }
body #buddypress #group-create-body, body #buddypress .group-create-body { margin-top: 12px; }
body #buddypress #group-create-tabs ul { margin-bottom: 28px; }
body #buddypress .group-create-buttons, body #buddypress .submit.group-create-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
body #buddypress .group-avatar-image, body #buddypress #avatar-upload, body #buddypress .avatar-nav-items { margin: 18px 0; }
body #buddypress #avatar-crop-pane { max-width: 100%; border-radius: var(--cbp-radius-sm); overflow: hidden; }
body #buddypress .bp-avatar-nav ul, body #buddypress .avatar-nav-items { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 18px; }
body #buddypress .drag-drop-inside, body #buddypress .drag-drop { border: 2px dashed var(--cbp-sage); border-radius: var(--cbp-radius); background: #f9faf8; padding: 32px; text-align: center; }
body #buddypress .drag-drop.drag-over { border-color: var(--cbp-primary); background: var(--cbp-tint); }
body #buddypress .bp-avatar-status, body #buddypress .bp-cover-image-status { margin: 12px 0; }
body #buddypress .bp-uploader-progress, body #buddypress .progress { height: 8px; background: var(--cbp-line); border-radius: 999px; overflow: hidden; }
body #buddypress .bp-uploader-progress .bp-progress-bar, body #buddypress .progress-bar { height: 100%; background: var(--cbp-primary); }

/* Members and groups lists inside other screens (friends, group members, invites) */
body #buddypress #item-body .members-list, body #buddypress #item-body .groups-list { margin-top: 8px; }
body #buddypress #item-body .item-list:not(.activity-list):not(.members-list):not(.groups-list) > li { padding: 16px 20px; margin-bottom: 10px; background: #fff; border: 1px solid var(--cbp-line); border-radius: var(--cbp-radius-sm); list-style: none; }
body #buddypress #group-invites-container, body #buddypress .invites-list { margin-top: 12px; }
body #buddypress .group-manage-nav, body #buddypress .groups-manage-members-list { margin-bottom: 24px; }
body #buddypress .bp-groups-admin-nav { margin-bottom: 20px; }

/* ================================================================
   12. BuddyPress widgets (sidebars, Elementor, shortcodes)
   ================================================================ */
body .widget.buddypress, body .widget_bp_core_members_widget, body .widget_bp_groups_widget, body .widget_bp_core_login_widget, body .widget_bp_core_whos_online_widget, body .widget_bp_core_recently_active_widget {
	font-family: var(--cbp-font-body);
	color: var(--cbp-ink);
}
body .widget.buddypress .widget-title, body .widget.buddypress h2, body .widget.buddypress h3 { font-family: var(--cbp-font-heading); font-weight: 600; font-size: 26px; color: var(--cbp-ink); }
body .widget.buddypress .item-options { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; font-size: 13px; }
body .widget.buddypress .item-options a { padding: 5px 14px; border: 1.5px solid var(--cbp-line); border-radius: 999px; color: var(--cbp-ink); font-weight: 600; text-decoration: none; }
body .widget.buddypress .item-options a.selected, body .widget.buddypress .item-options a:hover { background: var(--cbp-primary); border-color: var(--cbp-primary); color: #fff; }
body .widget.buddypress ul.item-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
body .widget.buddypress ul.item-list li { display: flex; align-items: center; gap: 12px; margin: 0; padding: 12px 14px; background: #fff; border: 1px solid var(--cbp-line); border-radius: var(--cbp-radius-sm); }
body .widget.buddypress .item-avatar img.avatar { width: 44px; height: 44px; border-radius: 50%; }
body .widget.buddypress .item-title a { font-weight: 700; color: var(--cbp-ink); }
body .widget.buddypress .item-meta .activity { font-size: 12px; color: var(--cbp-muted); }
body .widget.buddypress .avatar-block { display: flex; flex-wrap: wrap; gap: 8px; }
body .widget.buddypress .avatar-block img.avatar { width: 48px; height: 48px; border: 2px solid #fff; box-shadow: var(--cbp-shadow-sm); }
body .widget_bp_core_login_widget input[type="text"], body .widget_bp_core_login_widget input[type="password"] { width: 100%; padding: 11px 16px; border: 1.5px solid var(--cbp-line); border-radius: var(--cbp-radius-sm); }
body .widget_bp_core_login_widget input[type="submit"] { padding: 11px 24px; border: 0; border-radius: 999px; background: var(--cbp-primary); color: #fff; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; cursor: pointer; }

/* ================================================================
   13. Responsive
   ================================================================ */
@media (max-width: 1024px) {
	body #buddypress #members-list, body #buddypress #groups-list, body #buddypress ul.members-list, body #buddypress ul.groups-list, body #buddypress ul.item-list.grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 782px) {
	body #buddypress { padding-left: 16px; padding-right: 16px; }
	body #buddypress h2 { font-size: 30px; }
	body #buddypress #header-cover-image { height: 170px !important; }
	body #buddypress #item-header-cover-image { padding: 110px 22px 26px; flex-direction: column; align-items: center; text-align: center; }
	body #buddypress #item-header-avatar img.avatar { width: 124px; height: 124px; }
	body #buddypress #item-header-content { flex-basis: auto; width: 100%; padding-top: 0; }
	body #buddypress #item-header-content h2, body #buddypress #item-header-content .user-nicename { font-size: 34px; }
	body #buddypress #item-header-content .member-header-actions, body #buddypress #item-header-content .group-header-actions { justify-content: center; }
	body #buddypress .bp-navs ul { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
	body #buddypress .bp-navs ul::-webkit-scrollbar { display: none; }
	body #buddypress .bp-navs li a { white-space: nowrap; }
	body #buddypress .bp-subnavs ul { display: flex; border-radius: 24px; }
	body #buddypress .subnav-filters { flex-direction: column; align-items: stretch; }
	body #buddypress form.bp-dir-search-form { max-width: none; }
	body #buddypress .component-filters, body #buddypress .last.filter { justify-content: space-between; }
	body #buddypress .select-wrap { flex: 1; }
	body #buddypress #whats-new-form, body #buddypress .activity-update-form { grid-template-columns: 44px minmax(0, 1fr); padding: 18px; }
	body #buddypress #whats-new-avatar img { width: 44px; height: 44px; }
	body #buddypress li.activity-item { padding: 18px; gap: 14px; }
	body #buddypress li.activity-item .activity-avatar img.avatar { width: 44px; height: 44px; }
	body #buddypress .standard-form, body #buddypress #signup-form.standard-form { padding: 22px; }
	body #buddypress table { display: block; overflow-x: auto; }
	body #buddypress .acomment-content, body #buddypress .acomment-options { padding-left: 0; }
}
@media (max-width: 560px) {
	body #buddypress #members-list, body #buddypress #groups-list, body #buddypress ul.members-list, body #buddypress ul.groups-list, body #buddypress ul.item-list.grid { grid-template-columns: minmax(0, 1fr); }
	body #buddypress .bp-pagination { justify-content: center; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
	body #buddypress *, body #buddypress *::before, body #buddypress *::after { transition: none !important; animation: none !important; }
	body #buddypress #members-list > li:hover, body #buddypress #groups-list > li:hover { transform: none; }
}
