/**
 * ITM Community styles — directories, groups, activity.
 */

#itm-community #members-list li,
#itm-community #groups-list li,
#itm-community #item-header,
#itm-community #item-nav,
#itm-community #item-body,
#itm-community .dir-search {
	float: none;
}

.itm-community-page .entry-content #itm-community {
	margin: 0;
	padding: 0;
}

.itm-community-page #itm-community::before {
	content: '';
	display: block;
	height: 4px;
	background: linear-gradient(90deg, var(--itm-accent), rgba(var(--itm-accent-rgb), 0.35));
	border-radius: 4px;
	margin-bottom: 24px;
}

/* Directory pages — show the page title (not member/group profile Activity) */
body.itm-com-members-dir.itm-community-page .entry-header,
body.itm-com-groups-dir.itm-community-page .entry-header,
body.itm-com-activity-dir.itm-community-page .entry-header {
	display: block !important;
	margin-bottom: 24px;
}

/* Members / Activity directory — match Reviews / topic archive header */
body.itm-com-members-dir.itm-community-page .itm-members-dir-header,
body.itm-com-activity-dir.itm-community-page .itm-activity-dir-header {
	display: block !important;
	margin-bottom: 36px;
}

/* Groups / Members directory — Youzify-style full-bleed landing image */
body.itm-com-groups-dir,
body.itm-com-members-dir {
	overflow-x: clip;
}

body.itm-com-groups-dir .site-main.container,
body.itm-com-members-dir .site-main.container {
	padding-top: 0;
}

body.itm-com-groups-dir.itm-community-page .itm-groups-dir-header.itm-groups-dir-hero,
body.itm-com-groups-dir .itm-groups-dir-header.itm-groups-dir-hero,
body.itm-com-members-dir.itm-community-page .itm-members-dir-header.itm-members-dir-hero,
body.itm-com-members-dir .itm-members-dir-header.itm-members-dir-hero {
	display: block !important;
	margin: 0 calc(50% - 50vw) 28px;
	width: 100vw;
	max-width: 100vw;
	padding: 0;
	border: 0;
	background: transparent;
}

body.itm-com-groups-dir .itm-groups-dir-hero__media,
body.itm-com-members-dir .itm-groups-dir-hero__media {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: clamp(220px, 32vw, 360px);
	overflow: hidden;
	background: #1a1f2a;
}

body.itm-com-groups-dir .itm-groups-dir-hero__image,
body.itm-com-members-dir .itm-groups-dir-hero__image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
}

body.itm-com-groups-dir .itm-groups-dir-hero__media::after,
body.itm-com-members-dir .itm-groups-dir-hero__media::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(
 180deg,
 rgba(10, 14, 22, 0.35) 0%,
 rgba(10, 14, 22, 0.55) 55%,
 rgba(10, 14, 22, 0.72) 100%
	);
	pointer-events: none;
}

body.itm-com-groups-dir .itm-groups-dir-hero__text,
body.itm-com-members-dir .itm-groups-dir-hero__text {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: var(--itm-community-container, 1080px);
	width: 100%;
	padding: 48px 20px 40px;
	text-align: center;
	color: #fff;
}

body.itm-com-groups-dir .itm-groups-dir-hero__title,
body.itm-com-groups-dir .itm-groups-dir-hero__title.page-title,
body.itm-com-members-dir .itm-groups-dir-hero__title,
body.itm-com-members-dir .itm-groups-dir-hero__title.page-title {
	margin: 0 0 10px;
	font-size: clamp(1.85rem, 4vw, 2.75rem);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.02em;
	color: #fff;
	text-align: center;
	text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}

body.itm-com-groups-dir .itm-groups-dir-hero__subtitle,
body.itm-com-members-dir .itm-groups-dir-hero__subtitle {
	margin: 0 0 22px;
	max-width: 36rem;
	font-size: clamp(1rem, 1.8vw, 1.2rem);
	font-weight: 400;
	line-height: 1.45;
	color: rgba(255, 255, 255, 0.92);
	text-align: center;
	text-shadow: 0 1px 10px rgba(0, 0, 0, 0.3);
}

body.itm-com-groups-dir .itm-groups-dir-hero__search,
body.itm-com-members-dir .itm-groups-dir-hero__search {
	width: min(560px, 100%);
	margin: 0;
	text-align: center;
}

body.itm-com-groups-dir .itm-groups-dir-hero__search form,
body.itm-com-groups-dir .itm-groups-dir-hero__search #search-groups-form,
body.itm-com-members-dir .itm-groups-dir-hero__search form,
body.itm-com-members-dir .itm-groups-dir-hero__search #search-members-form {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 12px 14px;
	background: rgba(255, 255, 255, 0.96);
	border: 1px solid rgba(255, 255, 255, 0.65);
	border-radius: var(--itm-radius-lg, 14px);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
}

body.itm-com-groups-dir .itm-groups-dir-hero__search label:not(.screen-reader-text),
body.itm-com-members-dir .itm-groups-dir-hero__search label:not(.screen-reader-text) {
	flex: 1 1 200px;
	margin: 0;
	min-width: 0;
}

body.itm-com-groups-dir .itm-groups-dir-hero__search input[type="text"],
body.itm-com-groups-dir .itm-groups-dir-hero__search #groups_search,
body.itm-com-members-dir .itm-groups-dir-hero__search input[type="search"],
body.itm-com-members-dir .itm-groups-dir-hero__search #members_search {
	width: 100%;
	min-width: 0;
	margin: 0;
	padding: 11px 14px;
	background: #fff;
	border: 1px solid var(--itm-border, rgba(0, 0, 0, 0.12));
	border-radius: 10px;
	font-size: 0.95rem;
	color: var(--itm-text, #111);
}

body.itm-com-groups-dir .itm-groups-dir-hero__search input[type="submit"],
body.itm-com-groups-dir .itm-groups-dir-hero__search #groups_search_submit,
body.itm-com-members-dir .itm-groups-dir-hero__search input[type="submit"],
body.itm-com-members-dir .itm-groups-dir-hero__search #members_search_submit {
	flex: 0 0 auto;
	margin: 0;
	padding: 11px 22px;
	background: var(--itm-accent, #52525b);
	color: #fff;
	border: none;
	border-radius: 10px;
	font-size: 0.9rem;
	font-weight: 600;
	cursor: pointer;
}

body.itm-com-activity-dir.itm-community-page .entry-header .page-title,
body.itm-com-activity-dir.itm-community-page .entry-header .entry-title {
	margin: 0;
	font-size: clamp(1.75rem, 3vw, 2.25rem);
	color: var(--itm-heading);
}

body.itm-com-members-dir.itm-community-page .entry-content,
body.itm-com-groups-dir.itm-community-page .entry-content,
body.itm-com-activity-dir.itm-community-page .entry-content {
	padding-top: 0;
}

#itm-community {
	font-family: var(--itm-font);
	color: var(--itm-text);
	max-width: 100%;
	line-height: 1.5;
}

#itm-community a {
	box-shadow: none;
	text-decoration: none;
}

#itm-community a:hover { opacity: 0.9; }
#itm-community a#header-cover-image:hover,
#itm-community .itm-profile-hero__cover a#header-cover-image:hover {
	opacity: 1;
}

/* Page title strip on directories — members/groups match profile width */
body.itm-com-activity .site-main.container,
body.itm-com-group .site-main.container,
body.itm-community-page:not(.itm-com-members-dir):not(.itm-com-groups-dir) .site-main.container,
body.itm-ufst-directory .itm-ufst-page .container {
	max-width: min(1240px, 100%);
}

body.itm-com-members-dir .site-main.container,
body.itm-com-groups-dir .site-main.container {
	max-width: var(--itm-community-container, 1080px);
}

body.itm-ufst-single .itm-ufst-page .container {
	max-width: var(--itm-community-container, 1080px);
}

/* Directory search */
#itm-community .dir-search,
#itm-community #members-dir-search,
#itm-community #groups-dir-search {
	float: none;
	margin: 0 0 20px;
	text-align: left;
}

#itm-community .dir-search form,
#itm-community #search-members-form,
#itm-community #search-groups-form {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	align-items: center;
	background: var(--itm-bg-card);
	border: 1px solid var(--itm-border);
	border-radius: var(--itm-radius-lg);
	padding: 14px 16px;
	box-shadow: var(--itm-shadow);
}

#itm-community .dir-search input[type="text"],
#itm-community #members_search,
#itm-community #groups_search {
	flex: 1;
	min-width: 200px;
	background: var(--itm-bg);
	border: 1px solid var(--itm-border);
	border-radius: 10px;
	padding: 11px 14px;
	font-size: 0.95rem;
	color: var(--itm-text);
}

#itm-community .dir-search input[type="submit"],
#itm-community #members_search_submit,
#itm-community #groups_search_submit {
	background: var(--itm-accent);
	color: #fff;
	border: none;
	border-radius: 10px;
	padding: 11px 24px;
	font-weight: 600;
	cursor: pointer;
	font-size: 0.9rem;
}

/* Tabs — text links on wash, no pill backgrounds */
#itm-community .item-list-tabs {
	background: transparent;
	border: 0;
	border-radius: 0;
	padding: 0 0 16px;
	margin: 0 0 16px;
	box-shadow: none;
	overflow: visible;
}

#itm-community .item-list-tabs ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 6px;
	list-style: none;
	margin: 0;
	padding: 0;
	border: none;
}

#itm-community .item-list-tabs li { margin: 0; }

#itm-community .item-list-tabs li a,
#itm-community .item-list-tabs li span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 10px;
	border-radius: var(--itm-btn-radius, 4px);
	font-weight: 600;
	font-size: 0.82rem;
	color: var(--itm-heading);
	background: transparent;
	border: 1px solid transparent;
}

#itm-community .item-list-tabs li.selected a,
#itm-community .item-list-tabs li.current a {
	background: var(--itm-btn-bg, #52525b);
	border-color: var(--itm-btn-border, #52525b);
	color: #fff !important;
}

/* Member / group primary profile tabs use underline active state */
body.itm-com-user #itm-community #item-nav .item-list-tabs li.selected a,
body.itm-com-user #itm-community #item-nav .item-list-tabs li.current a,
body.itm-com-group #itm-community #item-nav .item-list-tabs li.selected a,
body.itm-com-group #itm-community #item-nav .item-list-tabs li.current a {
	background: transparent;
	border-color: transparent;
	color: #24262b !important;
}

#itm-community .item-list-tabs li a span,
#itm-community .item-list-tabs li a .count {
	background: rgba(var(--itm-accent-rgb), 0.12);
	color: var(--itm-accent);
	border-radius: 20px;
	padding: 2px 8px;
	font-size: 0.72rem;
	font-weight: 700;
	margin-left: 4px;
}

#itm-community .item-list-tabs li.selected a span,
#itm-community .item-list-tabs li.selected a .count,
#itm-community .item-list-tabs li.current a span {
	background: rgba(255, 255, 255, 0.25);
	color: #fff;
}

body.itm-com-user #itm-community #item-nav .item-list-tabs li.selected a span,
body.itm-com-user #itm-community #item-nav .item-list-tabs li.selected a .count,
body.itm-com-user #itm-community #item-nav .item-list-tabs li.current a span,
body.itm-com-group #itm-community #item-nav .item-list-tabs li.selected a span,
body.itm-com-group #itm-community #item-nav .item-list-tabs li.selected a .count {
	background: rgba(82, 82, 91, 0.12);
	color: #52525b;
}

#itm-community #subnav.item-list-tabs {
	background: transparent;
	border: none;
	box-shadow: none;
	padding: 0 0 16px;
}

#itm-community #subnav select {
	background: var(--itm-bg-card);
	border: 1px solid var(--itm-border);
	border-radius: 8px;
	padding: 8px 12px;
	color: var(--itm-text);
	box-shadow: var(--itm-shadow);
}

/* Member / group directory cards */
#itm-community #members-list,
#itm-community #groups-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
	clear: both;
}

/* Members directory: exactly 3 cards per row on desktop */
body.itm-com-members-dir #itm-community #members-list {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

#itm-community #members-list > li,
#itm-community #groups-list > li {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 22px 16px 16px;
	width: auto;
	text-align: center;
	background: var(--itm-bg-card);
	border: 1px solid var(--itm-border);
	border-radius: var(--itm-radius-lg);
	box-shadow: var(--itm-shadow);
	overflow: hidden;
}

/* Cover art band — directory cards only (full-bleed top, avatar overlaps) */
body.itm-com-members-dir #itm-community #members-list > li.itm-member-card--with-cover,
body.itm-com-groups-dir #itm-community #groups-list > li.itm-group-card--with-cover {
	padding: 0 16px 16px !important;
}

body.itm-com-members-dir #itm-community #members-list > li > .itm-member-card-cover,
body.itm-com-groups-dir #itm-community #groups-list > li > .itm-group-card-cover {
	display: block;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 110px;
	margin: 0;
	padding: 0;
	z-index: 0;
	background-color: #c5ccd6;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	pointer-events: none;
}

body.itm-com-members-dir #itm-community #members-list > li > .itm-member-card-cover--fallback,
body.itm-com-groups-dir #itm-community #groups-list > li > .itm-group-card-cover--fallback {
	background-image: linear-gradient(135deg, #d7dde6 0%, #b7c0ce 52%, #97a3b4 100%);
}

body.itm-com-members-dir #itm-community #members-list > li > .itm-member-card-cover::after,
body.itm-com-groups-dir #itm-community #groups-list > li > .itm-group-card-cover::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0) 42%, rgba(0, 0, 0, 0.18) 100%);
	pointer-events: none;
}

body.itm-com-members-dir #itm-community #members-list > li > .itm-member-card-cover .itm-member-card-cover__link,
body.itm-com-groups-dir #itm-community #groups-list > li > .itm-group-card-cover .itm-group-card-cover__link {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: auto;
}

body.itm-com-members-dir #itm-community #members-list > li.itm-member-card--with-cover > .item-avatar,
body.itm-com-groups-dir #itm-community #groups-list > li.itm-group-card--with-cover > .item-avatar {
	position: relative;
	z-index: 2;
	width: 100%;
	margin: 58px 0 0 !important;
	padding: 0;
	float: none;
	text-align: center;
	overflow: visible !important;
}

body.itm-com-members-dir #itm-community #members-list > li.itm-member-card--with-cover > .item-avatar > a,
body.itm-com-groups-dir #itm-community #groups-list > li.itm-group-card--with-cover > .item-avatar > a {
	position: relative;
	display: inline-block;
	line-height: 0;
	overflow: visible;
}

body.itm-com-members-dir #itm-community #members-list > li.itm-member-card--with-cover > .item-avatar img.avatar,
body.itm-com-groups-dir #itm-community #groups-list > li.itm-group-card--with-cover > .item-avatar img.avatar {
	border-color: var(--itm-bg-card) !important;
	margin: 0 !important;
}

body.itm-com-members-dir #itm-community #members-list > li.itm-member-card--with-cover > .item,
body.itm-com-members-dir #itm-community #members-list > li.itm-member-card--with-cover > .action,
body.itm-com-groups-dir #itm-community #groups-list > li.itm-group-card--with-cover > .item,
body.itm-com-groups-dir #itm-community #groups-list > li.itm-group-card--with-cover > .action {
	position: relative;
	z-index: 2;
}

html.itm-theme-dark body.itm-com-members-dir #itm-community #members-list > li > .itm-member-card-cover--fallback,
body.itm-theme-dark.itm-com-members-dir #itm-community #members-list > li > .itm-member-card-cover--fallback,
html.itm-theme-dark body.itm-com-groups-dir #itm-community #groups-list > li > .itm-group-card-cover--fallback,
body.itm-theme-dark.itm-com-groups-dir #itm-community #groups-list > li > .itm-group-card-cover--fallback {
	background-image: linear-gradient(135deg, #3a3b3c 0%, #2a2b2c 55%, #1c1d1e 100%);
}

/* Profile group lists keep compact rows (no directory cover bands) */
body.itm-com-user #item-body #groups-list .itm-group-card-cover {
	display: none !important;
}

/* Friends / member lists on profiles keep the compact row layout */
body.itm-com-user #item-body #members-list .itm-member-card-cover {
	display: none !important;
}

#itm-community #members-list > li:hover,
#itm-community #groups-list > li:hover {
	transform: none;
	box-shadow: var(--itm-shadow);
}

#itm-community #members-list > li .clear,
#itm-community #groups-list > li .clear {
	display: none;
}

#itm-community #members-list .item-avatar,
#itm-community #groups-list .item-avatar {
	float: none;
	width: 100%;
	margin: 0;
	text-align: center;
}

#itm-community #members-list .item-avatar img.avatar,
#itm-community #groups-list .item-avatar img.avatar {
	float: none;
	width: 100px;
	height: 100px;
	border-radius: 50%;
	border: 4px solid var(--itm-bg-elevated);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
	margin: 0 auto;
}

#itm-community #members-list .item,
#itm-community #groups-list .item {
	float: none;
	position: static;
	width: 100%;
	margin: 0;
	padding: 0;
	background: transparent;
	border: none;
	border-radius: 0;
	box-shadow: none;
	text-align: center;
	transform: none;
}

/* Name + Active on one row (matches profile header) */
#itm-community #members-list .item {
	display: flex;
	flex-flow: row wrap;
	align-items: baseline;
	justify-content: center;
	gap: 4px 10px;
}

#itm-community #members-list .item .item-title {
	margin: 0;
}

#itm-community #members-list .item .item-meta {
	margin: 0;
}

#itm-community #members-list .item .item-desc,
#itm-community #members-list .item .itm-member-card-badges {
	flex: 1 0 100%;
}

#itm-community #members-list .item:hover,
#itm-community #groups-list .item:hover {
	transform: none;
	box-shadow: none;
}

#itm-community #members-list .item .item-title,
#itm-community #groups-list .item .item-title {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: center;
	gap: 6px 10px;
	margin: 0 0 4px;
	font-size: 1.02rem;
	font-weight: 700;
	width: auto;
}

#itm-community #members-list .item .item-title a,
#itm-community #groups-list .item .item-title a {
	color: var(--itm-heading);
}

#itm-community #members-list .item .item-meta,
#itm-community #groups-list .item .item-meta,
#itm-community #members-list .item .activity,
#itm-community #groups-list .item .activity {
	color: var(--itm-text-muted);
	font-size: 0.78rem;
	width: auto;
	margin: 0;
}

/* Active status sits with the name on member cards */
#itm-community #members-list .item .item-title .activity,
#itm-community #members-list .item .item-title .itm-member-card-active {
	font-size: 0.75rem;
	font-weight: 500;
	color: var(--itm-text-muted);
	white-space: nowrap;
}

#itm-community #members-list .itm-member-card-badges {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 4px 6px;
	margin-top: 2px;
	max-width: 100%;
	overflow: visible;
}

#itm-community #members-list .itm-member-card-badges .itm-member-level,
#itm-community #members-list .itm-member-card-badges .itm-member-type-pill {
	flex: 0 0 auto;
	padding: 2px 8px;
	font-size: 0.68rem;
	box-shadow: none;
}

#itm-community #members-list .itm-member-card-badges .itm-badge-strip {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 4px;
	margin: 0;
	width: 100%;
	overflow: visible;
}

#itm-community #members-list .itm-member-card-badges .itm-badge-chip {
	flex: 0 0 auto;
	width: 28px;
	height: 28px;
	padding: 0 !important;
	justify-content: center;
	font-size: 0.72rem;
	box-shadow: none;
	transition: none;
}

#itm-community #members-list .itm-member-card-badges .itm-badge-chip--more {
	width: auto;
	min-width: 28px;
	padding: 0 8px !important;
}

#itm-community #members-list .itm-member-card-badges .itm-badge-chip:hover {
	transform: none;
	box-shadow: none;
}

#itm-community #members-list .item .item-desc,
#itm-community #groups-list .item .item-desc {
	width: auto;
	margin: 8px 0 0;
	color: var(--itm-text-muted);
	font-size: 0.84rem;
}

#itm-community #members-list .action,
#itm-community #groups-list .action {
	position: static;
	float: none;
	width: 100%;
	margin: 8px 0 0;
	text-align: center;
	top: auto;
	right: auto;
}

/* Members / Groups directory — same width as profile pages */
body.itm-com-members-dir .site-main.container,
body.itm-com-members-dir.itm-auth-page .site-main.container,
body.itm-com-groups-dir .site-main.container,
body.itm-com-groups-dir.itm-auth-page .site-main.container {
	padding: 0 16px 64px;
	max-width: var(--itm-community-container, 1080px);
	width: 100%;
	margin-left: auto;
	margin-right: auto;
	box-sizing: border-box;
}

body.itm-com-members-dir #itm-community.itm-social-members-directory, #community.itm-social-members-directory,
body.itm-com-groups-dir #itm-community.itm-social-groups-directory.itm-social-groups-directory , #community.itm-social-groups-directory.itm-social-groups-directory {
	max-width: 100%;
	margin: 0;
	padding: 0 0 24px;
}

/* Directory filter links in a white panel below the hero */
body.itm-com-members-dir #itm-community .itm-dir-nav-panel,
body.itm-com-groups-dir #itm-community .itm-dir-nav-panel {
	margin: 0 0 20px !important;
	padding: 14px 16px !important;
	background: var(--itm-bg-card, #ffffff) !important;
	border: 1px solid var(--itm-border, rgba(0, 0, 0, 0.08)) !important;
	border-radius: var(--itm-radius, 12px) !important;
	box-shadow: none !important;
}

body.itm-com-members-dir #itm-community .itm-dir-nav-panel ul,
body.itm-com-groups-dir #itm-community .itm-dir-nav-panel ul {
	margin: 0 !important;
	padding: 0 !important;
}

/* Hero search: keep input + Search button on one row */
body.itm-com-members-dir .itm-groups-dir-hero__search form,
body.itm-com-members-dir .itm-groups-dir-hero__search #search-members-form,
body.itm-com-groups-dir .itm-groups-dir-hero__search form,
body.itm-com-groups-dir .itm-groups-dir-hero__search #search-groups-form {
	display: flex !important;
	flex-wrap: nowrap !important;
	align-items: center !important;
	gap: 10px !important;
}

body.itm-com-members-dir .itm-groups-dir-hero__search label.screen-reader-text,
body.itm-com-groups-dir .itm-groups-dir-hero__search label.screen-reader-text {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
	flex: 0 0 0 !important;
}

body.itm-com-members-dir .itm-groups-dir-hero__search input[type="search"],
body.itm-com-members-dir .itm-groups-dir-hero__search #members_search,
body.itm-com-groups-dir .itm-groups-dir-hero__search input[type="search"],
body.itm-com-groups-dir .itm-groups-dir-hero__search #groups_search {
	flex: 1 1 auto !important;
	width: auto !important;
	min-width: 0 !important;
}

body.itm-com-members-dir .itm-groups-dir-hero__search input[type="submit"],
body.itm-com-members-dir .itm-groups-dir-hero__search #members_search_submit,
body.itm-com-groups-dir .itm-groups-dir-hero__search input[type="submit"],
body.itm-com-groups-dir .itm-groups-dir-hero__search #groups_search_submit {
	flex: 0 0 auto !important;
	white-space: nowrap !important;
}

body.itm-com-members-dir.itm-community-page #itm-community::before,
body.itm-com-groups-dir.itm-community-page #itm-community::before,
body.itm-com-user.itm-community-page #itm-community::before,
body.itm-com-group.itm-community-page #itm-community::before {
	display: none;
}

/* Members / groups directory — no giant white shell; wash + cards */
body.itm-com-members-dir #itm-community #members-directory-form,
body.itm-com-groups-dir #itm-community #groups-directory-form {
	background: transparent;
	border: 0;
	border-radius: 0;
	padding: 0;
	box-shadow: none;
}

/* Hide duplicate bottom member count */
body.itm-com-members-dir #pag-bottom .pag-count,
body.itm-com-members-dir #member-dir-count-bottom {
	display: none !important;
}

/* Members directory tabs — readable text on card background */
body.itm-com-members-dir #itm-community #subnav.item-list-tabs li a {
	color: var(--itm-heading) !important;
}

body.itm-com-members-dir #itm-community #subnav.item-list-tabs li:not(.selected) a span,
body.itm-com-members-dir #itm-community #subnav.item-list-tabs li:not(.selected) a .count {
	background: rgba(var(--itm-accent-rgb), 0.12) !important;
	color: var(--itm-accent) !important;
}

body.itm-com-members-dir #itm-community #subnav.item-list-tabs li.selected a,
body.itm-com-members-dir #itm-community #members-all.selected a {
	background: var(--itm-accent) !important;
	color: #fff !important;
}

body.itm-com-members-dir #itm-community #subnav.item-list-tabs li.selected a span,
body.itm-com-members-dir #itm-community #subnav.item-list-tabs li.selected a .count,
body.itm-com-members-dir #itm-community #members-all.selected a span,
body.itm-com-members-dir #itm-community #members-all.selected a .count {
	background: rgba(255, 255, 255, 0.25) !important;
	color: #fff !important;
}

/* Pulsating directory avatars */
body.itm-com-members-dir #itm-community #members-list .item-avatar img.avatar {
	animation: itm-avatar-pulse 2.8s ease-in-out infinite;
}

@keyframes itm-avatar-pulse {
	0%,
	100% {
 box-shadow: 0 0 0 0 rgba(var(--itm-accent-rgb), 0.45), 0 6px 20px rgba(0, 0, 0, 0.1);
	}

	50% {
 box-shadow: 0 0 0 10px rgba(var(--itm-accent-rgb), 0), 0 6px 20px rgba(0, 0, 0, 0.1);
	}
}

body.itm-com-members-dir #itm-community #members-dir-list {
	margin-top: 20px;
}

/* Directory primary nav: All Members / My Friends + Order By on one row */
body.itm-com-members-dir #itm-community .itm-dir-nav,
body.itm-com-groups-dir #itm-community .itm-dir-nav,
body.itm-com-activity-dir #itm-community .activity-type-tabs {
	float: none;
	width: 100%;
	margin: 0 0 16px;
	padding: 0 0 10px;
	border: 0;
	border-bottom: none;
	background: transparent;
	box-shadow: none;
}

body.itm-com-members-dir #itm-community .itm-dir-nav ul,
body.itm-com-groups-dir #itm-community .itm-dir-nav ul,
body.itm-com-activity-dir #itm-community .activity-type-tabs ul {
	display: flex !important;
	flex-wrap: nowrap !important;
	justify-content: flex-start;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

body.itm-com-members-dir #itm-community .itm-dir-nav ul::-webkit-scrollbar,
body.itm-com-groups-dir #itm-community .itm-dir-nav ul::-webkit-scrollbar,
body.itm-com-activity-dir #itm-community .activity-type-tabs ul::-webkit-scrollbar {
	display: none;
	height: 0;
}

body.itm-com-members-dir #itm-community .itm-dir-nav li,
body.itm-com-groups-dir #itm-community .itm-dir-nav li,
body.itm-com-activity-dir #itm-community .activity-type-tabs li {
	float: none !important;
	flex: 0 0 auto !important;
	margin: 0 !important;
	white-space: nowrap;
}

body.itm-com-members-dir #itm-community #members-order-select,
body.itm-com-groups-dir #itm-community #groups-order-select,
body.itm-com-activity-dir #itm-community #activity-filter-select,
body.itm-com-members-dir #itm-community .itm-dir-nav li.last,
body.itm-com-groups-dir #itm-community .itm-dir-nav li.last,
body.itm-com-activity-dir #itm-community .activity-type-tabs li.last {
	display: inline-flex !important;
	align-items: center;
	gap: 8px;
	margin-left: auto !important;
}

body.itm-com-members-dir #itm-community #members-order-select label,
body.itm-com-groups-dir #itm-community #groups-order-select label,
body.itm-com-activity-dir #itm-community #activity-filter-select label {
	margin: 0;
	font-weight: 600;
	font-size: 0.82rem;
	color: var(--itm-text-muted);
	white-space: nowrap;
}

body.itm-com-members-dir #itm-community #members-order-by,
body.itm-com-groups-dir #itm-community #groups-order-by,
body.itm-com-activity-dir #itm-community #activity-filter-by {
	appearance: none;
	-webkit-appearance: none;
	background: var(--itm-bg-card)
 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1.4.6 6 5.2 10.6.6 12 2 6 8 0 2z'/%3E%3C/svg%3E")
 no-repeat right 10px center;
	border: 1px solid var(--itm-border);
	border-radius: var(--itm-btn-radius, 4px);
	padding: 7px 32px 7px 10px;
	color: var(--itm-text);
	font-size: 0.82rem;
	max-width: 200px;
}

/* Legacy separate #subnav no longer used for Order By on these dirs */
body.itm-com-members-dir #itm-community #subnav.item-list-tabs:empty,
body.itm-com-groups-dir #itm-community #subnav.item-list-tabs:empty {
	display: none !important;
}


#itm-community .action .friendship-button,
#itm-community .action .group-button,
#itm-community .generic-button a,
#itm-community a.button,
#itm-community input[type="submit"],
#itm-community button,
#itm-community ul.button-nav li a {
	background: var(--itm-btn-bg, #52525b) !important;
	color: var(--itm-btn-text, #fff) !important;
	border: 1px solid var(--itm-btn-border, #52525b) !important;
	border-radius: var(--itm-btn-radius, 4px) !important;
	padding: var(--itm-btn-pad-y, 7px) var(--itm-btn-pad-x, 12px) !important;
	font-size: var(--itm-btn-font-size, 0.8125rem) !important;
	font-weight: 600 !important;
	cursor: pointer;
	box-shadow: none !important;
	text-shadow: none !important;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

#itm-community ul.button-nav {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

/* Activity directory */
body.itm-com-activity-dir.itm-community-page #itm-community::before {
	display: none;
}

body.itm-com-activity-dir #itm-community.itm-activity-directory.itm-activity-directory , #community.itm-activity-directory.itm-activity-directory {
	background: transparent;
	border: 0;
	border-radius: 0;
	padding: 0;
	box-shadow: none;
}

body.itm-com-activity-dir #itm-community.itm-activity-directory--wall.itm-activity-directory--wall , #community.itm-activity-directory--wall.itm-activity-directory--wall {
	background: transparent;
	border: 0;
	box-shadow: none;
	padding: 0;
}

body.itm-com-activity-dir .itm-activity-directory-wall .itm-social-wall {
	max-width: 720px;
	margin: 0 auto;
}

body.itm-com-activity-dir #itm-community .activity-type-tabs,
body.itm-com-activity-dir #itm-community #subnav.item-list-tabs {
	float: none;
	width: 100%;
	margin: 0 0 16px;
	background: transparent;
	border: 0;
}

body.itm-com-activity-dir #itm-community .activity-type-tabs ul,
body.itm-com-activity-dir #itm-community #subnav.item-list-tabs ul {
	display: flex;
	flex-wrap: nowrap;
	justify-content: flex-start;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 2px 2px 0;
	list-style: none;
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

body.itm-com-activity-dir #itm-community .activity-type-tabs ul::-webkit-scrollbar,
body.itm-com-activity-dir #itm-community #subnav.item-list-tabs ul::-webkit-scrollbar {
	display: none;
	height: 0;
}

body.itm-com-activity-dir #itm-community .activity-type-tabs li,
body.itm-com-activity-dir #itm-community #subnav.item-list-tabs li {
	float: none;
	margin: 0;
	flex: 0 0 auto;
	white-space: nowrap;
}

body.itm-com-activity-dir #itm-community .activity-type-tabs li a,
body.itm-com-activity-dir #itm-community #subnav.item-list-tabs li a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 10px;
	border-radius: var(--itm-btn-radius, 4px);
	border: 1px solid transparent;
	background: transparent;
	color: var(--itm-heading) !important;
	font-size: 0.82rem;
	font-weight: 600;
}

body.itm-com-activity-dir #itm-community .activity-type-tabs li.selected a,
body.itm-com-activity-dir #itm-community .activity-type-tabs li.current a {
	background: var(--itm-btn-bg, #52525b) !important;
	border-color: var(--itm-btn-border, #52525b) !important;
	color: #fff !important;
}

body.itm-com-activity-dir #itm-community .activity-type-tabs li a span,
body.itm-com-activity-dir #itm-community .activity-type-tabs li a .count {
	background: rgba(var(--itm-accent-rgb), 0.12) !important;
	color: var(--itm-accent) !important;
	border-radius: var(--itm-btn-radius, 4px);
	padding: 2px 8px;
	font-size: 0.75rem;
}

body.itm-com-activity-dir #itm-community .activity-type-tabs li.selected a span,
body.itm-com-activity-dir #itm-community .activity-type-tabs li.selected a .count {
	background: rgba(255, 255, 255, 0.25) !important;
	color: #fff !important;
}


/*
 * Facebook-style activity composer.
 * Kill ITM Community legacy desktop floats (avatar float + content margin-left)
 * which only clear in BP’s mobile media queries — that’s why PWA looked right.
 */
#itm-community form#whats-new-form,
#itm-community form#whats-new-form.itm-whats-new-form,
form#whats-new-form.itm-whats-new-form {
	display: flex !important;
	flex-direction: column !important;
	float: none !important;
	clear: both !important;
	gap: 0 !important;
	width: 100% !important;
	margin: 0 0 16px !important;
	padding: 12px 16px !important;
	background: var(--itm-bg-card, #fff) !important;
	border: 1px solid var(--itm-border, #e4e6eb) !important;
	border-radius: 8px !important;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
	overflow: visible !important;
}

#itm-community form#whats-new-form::after,
form#whats-new-form.itm-whats-new-form::after {
	content: none !important;
	display: none !important;
}

#itm-community form#whats-new-form .activity-greeting,
form#whats-new-form.itm-whats-new-form .activity-greeting {
	display: none !important;
}

#itm-community form#whats-new-form .itm-whats-new-form__row,
form#whats-new-form.itm-whats-new-form .itm-whats-new-form__row {
	display: flex !important;
	align-items: center !important;
	gap: 10px !important;
	width: 100% !important;
	float: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

#itm-community form#whats-new-form #whats-new-avatar,
form#whats-new-form.itm-whats-new-form #whats-new-avatar {
	float: none !important;
	position: static !important;
	flex: 0 0 40px !important;
	width: 40px !important;
	max-width: 40px !important;
	margin: 0 !important;
	padding: 0 !important;
}

#itm-community form#whats-new-form #whats-new-avatar a,
form#whats-new-form.itm-whats-new-form #whats-new-avatar a {
	display: block !important;
	line-height: 0 !important;
}

#itm-community form#whats-new-form #whats-new-avatar img,
form#whats-new-form.itm-whats-new-form #whats-new-avatar img {
	display: block !important;
	width: 40px !important;
	height: 40px !important;
	max-width: 40px !important;
	border-radius: 50% !important;
	object-fit: cover !important;
	border: none !important;
}

#itm-community form#whats-new-form #whats-new-content,
form#whats-new-form.itm-whats-new-form #whats-new-content {
	float: none !important;
	position: static !important;
	flex: 1 1 auto !important;
	width: auto !important;
	max-width: none !important;
	margin: 0 !important;
	margin-left: 0 !important;
	padding: 0 !important;
	padding-left: 0 !important;
	min-width: 0 !important;
}

#itm-community form#whats-new-form #whats-new-textarea,
form#whats-new-form.itm-whats-new-form #whats-new-textarea {
	float: none !important;
	width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
}

#itm-community form#whats-new-form textarea::placeholder,
form#whats-new-form.itm-whats-new-form textarea::placeholder {
	color: var(--itm-text-muted, #65676b);
	opacity: 1;
}

#itm-community #whats-new-textarea textarea,
#itm-community form#whats-new-form textarea,
form#whats-new-form.itm-whats-new-form textarea {
	display: block !important;
	float: none !important;
	width: 100% !important;
	min-height: 40px !important;
	max-height: 200px !important;
	height: auto !important;
	margin: 0 !important;
	padding: 9px 16px !important;
	border: none !important;
	border-radius: 20px !important;
	background: var(--itm-bg, #f0f2f5) !important;
	color: var(--itm-text, #050505) !important;
	font-family: inherit !important;
	font-size: 1.0625rem !important;
	line-height: 1.35 !important;
	resize: none !important;
	box-shadow: none !important;
	overflow-y: auto !important;
	transition: min-height 0.15s ease, border-radius 0.15s ease, background 0.15s ease;
}

#itm-community form#whats-new-form:focus-within textarea,
#itm-community form#whats-new-form.itm-whats-new-form--expanded textarea,
form#whats-new-form.itm-whats-new-form:focus-within textarea,
form#whats-new-form.itm-whats-new-form--expanded textarea {
	min-height: 72px !important;
	border-radius: 16px !important;
	padding: 12px 16px !important;
}

#itm-community #whats-new-textarea textarea:focus,
#itm-community form#whats-new-form textarea:focus,
form#whats-new-form.itm-whats-new-form textarea:focus {
	outline: none !important;
	background: color-mix(in srgb, var(--itm-bg, #f0f2f5) 70%, var(--itm-text, #050505) 8%) !important;
}

/* Override BP legacy JS inline height:0 on options */
#itm-community form#whats-new-form #whats-new-options,
form#whats-new-form.itm-whats-new-form #whats-new-options {
	display: flex !important;
	flex-wrap: wrap !important;
	align-items: center !important;
	justify-content: flex-end !important;
	gap: 10px !important;
	float: none !important;
	clear: none !important;
	width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	height: 0 !important;
	max-height: 0 !important;
	opacity: 0;
	overflow: hidden !important;
	border-top: 1px solid transparent;
	transition: max-height 0.18s ease, opacity 0.15s ease, padding 0.15s ease, margin 0.15s ease, height 0.18s ease;
}

#itm-community form#whats-new-form:focus-within #whats-new-options,
#itm-community form#whats-new-form.itm-whats-new-form--expanded #whats-new-options,
form#whats-new-form.itm-whats-new-form:focus-within #whats-new-options,
form#whats-new-form.itm-whats-new-form--expanded #whats-new-options {
	height: auto !important;
	max-height: 96px !important;
	opacity: 1;
	margin-top: 10px !important;
	padding-top: 10px !important;
	overflow: visible !important;
	border-top-color: var(--itm-border, #e4e6eb);
}

#itm-community form#whats-new-form #whats-new-submit,
form#whats-new-form.itm-whats-new-form #whats-new-submit {
	float: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

#itm-community form#whats-new-form #whats-new-submit input[type="submit"],
form#whats-new-form.itm-whats-new-form #whats-new-submit input[type="submit"] {
	min-width: 88px;
	font-weight: 600;
}

#itm-community form#whats-new-form #whats-new-post-in-box,
form#whats-new-form.itm-whats-new-form #whats-new-post-in-box {
	float: none !important;
	margin: 0 !important;
}

#itm-community .activity-list,
#itm-community ul.activity-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

#itm-community .activity-list .activity-item,
#itm-community ul.activity-list > li,
#itm-community .activity-list .itm-activity-card {
	display: block !important;
	background: var(--itm-bg-card);
	border: 1px solid var(--itm-border);
	border-radius: var(--itm-radius-lg);
	padding: 16px;
	margin: 0;
	box-shadow: var(--itm-shadow);
	float: none !important;
	/* visible so Comment/Post forms are not clipped or unclickable */
	overflow: visible;
	list-style: none;
	clear: both;
}

#itm-community .activity-list .itm-activity-card--highlight {
	outline: 2px solid var(--itm-accent, #52525b);
	outline-offset: 2px;
	scroll-margin-top: 96px;
}

/* Avatar + content locked into two columns */
#itm-community .itm-activity-card__main {
	display: grid !important;
	grid-template-columns: 48px minmax(0, 1fr) !important;
	column-gap: 12px;
	align-items: start;
	width: 100%;
}

/* Kill ITM Community float layout that causes avatar/text overlap */
#itm-community .activity-list .activity-avatar,
#itm-community .activity-list .itm-activity-card__avatar,
#itm-community div.activity-avatar {
	float: none !important;
	position: relative !important;
	left: auto !important;
	right: auto !important;
	top: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	width: 48px !important;
	max-width: 48px !important;
	min-width: 48px !important;
	overflow: hidden;
	grid-column: 1;
	z-index: 1;
}

#itm-community .activity-list .activity-avatar a,
#itm-community .activity-list .itm-activity-card__avatar a {
	display: block !important;
	width: 48px;
	height: 48px;
	line-height: 0;
	overflow: hidden;
	border-radius: 50%;
}

#itm-community .activity-list .activity-avatar img,
#itm-community .activity-list .itm-activity-card__avatar img,
#itm-community .activity-list .activity-avatar img.avatar {
	display: block !important;
	float: none !important;
	width: 48px !important;
	height: 48px !important;
	max-width: 48px !important;
	margin: 0 !important;
	border-radius: 50%;
	border: 2px solid var(--itm-border);
	object-fit: cover;
}

#itm-community .activity-list .activity-content,
#itm-community .activity-list .itm-activity-card__content,
#itm-community div.activity-content {
	float: none !important;
	clear: none !important;
	margin: 0 !important;
	margin-left: 0 !important;
	padding: 0 !important;
	width: auto !important;
	max-width: 100% !important;
	min-width: 0 !important;
	grid-column: 2;
	overflow: hidden;
}

/* Fallback when template has no __main wrapper (plugin loops) */
#itm-community .activity-list .activity-item:not(:has(.itm-activity-card__main)) {
	display: grid !important;
	grid-template-columns: 48px minmax(0, 1fr) !important;
	column-gap: 12px;
	align-items: start;
}

#itm-community .activity-list .activity-item:not(:has(.itm-activity-card__main)) > .activity-avatar {
	grid-column: 1;
	grid-row: 1;
}

#itm-community .activity-list .activity-item:not(:has(.itm-activity-card__main)) > .activity-content {
	grid-column: 2;
	grid-row: 1;
}

#itm-community .activity-list .activity-item:not(:has(.itm-activity-card__main)) > .activity-comments {
	grid-column: 1 / -1;
}

#itm-community .activity-header,
#itm-community .itm-activity-card__header {
	margin: 0 0 8px;
	color: var(--itm-text-muted);
	font-size: 0.9rem;
	line-height: 1.5;
	word-wrap: break-word;
	overflow-wrap: anywhere;
}

#itm-community .activity-header > p {
	margin: 0;
	display: block;
}

#itm-community .activity-header a,
#itm-community .itm-activity-card__header a {
	color: var(--itm-heading);
	font-weight: 700;
	text-decoration: none;
}

#itm-community .activity-header a:hover,
#itm-community .itm-activity-card__header a:hover {
	color: var(--itm-accent);
}

#itm-community .activity-header .time-since,
#itm-community .activity-header a.view,
#itm-community .activity-header a.activity-time-since {
	color: var(--itm-text-muted);
	font-weight: 500;
	font-size: 0.82rem;
}

/*
 * Hide secondary avatars embedded in the action sentence.
 * Primary avatar already lives in the left column.
 */
#itm-community .activity-header img.avatar,
#itm-community .activity-header img,
#itm-community .itm-activity-card__header img.avatar,
#itm-community .itm-activity-card__header img {
	display: none !important;
}

#itm-community .activity-list .activity-content .activity-inner,
#itm-community .itm-activity-card__body {
	color: var(--itm-text);
	font-size: 0.95rem;
	line-height: 1.65;
	margin: 0 0 12px;
}

#itm-community .activity-list .activity-content .activity-inner:empty,
#itm-community .itm-activity-card__body:empty {
	display: none;
	margin: 0;
}

#itm-community .activity-meta,
#itm-community .itm-activity-card__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px;
	margin: 0;
	padding-top: 10px;
	border-top: 1px solid var(--itm-border);
}

#itm-community .activity-meta a,
#itm-community .activity-meta a.button,
#itm-community .itm-activity-card__actions a,
#itm-community .itm-activity-card__actions a.button {
	display: inline-flex !important;
	align-items: center;
	gap: 6px;
	margin: 0 !important;
	padding: 7px 12px !important;
	border: 0 !important;
	border-radius: 8px !important;
	background: transparent !important;
	color: var(--itm-text-muted) !important;
	-webkit-text-fill-color: var(--itm-text-muted) !important;
	font-size: 0.84rem !important;
	font-weight: 600 !important;
	line-height: 1.2;
	text-decoration: none !important;
	box-shadow: none !important;
}

#itm-community .activity-meta a:hover,
#itm-community .itm-activity-card__actions a:hover {
	background: rgba(var(--itm-accent-rgb, 82, 82, 91), 0.08) !important;
	color: var(--itm-heading) !important;
	-webkit-text-fill-color: var(--itm-heading) !important;
}

#itm-community .activity-meta a span,
#itm-community .itm-activity-card__actions a span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.35em;
	padding: 1px 6px;
	border-radius: var(--itm-btn-radius, 4px);
	background: var(--itm-accent, #52525b) !important;
	color: #ffffff !important;
	-webkit-text-fill-color: #ffffff !important;
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1.2;
}

#itm-community .itm-com-share-wrap {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin: 8px 0 0;
	padding-top: 0;
	border-top: 0;
}

#itm-community .activity-comments:not(.itm-activity-comments),
#itm-community .itm-activity-card__comments {
	display: block !important;
	float: none !important;
	clear: both !important;
	width: 100% !important;
	margin: 12px 0 0 !important;
	padding: 12px 0 0 !important;
	border-top: 1px solid var(--itm-border);
	min-width: 0;
}

/* Comment rows: avatar column + text column */
#itm-community .activity-comments .acomment-avatar,
#itm-community .activity-comments .ac-reply-avatar {
	float: none !important;
	margin: 0 !important;
	width: 36px !important;
	max-width: 36px !important;
	overflow: hidden;
}

#itm-community .activity-comments .acomment-avatar img,
#itm-community .activity-comments .ac-reply-avatar img {
	display: block !important;
	float: none !important;
	width: 36px !important;
	height: 36px !important;
	max-width: 36px !important;
	border-radius: 50%;
	object-fit: cover;
}

#itm-community .activity-comments ul.activity-comments > li,
#itm-community .activity-comments li[id^="acomment-"] {
	display: grid !important;
	grid-template-columns: 36px minmax(0, 1fr) !important;
	column-gap: 10px;
	align-items: start;
	float: none !important;
	margin: 0 0 12px !important;
	padding: 0 !important;
	overflow: hidden;
}

#itm-community .activity-comments .acomment-meta,
#itm-community .activity-comments .acomment-content,
#itm-community .activity-comments .acomment-options {
	grid-column: 2;
	min-width: 0;
}

#itm-community .activity-comments .acomment-avatar {
	grid-column: 1;
	grid-row: 1 / span 3;
}

/*
 * Keep visible state as display:block so ITM Community legacy slideDown()/AJAX works.
 * display:grid !important fights jQuery animation and can make Post unclickable.
 */
#itm-community .ac-form {
	display: none;
	margin-top: 10px;
	padding: 12px;
	background: var(--itm-bg);
	border: 1px solid var(--itm-border);
	border-radius: 12px;
}

#itm-community .ac-form[style*="display: block"],
#itm-community .ac-form[style*="display:block"],
#itm-community .ac-form[style*="display: flex"],
#itm-community .ac-form[style*="display:flex"] {
	display: block !important;
}

#itm-community .ac-form .ac-reply-avatar {
	float: left;
	width: 36px;
	margin: 0 10px 0 0;
}

#itm-community .ac-form .ac-reply-content {
	display: block;
	overflow: hidden;
	min-width: 0;
}

#itm-community .ac-form .ac-reply-content input[type="submit"] {
	position: relative;
	z-index: 2;
	pointer-events: auto;
	cursor: pointer;
}

#itm-community .ac-form::after {
	content: "";
	display: table;
	clear: both;
}

@media (max-width: 640px) {
	#itm-community .itm-activity-card__main,
	#itm-community .activity-list .activity-item:not(:has(.itm-activity-card__main)) {
 grid-template-columns: 40px minmax(0, 1fr) !important;
 column-gap: 10px;
	}

	#itm-community .activity-list .activity-item,
	#itm-community .activity-list .itm-activity-card {
 padding: 14px;
	}

	#itm-community .activity-list .activity-avatar,
	#itm-community .activity-list .itm-activity-card__avatar,
	#itm-community div.activity-avatar {
 width: 40px !important;
 max-width: 40px !important;
 min-width: 40px !important;
	}

	#itm-community .activity-list .activity-avatar a,
	#itm-community .activity-list .itm-activity-card__avatar a {
 width: 40px;
 height: 40px;
	}

	#itm-community .activity-list .activity-avatar img,
	#itm-community .activity-list .itm-activity-card__avatar img {
 width: 40px !important;
 height: 40px !important;
 max-width: 40px !important;
	}
}

/* Members-only / private ITM Community screens */
body.itm-community .bp-feedback, body.community .bp-feedback,
body.itm-community .bp-messages, body.community .bp-messages,
body.itm-community .bp-template-notice, body.community .bp-template-notice{
	background: var(--itm-bg-card);
	border: 1px solid var(--itm-border);
	border-radius: var(--itm-radius-lg);
	padding: 16px 18px;
	box-shadow: var(--itm-shadow);
	color: var(--itm-text);
}

/* Private gate (e.g. /groups/ when logged out) */
body.itm-com-private-gate,
body.itm-community.itm-community-page:not(:has(#itm-community, body.community.itm-community-page:not(:has(#itm-community, #community)){
	background: var(--itm-bg);
}

body.itm-com-private-gate .site-main.container,
body.itm-community.itm-community-page:not(:has(#itm-community, body.community.itm-community-page:not(:has(#itm-community, #community)) .site-main.container{
	padding: 48px 16px 64px;
	max-width: 520px;
}

body.itm-com-private-gate .entry-header,
body.itm-community.itm-community-page:not(:has(#itm-community, body.community.itm-community-page:not(:has(#itm-community, #community)) .entry-header{
	display: block !important;
	margin: 0 0 16px;
	text-align: center;
}

body.itm-com-private-gate .entry-header .entry-title,
body.itm-com-private-gate .entry-header .page-title,
body.itm-community.itm-community-page:not(:has(#itm-community, body.community.itm-community-page:not(:has(#itm-community, #community)) .entry-header .entry-title,
body.itm-community.itm-community-page:not(:has(#itm-community, body.community.itm-community-page:not(:has(#itm-community, #community)) .entry-header .page-title{
	margin: 0;
	font-size: clamp(1.5rem, 3vw, 1.9rem);
	font-weight: 700;
	color: var(--itm-heading) !important;
}

body.itm-com-private-gate .entry-content > p,
body.itm-community.itm-community-page:not(:has(#itm-community, body.community.itm-community-page:not(:has(#itm-community, #community)) .entry-content > p{
	margin: 0 auto 20px;
	max-width: 420px;
	padding: 12px 14px;
	border-radius: 10px;
	text-align: center;
	font-size: 0.95rem;
	line-height: 1.5;
	color: var(--itm-text-muted) !important;
	background: var(--itm-bg-card);
	border: 1px solid var(--itm-border);
}

body.itm-community .wp-block-columns.itm-com-private-login, body.community .wp-block-columns.itm-com-private-login,
body.itm-com-private-gate .entry-content > .wp-block-columns,
body.itm-community.itm-community-page:not(:has(#itm-community, body.community.itm-community-page:not(:has(#itm-community, #community)) .entry-content > .wp-block-columns{
	display: flex !important;
	flex-direction: column;
	align-items: stretch;
	gap: 0;
	max-width: 420px;
	margin: 0 auto;
}

body.itm-com-private-gate .entry-content > .wp-block-columns > .wp-block-column:empty,
body.itm-community.itm-community-page:not(:has(#itm-community, body.community.itm-community-page:not(:has(#itm-community, #community)) .entry-content > .wp-block-columns > .wp-block-column:empty{
	display: none !important;
}

body.itm-com-private-gate .entry-content > .wp-block-columns > .wp-block-column,
body.itm-community.itm-community-page:not(:has(#itm-community, body.community.itm-community-page:not(:has(#itm-community, #community)) .entry-content > .wp-block-columns > .wp-block-column{
	flex-basis: 100% !important;
	width: 100% !important;
	max-width: 100%;
}

body.itm-community .widget_bp_core_login_widget, body.community .widget_bp_core_login_widget,
body.itm-community .wp-block-bp-login-form, body.community .wp-block-bp-login-form{
	background: var(--itm-bg-card) !important;
	border: 1px solid var(--itm-border) !important;
	border-radius: var(--itm-radius-lg);
	padding: 24px;
	box-shadow: var(--itm-shadow);
	color: var(--itm-text);
}

body.itm-community .widget_bp_core_login_widget label, body.community .widget_bp_core_login_widget label,
body.itm-community .wp-block-bp-login-form label, body.community .wp-block-bp-login-form label{
	display: block;
	margin: 0 0 6px;
	font-weight: 600;
	color: var(--itm-heading) !important;
}

body.itm-community .widget_bp_core_login_widget .login-remember label, body.community .widget_bp_core_login_widget .login-remember label{
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 500;
	color: var(--itm-text-muted) !important;
}

body.itm-community .widget_bp_core_login_widget input[type="text"], body.community .widget_bp_core_login_widget input[type="text"],
body.itm-community .widget_bp_core_login_widget input[type="password"], body.community .widget_bp_core_login_widget input[type="password"],
body.itm-community .wp-block-bp-login-form input[type="text"], body.community .wp-block-bp-login-form input[type="text"],
body.itm-community .wp-block-bp-login-form input[type="password"], body.community .wp-block-bp-login-form input[type="password"]{
	width: 100%;
	margin: 0 0 14px;
	padding: 11px 14px;
	border: 1px solid var(--itm-border) !important;
	border-radius: 10px;
	background: var(--itm-bg) !important;
	color: var(--itm-text) !important;
	box-shadow: none !important;
}

body.itm-community .widget_bp_core_login_widget input[type="submit"], body.community .widget_bp_core_login_widget input[type="submit"],
body.itm-community .wp-block-bp-login-form input[type="submit"], body.community .wp-block-bp-login-form input[type="submit"],
body.itm-community .wp-block-bp-login-form .wp-element-button, body.community .wp-block-bp-login-form .wp-element-button{
	width: 100%;
	background: var(--itm-btn-bg, #52525b) !important;
	color: var(--itm-btn-text, #fff) !important;
	border: 1px solid var(--itm-btn-border, #52525b) !important;
	border-radius: var(--itm-btn-radius, 4px) !important;
	padding: var(--itm-btn-pad-y, 7px) var(--itm-btn-pad-x, 12px) !important;
	font-weight: 600 !important;
	box-shadow: none !important;
}

body.itm-community .bp-login-widget-pwd-link, body.community .bp-login-widget-pwd-link,
body.itm-community .bp-login-widget-pwd-link a, body.community .bp-login-widget-pwd-link a{
	color: var(--itm-accent) !important;
	font-weight: 600;
}

/* Pagination */
#itm-community .pagination {
	clear: both;
	margin: 32px 0 0;
	text-align: center;
}

#itm-community .pagination .pag-count {
	color: var(--itm-text-muted);
	margin-bottom: 12px;
}

#itm-community .pagination-links a,
#itm-community .pagination-links span {
	display: inline-block;
	padding: 8px 14px;
	margin: 0 3px;
	border-radius: 8px;
	border: 1px solid var(--itm-border);
	background: var(--itm-bg-card);
	color: var(--itm-text);
}

#itm-community .pagination-links span.current {
	background: var(--itm-accent);
	border-color: var(--itm-accent);
	color: #fff;
}

/* Forms */
#itm-community .standard-form label,
#itm-community .standard-form legend {
	color: var(--itm-heading);
	font-weight: 600;
}

#itm-community .standard-form input[type="text"],
#itm-community .standard-form input[type="email"],
#itm-community .standard-form input[type="password"],
#itm-community .standard-form textarea,
#itm-community .standard-form select {
	background: var(--itm-bg);
	border: 1px solid var(--itm-border);
	border-radius: 8px;
	color: var(--itm-text);
	padding: 10px 12px;
}

@media (max-width: 1024px) {
	body.itm-com-members-dir #itm-community #members-list {
 grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 768px) {
	#itm-community #members-list,
	#itm-community #groups-list {
 grid-template-columns: 1fr;
	}

	body.itm-com-members-dir #itm-community #members-list {
 grid-template-columns: 1fr;
	}
}

/* Shared screen intro + help tips */
.itm-com-screen-intro {
	display: flex;
	gap: 16px;
	align-items: flex-start;
	margin: 0 0 20px;
	padding: 18px 20px;
	background: var(--itm-bg-card);
	border: 1px solid var(--itm-border);
	border-radius: var(--itm-radius-lg, 16px);
	box-shadow: var(--itm-shadow);
}

.itm-com-screen-intro__icon {
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: rgba(var(--itm-accent-rgb), 0.12);
	color: var(--itm-accent);
	font-size: 1.15rem;
}

.itm-com-screen-intro__title {
	margin: 0 0 6px;
	font-size: 1.15rem;
	font-weight: 700;
	color: var(--itm-heading);
	line-height: 1.25;
}

.itm-com-screen-intro__desc {
	margin: 0;
	color: var(--itm-text-muted);
	font-size: 0.95rem;
	line-height: 1.55;
}

.itm-com-screen-help {
	margin-top: 10px;
}

.itm-com-screen-help summary {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	list-style: none;
	color: var(--itm-accent);
	font-size: 0.88rem;
	font-weight: 600;
}

.itm-com-screen-help summary::-webkit-details-marker {
	display: none;
}

.itm-com-screen-help p {
	margin: 8px 0 0;
	padding: 12px 14px;
	border-radius: 10px;
	background: var(--itm-bg-card, #fff);
	border: 1px solid var(--itm-border);
	color: var(--itm-text);
	font-size: 0.9rem;
	line-height: 1.55;
}

/* Groups / members / activity — wash page canvas */
body.itm-com-groups-dir.itm-community-page,
body.itm-com-members-dir.itm-community-page,
body.itm-com-activity-dir.itm-community-page,
body.itm-com-user,
body.itm-com-group,
body.itm-community-page {
	background: var(--itm-bg);
}

body.itm-com-groups-dir #itm-community #groups-directory-form {
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	color: var(--itm-text) !important;
}

body.itm-com-groups-dir #itm-community .item-list-tabs {
	background: transparent;
	border: 0;
	box-shadow: none;
	padding: 0 0 12px;
}

body.itm-com-groups-dir #itm-community .item-list-tabs ul,
body.itm-com-groups-dir #itm-community #subnav.item-list-tabs ul {
	display: flex;
	flex-wrap: nowrap;
	justify-content: flex-start;
	align-items: center;
	overflow-x: auto;
	scrollbar-width: none;
	gap: 8px;
}

body.itm-com-groups-dir #itm-community #subnav.item-list-tabs ul::-webkit-scrollbar {
	display: none;
	height: 0;
}

body.itm-com-groups-dir #itm-community #subnav.item-list-tabs li {
	flex: 0 0 auto;
	white-space: nowrap;
}

body.itm-com-groups-dir #itm-community .item-list-tabs li a,
body.itm-com-groups-dir #itm-community #subnav.item-list-tabs li a {
	color: var(--itm-heading) !important;
	background: transparent;
	border: 1px solid transparent;
}

body.itm-com-groups-dir #itm-community .item-list-tabs li.selected a,
body.itm-com-groups-dir #itm-community .item-list-tabs li.current a,
body.itm-com-groups-dir #itm-community #subnav.item-list-tabs li.selected a {
	background: var(--itm-accent) !important;
	border-color: var(--itm-accent) !important;
	color: #fff !important;
}

body.itm-com-groups-dir #itm-community .item-list-tabs li:not(.selected) a span,
body.itm-com-groups-dir #itm-community .item-list-tabs li:not(.selected) a .count,
body.itm-com-groups-dir #itm-community #subnav.item-list-tabs li:not(.selected) a span,
body.itm-com-groups-dir #itm-community #subnav.item-list-tabs li:not(.selected) a .count {
	background: rgba(var(--itm-accent-rgb), 0.12) !important;
	color: var(--itm-accent) !important;
}

body.itm-com-groups-dir #itm-community .item-list-tabs li.selected a span,
body.itm-com-groups-dir #itm-community .item-list-tabs li.selected a .count,
body.itm-com-groups-dir #itm-community #subnav.item-list-tabs li.selected a span,
body.itm-com-groups-dir #itm-community #subnav.item-list-tabs li.selected a .count {
	background: rgba(255, 255, 255, 0.25) !important;
	color: #fff !important;
}


body.itm-com-groups-dir #itm-community #groups-list > li {
	background: var(--itm-bg-card, #fff) !important;
	border: 1px solid var(--itm-border) !important;
	color: var(--itm-text) !important;
}

body.itm-com-groups-dir #itm-community #groups-list .item .item-title a {
	color: var(--itm-heading) !important;
}

body.itm-com-groups-dir #itm-community #groups-list .item .item-meta,
body.itm-com-groups-dir #itm-community #groups-list .item .activity,
body.itm-com-groups-dir #itm-community #groups-list .item .item-desc {
	color: var(--itm-text-muted) !important;
}

body.itm-com-groups-dir #pag-bottom .pag-count,
body.itm-com-groups-dir #group-dir-count-bottom {
	display: none !important;
}

.itm-com-empty-tab,
#itm-community .bp-feedback.info,
#itm-community #message.info {
	background: var(--itm-bg-card);
	border: 1px solid var(--itm-border);
	border-radius: var(--itm-radius);
	padding: 18px 20px;
	color: var(--itm-text-muted);
	box-shadow: var(--itm-shadow);
}
