/**
 * Integration: BuddyBoss ReadyLaunch (community pages: activity, forums, groups, members…).
 *
 * ReadyLaunch renders these pages with its own templates and removes the theme's
 * stylesheets; only tokens.css and this file are loaded there (inc/enqueue.php).
 * Brand colour and its shades: BuddyBoss › Settings › ReadyLaunch (primary colour).
 */

/* ---------- Variables: ReadyLaunch → design tokens ---------- */

/* html:root outranks the :root block every ReadyLaunch stylesheet re-declares. */
html:root {
	--bb-rl-font-family-base: var(--cac-font-family);
	--bb-rl-text-color: var(--cac-color-text);
	--bb-rl-text-secondary-color: var(--cac-color-text-muted);
	--bb-rl-border-secondary-color: var(--cac-color-border);
	--bb-rl-border-tertiary-color: var(--cac-color-border-control);
	--bb-rl-radius-sm: var(--cac-radius-sm);
	--bb-rl-radius-md: var(--cac-radius-md);
	--bb-rl-radius-base: var(--cac-radius-lg);

	/* ReadyLaunch's small sizes (11 and 13px) are too small for body text. */
	--bb-rl-font-size-xs: var(--cac-font-size-xs);
	--bb-rl-font-size-sm: var(--cac-font-size-sm);
	--bb-rl-base-line-xs: 1.25rem;
	--bb-rl-base-line-small: 1.375rem;
}

/* ---------- Header (same look as components/header.css) ---------- */

/*
 * The header is fixed and our logo slot makes it taller than ReadyLaunch expects, so the
 * page offset ReadyLaunch reserves for it (69/66px) let it cover the top of the content.
 */
html:root {
	--cac-rl-header-height: 5.0625rem;
}

#page.bb-readylaunch {
	margin-top: var(--cac-rl-header-height);
}

#masthead.bb-rl-header {
	box-sizing: border-box;
	height: var(--cac-rl-header-height);
	padding: 4px calc(var(--cac-gutter) + 0.625rem) 0;
	border-bottom-color: var(--cac-color-border);
	box-shadow: inset 0 4px 0 var(--cac-color-brand);
	transition: height 0.2s ease;
}

/* Compact while scrolled (.has-scrolled from assets/js/header-scroll.js), like the theme header. */
@media (min-width: 62.0625rem) {
	#masthead.bb-rl-header.has-scrolled {
		height: calc(3.5rem + 5px);
	}
}

#masthead .bb-rl-site-branding img {
	transition: max-height 0.2s ease;
}

#masthead.has-scrolled .bb-rl-site-branding img {
	max-height: 2.5rem;
}

@media (prefers-reduced-motion: reduce) {
	#masthead.bb-rl-header,
	#masthead .bb-rl-site-branding img {
		transition: none;
	}
}

/* Full-height row: the menu reaches the bottom border without rounding gaps */
#masthead .bb-rl-header-container {
	height: 100%;
	align-items: center;
}

/* Logo slot: empty reserved space until a logo is set (ReadyLaunch settings). */
#masthead .bb-rl-site-branding .site-title a:not(:has(img)) {
	display: block;
	width: 10rem;
	height: 2.5rem;
	overflow: hidden;
	font-size: 0;
	color: transparent;
}

/* nav wrapper added in inc/header.php */
#masthead .bb-readylaunch-menu__nav {
	display: flex;
	flex: 1;
	align-self: stretch;
	min-width: 0;
	margin: 0 0 0 4.1875rem; /* Same menu position as the theme header */
}

#masthead .bb-readylaunch-menu {
	align-items: stretch;
	justify-content: flex-start;
	margin: 0;
}

#masthead .bb-readylaunch-menu > li {
	display: flex;
	margin-right: 1.75rem;
}

#masthead .bb-readylaunch-menu > li:last-child {
	margin-right: 0;
}

#masthead .bb-readylaunch-menu > li > a {
	padding: 0;
	font-size: var(--cac-font-size-base);
	color: var(--cac-color-text);
	background: none;
	border-radius: 0;
}

#masthead .bb-readylaunch-menu > li:not(.current-menu-item, .current-menu-ancestor, .current-page-ancestor) > a:is(:hover, :focus-visible) {
	color: var(--cac-color-brand);
	background: none;
	box-shadow: inset 0 -2px 0 var(--cac-color-brand);
}

#masthead .bb-readylaunch-menu > :is(.current-menu-item, .current-menu-ancestor, .current-page-ancestor) > a {
	font-weight: var(--cac-font-weight-bold);
	color: var(--cac-color-text-strong);
	background: none;
	box-shadow: inset 0 -3px 0 var(--cac-color-brand);
}

#masthead .bb-rl-header-buttons {
	display: flex;
	align-items: center;
	gap: var(--cac-space-3);
}

#masthead .bb-rl-header-buttons .bb-rl-button {
	display: inline-flex;
	align-items: center;
	min-height: var(--cac-target-min);
	font-size: var(--cac-font-size-base);
	font-weight: var(--cac-font-weight-bold);
	border-radius: var(--cac-radius-sm);
}

#masthead .bb-rl-header-buttons .signin-button {
	padding: 0 var(--cac-space-2);
	color: var(--cac-color-text-strong);
	background: none;
	border: 0;
}

#masthead .bb-rl-header-buttons .signin-button:hover {
	color: var(--cac-color-brand);
}

#masthead .bb-rl-header-buttons .signup {
	padding: 0 var(--cac-space-5);
	color: var(--cac-color-on-brand);
	background-color: var(--cac-color-brand);
	border: 0;
}

#masthead .bb-rl-header-buttons .signup:hover {
	background-color: var(--cac-color-brand-hover);
}

/* ReadyLaunch mobile header: same edge as the theme's */
@media (max-width: 62rem) {
	#masthead.bb-rl-header {
		padding-inline: 1.25rem;
	}

	#masthead .bb-readylaunch-menu__nav {
		margin-left: 0;
	}
}

/* Fit header buttons on small phones */
@media (max-width: 29.99rem) {
	#masthead .bb-rl-site-branding .site-title a:not(:has(img)) {
		width: 5rem;
	}

	#masthead .bb-rl-header-buttons {
		gap: var(--cac-space-1);
	}

	#masthead .bb-rl-header-buttons .bb-rl-button {
		font-size: var(--cac-font-size-md);
	}

	#masthead .bb-rl-header-buttons .signup {
		padding: 0 var(--cac-space-3);
	}
}

@media (max-width: 22.49rem) {
	#masthead .bb-rl-site-branding .site-title a:not(:has(img)) {
		width: 0;
	}
}

/* ---------- Footer (template-parts/footer.php, output on bb_rl_footer) ---------- */

/* Keeps the footer at the bottom on short pages. */
#page.bb-readylaunch {
	display: flex;
	flex-direction: column;
	background-color: var(--cac-color-bg-page);
}

#page.bb-readylaunch > main {
	flex: 1 0 auto;
}

/* ---------- Content width (same as the theme container) ---------- */

#page.bb-readylaunch {
	padding-inline: 0;
}

#page.bb-readylaunch > main {
	padding-inline: 0.625rem;
}

#page.bb-readylaunch .bb-rl-container-inner {
	box-sizing: border-box;
	max-width: var(--cac-container-max);
	margin-inline: auto;
	padding-inline: 0.625rem;
}

/* ---------- Pending profile validation notice (cac-cav-core) ---------- */

#item-header .cac-pending-profile {
	margin: var(--cac-space-6) var(--cac-space-12) 0;
}

@media (max-width: 47.99rem) {
	#item-header .cac-pending-profile {
		margin-inline: var(--cac-space-4);
	}
}

/* ---------- Community: visitor banner (inc/community.php) ---------- */

.cac-community-banner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--cac-space-4) var(--cac-space-6);
	margin-block: var(--cac-space-6);
	padding: var(--cac-space-5) var(--cac-space-6);
	background-color: var(--cac-color-bg);
	border: 1px solid var(--cac-color-border);
	border-left: 4px solid var(--cac-color-brand);
	border-radius: var(--cac-radius-md);
}

.cac-community-banner__text {
	display: flex;
	flex: 1 1 20rem;
	flex-direction: column;
	gap: var(--cac-space-1);
	font-size: var(--cac-font-size-md);
	color: var(--cac-color-text);
}

.cac-community-banner__text p {
	margin: 0;
}

.cac-community-banner__title {
	font-size: var(--cac-font-size-lg);
	font-weight: var(--cac-font-weight-bold);
	color: var(--cac-color-text-strong);
}

.cac-community-banner__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--cac-space-3);
}

/* Visitors: the banner replaces the discussion list and its "log in to post" notice. */
body:not(.logged-in) .bb-rl-single-forum :is(.bb-rl-forum-tabs, .bb-rl-forum-tabs-content, .bbp-no-topic) {
	display: none;
}

/* ---------- Profile badge next to author names (inc/community.php) ---------- */

/* Secondary to the name: smaller, regular weight, muted. */
.cac-profile-badge {
	display: inline-block;
	margin-inline-start: var(--cac-space-2);
	padding: 0 var(--cac-space-2);
	font-size: var(--cac-font-size-xs);
	font-weight: var(--cac-font-weight-regular);
	color: var(--cac-color-text-secondary);
	white-space: nowrap;
	vertical-align: 0.1em;
	background-color: var(--cac-color-bg-subtle);
	border: 1px solid var(--cac-color-border);
	border-radius: var(--cac-radius-pill);
}

/* ---------- Community: no left panel for now (inc/community.php) ---------- */

/* ReadyLaunch counts every forum and topic, including those the user can't access. */
body:is(.post-type-archive-forum, .post-type-archive-topic) .bb-rl-entry-heading .bb-rl-heading-count {
	display: none;
}

body:not(.logged-in).topic-archive .bp-feedback.info {
	display: none;
}

/* "Type" is hard-coded in English in the ReadyLaunch template; the options are self-explanatory. */
body:is(.post-type-archive-forum, .post-type-archive-topic) #bb-rl-groups-scope-select .bb-rl-filter-label {
	display: none;
}

/* Forum header: no placeholder picture when the forum has no featured image. */
.bb-rl-forum-single-header-cover:has(img[src*="group_cover_image"]) {
	display: none;
}

/* ---------- Forum index (prototype: heading + cards) ---------- */

/* ReadyLaunch's top bar (small title + forums/discussions selector): replaced by the h1. */
body.post-type-archive-forum .bb-rl-secondary-header {
	display: none;
}

/* Same position and rhythm as the theme page heads */
.cac-forums-intro {
	display: flex;
	flex-direction: column;
	gap: var(--cac-space-2);
	max-width: 48.75rem;
	margin: 3.0625rem 0 var(--cac-space-8);
}

@media (min-width: 64rem) {
	.cac-forums-intro {
		display: grid;
		grid-template-columns: minmax(0, 48.75rem) 1fr;
		gap: var(--cac-space-2) var(--cac-space-8);
		max-width: none;
	}

	.cac-forums-intro > * {
		grid-column: 1;
	}

	.cac-forums-intro::after {
		content: "";
		grid-column: 2;
		grid-row: 1 / span 3;
		background: url("../../images/spaces/comunitat.svg") right center / contain no-repeat;
	}
}

.cac-forums-intro :is(h1, p) {
	margin: 0;
}

.cac-forums-intro .cac-eyebrow {
	line-height: 1.6875rem;
}

.cac-forums-title {
	font-size: clamp(2.125rem, 1.4rem + 2.6vw, 3.25rem);
	font-weight: var(--cac-font-weight-bold);
	line-height: 1.1;
	color: var(--cac-color-text-strong);
}

body.post-type-archive-forum .bb-rl-forums-list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
	gap: var(--cac-space-5);
	margin: 0;
	padding: 0;
}

.bb-rl-forums-list .bb-rl-forum-list-item {
	position: relative;
	width: auto;
	min-width: 0;
	margin: 0;
	padding: 1.75rem;
	background-color: var(--cac-color-bg);
	border: 1px solid var(--cac-color-border);
	border-top: 4px solid var(--cac-color-text-strong);
	border-radius: 0 0 var(--cac-radius-lg) var(--cac-radius-lg);
	box-shadow: none;
}

.bb-rl-forums-list .bb-rl-forum-list-item:hover {
	border-top-color: var(--cac-color-brand);
}

.bb-rl-forums-list .bb-rl-card-forum-details {
	display: flex;
	flex-direction: column;
	gap: var(--cac-space-3);
	padding: 0;
}

.bb-rl-forums-list .bb-rl-sec-header {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: center;
	gap: var(--cac-space-3) 0.875rem;
	margin: 0;
}

.bb-rl-forums-topic-page > .bb-rl-forums-container-inner {
	padding: var(--bb-rl-space-400);
}

.cac-forum-tag {
	grid-column: 1 / -1;
	justify-self: start;
	padding: 0.1875rem var(--cac-space-2);
	font-size: var(--cac-font-size-xs);
	font-weight: var(--cac-font-weight-bold);
	color: var(--cac-color-text-strong);
	background-color: var(--cac-color-highlight);
	border-radius: 3px;
}

.cac-forum-initial {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	font-size: var(--cac-font-size-xl);
	font-weight: var(--cac-font-weight-bold);
	color: var(--cac-color-on-brand);
	background-color: var(--cac-color-text-strong);
	border-radius: var(--cac-radius-md);
}

.bb-rl-forums-list .bb-rl-sec-header h3 {
	margin: 0;
	font-size: var(--cac-font-size-xl);
	font-weight: var(--cac-font-weight-bold);
	line-height: var(--cac-line-height-tight);
}

.bb-rl-forums-list .bb-rl-sec-header h3 a {
	color: var(--cac-color-text-strong);
	text-decoration: none;
}

/* The whole card is clickable through the title link. */
.bb-rl-forums-list .bb-rl-sec-header h3 a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.bb-rl-forums-list .bb-rl-forum-meta {
	flex-wrap: wrap;
	margin: 0;
	font-size: var(--cac-font-size-md);
	color: var(--cac-color-text-muted);
}

body.post-type-archive-forum .bb-rl-forums-list .bb-rl-forum-list-item .bb-forum-content-wrap :is(.bb-forum-content, .bb-forum-content p) {
	font-size: var(--cac-font-size-base);
	line-height: 1.55;
	color: var(--cac-color-text);
}

/* Links inside the description ("Mostra'n més") stay above the card link. */
.bb-rl-forums-list .bb-forum-content a {
	position: relative;
	z-index: 1;
}

/* ---------- Single forum (prototype: back link, larger title and buttons) ---------- */

/* Same width as ReadyLaunch's forum column (848px, centred). */
.cac-back-link {
	display: flex;
	align-items: center;
	gap: var(--cac-space-1);
	box-sizing: border-box;
	width: min(100% - 1.25rem, 53rem);
	min-height: var(--cac-target-min);
	margin: var(--cac-space-4) auto 0;
	font-size: var(--cac-font-size-md);
	font-weight: var(--cac-font-weight-bold);
	color: var(--cac-color-text-strong);
	text-decoration: none;
}

.cac-back-link:hover {
	color: var(--cac-color-brand);
	text-decoration: underline;
}

.bb-rl-forum-single-header .bb-rl-forum-single-header-content h1.entry-title {
	font-size: clamp(1.625rem, 1.3rem + 1vw, 2rem);
	line-height: var(--cac-line-height-tight);
}

.bb-rl-forum-single-header .bb-rl-forum-description {
	font-size: var(--cac-font-size-base);
	line-height: 1.55;
}

.bb-rl-forum-single-header .bb-rl-forum-actions :is(.bb-rl-button, .subscription-toggle) {
	min-height: var(--cac-control-height);
	padding-inline: 1.375rem;
	font-size: var(--cac-font-size-base);
	font-weight: var(--cac-font-weight-bold);
}

/* ---------- Forum and topic typography (prototype scale; ReadyLaunch uses 11-13px) ---------- */

body.bbpress .bb-rl-forum-single-header :is(.bb-rl-forum-meta, .bb-rl-forum-meta-item, .bb-rl-forum-meta a) {
	font-size: var(--cac-font-size-md);
}

body.bbpress .bb-rl-forum-single-header .bb-rl-forum-description :is(p, a) {
	font-size: var(--cac-font-size-base);
	line-height: 1.55;
}

body.bbpress .bb-rl-forum-tabs .bb-rl-forum-tabs-item a {
	font-size: var(--cac-font-size-md);
	font-weight: var(--cac-font-weight-bold);
}

/* Topic list in a forum */
body.bbpress .bb-rl-topic-permalink {
	font-size: 1.1875rem;
	font-weight: var(--cac-font-weight-bold);
	line-height: var(--cac-line-height-tight);
	color: var(--cac-color-text-strong);
}

body.bbpress .bb-rl-topics-list .type-topic .bb-rl-topic-description {
	font-size: var(--cac-font-size-md);
	line-height: 1.55;
}

body.bbpress :is(.bb-rl-topic-meta-item, .bb-rl-topic-started-by, .bb-rl-topic-meta-item a) {
	font-size: var(--cac-font-size-sm);
}

body.bbpress .bb-rl-topic-started-by .bbp-author-name {
	font-size: var(--cac-font-size-sm);
	font-weight: var(--cac-font-weight-bold);
	color: var(--cac-color-text-strong);
}

/* Single topic and replies */
body.bbpress .bb-rl-topic-started-in a {
	font-size: var(--cac-font-size-md);
}

body.bbpress :is(.bb-rl-topic-author-name, .bb-rl-reply-author-info) .bbp-author-name {
	font-size: var(--cac-font-size-base);
	font-weight: var(--cac-font-weight-bold);
	color: var(--cac-color-text-strong);
}

html body.bbpress :is(.bb-rl-topic-time, .bb-rl-timestamp, .bb-rl-reply-author-info .bb-rl-timestamp) {
	font-size: var(--cac-font-size-sm);
	color: var(--cac-color-text-muted);
}

body.bbpress h2.bb-rl-topic-title {
	font-size: clamp(1.4375rem, 1.2rem + 0.8vw, 1.875rem);
	font-weight: var(--cac-font-weight-bold);
	line-height: var(--cac-line-height-tight);
	color: var(--cac-color-text-strong);
}

body.bbpress .bb-rl-topic-content :is(p, li) {
	font-size: var(--cac-font-size-base);
	line-height: var(--cac-line-height-base);
}

.bb-rl-reply-content p:last-child,
.bb-rl-topic-content p:last-child {
	margin-bottom: var(--bb-rl-space-100);
}

body.bbpress .bb-rl-reply-content :is(p, li) {
	font-size: var(--cac-font-size-md);
}

body.bbpress .bb-rl-topic-header .bb-rl-topic-footer :is(.favorite-toggle, .subscription-toggle, .bbp-topic-reply-link) {
	min-height: var(--cac-target-min);
	font-size: var(--cac-font-size-md);
	font-weight: var(--cac-font-weight-bold);
}

/* New topic / reply forms */
body.bbpress .bb-rl-forum-modal-header h3 {
	font-size: var(--cac-font-size-xl);
	font-weight: var(--cac-font-weight-bold);
}

body.bbpress :is(#bbp_topic_submit, #bbp_reply_submit) {
	min-height: var(--cac-control-height);
	padding-inline: 1.375rem;
	font-size: var(--cac-font-size-base);
	font-weight: var(--cac-font-weight-bold);
}

html body.bbpress :is(.bb-rl-forum-modal-footer, .bb-rl-forum-modal-content) label {
	line-height: var(--cac-line-height-base);
}

/* ---------- Community rules banner and dialog ---------- */

.cac-community-rules {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: clamp(16rem, 30vw, 22rem);
	margin-block: var(--cac-space-12);
	overflow: hidden;
	color: var(--cac-color-text-strong);
	background-color: var(--cac-color-bg-warm);
	border-radius: var(--cac-radius-lg);
}

.cac-community-rules--image {
	color: var(--cac-color-on-brand);
	background-color: var(--cac-color-text-strong);
}

.cac-community-rules__image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Darker behind the text */
.cac-community-rules--image::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background:
		linear-gradient(90deg, rgb(0 0 0 / 80%) 0%, rgb(0 0 0 / 55%) 50%, transparent 100%);
}

.cac-community-rules__content {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--cac-space-4);
	max-width: 40rem;
	padding: clamp(1.5rem, 4vw, 3rem);
}

.cac-community-rules__icon {
	width: 3rem;
	height: 3rem;
	padding: 0.625rem;
	color: var(--cac-color-text-strong);
	background-color: var(--cac-color-highlight);
	border-radius: 50%;
}

.cac-community-rules h2 {
	margin: 0;
	font-size: clamp(1.625rem, 1.3rem + 1.4vw, 2.25rem);
	font-weight: var(--cac-font-weight-bold);
	line-height: var(--cac-line-height-tight);
	color: inherit;
	text-wrap: balance;
}

.cac-community-rules p {
	margin: 0;
	font-size: var(--cac-font-size-lg);
	line-height: var(--cac-line-height-base);
	color: inherit;
}

.cac-community-rules .cac-community-rules__button {
	display: inline-flex;
	align-items: center;
	min-height: 3.25rem;
	margin-top: var(--cac-space-2);
	padding: var(--cac-space-3) 1.625rem;
	font-size: var(--cac-font-size-lg);
	font-weight: var(--cac-font-weight-bold);
	line-height: var(--cac-line-height-tight);
	color: var(--cac-color-on-brand);
	text-decoration: none;
	background-color: var(--cac-color-brand);
	border-radius: var(--cac-radius-sm);
}

.cac-community-rules .cac-community-rules__button:hover {
	color: var(--cac-color-on-brand);
	background-color: var(--cac-color-brand-hover);
}

.cac-community-rules--image .cac-community-rules__button {
	color: var(--cac-color-text-strong);
	background-color: var(--cac-color-bg);
}

.cac-community-rules--image .cac-community-rules__button:hover {
	color: var(--cac-color-text-strong);
	background-color: var(--cac-color-highlight);
}

/* Visible focus on the dark overlay */
.cac-community-rules--image .cac-community-rules__button:focus-visible {
	outline-color: var(--cac-color-on-brand) !important;
}

/* BuddyBoss resets the margin; no padding so clicks on the dialog itself close it */
.cac-dialog {
	position: fixed;
	inset: 0;
	margin: auto;
	width: min(100% - 2rem, 40rem);
	max-height: min(100% - 2rem, 48rem);
	padding: 0;
	color: var(--cac-color-text);
	background-color: var(--cac-color-bg);
	border: 0;
	border-radius: var(--cac-radius-lg);
	box-shadow: 0 1rem 3rem rgb(0 0 0 / 25%);
}

.cac-dialog::backdrop {
	background-color: rgb(0 0 0 / 50%);
}

.cac-dialog__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: var(--cac-space-4);
	padding: var(--cac-space-6) var(--cac-space-6) 0;
}

.cac-dialog__header h2 {
	margin: 0;
	font-size: var(--cac-font-size-xl);
	font-weight: var(--cac-font-weight-bold);
	line-height: var(--cac-line-height-tight);
	color: var(--cac-color-text-strong);
}

.cac-dialog__header form {
	margin: 0;
}

.cac-dialog__close {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: var(--cac-target-min);
	height: var(--cac-target-min);
	margin: calc(-1 * var(--cac-space-2)) calc(-1 * var(--cac-space-2)) 0 0;
	padding: 0;
	font-size: var(--cac-font-size-xl);
	color: var(--cac-color-text-strong);
	background: none;
	border: 0;
	border-radius: var(--cac-radius-sm);
	cursor: pointer;
}

.cac-dialog__content {
	padding: var(--cac-space-4) var(--cac-space-6);
	font-size: var(--cac-font-size-base);
	line-height: var(--cac-line-height-base);
}

.cac-dialog__content > * {
	margin: 0 0 var(--cac-space-3);
}

.cac-dialog__content ul {
	display: flex;
	flex-direction: column;
	gap: var(--cac-space-3);
	padding-left: var(--cac-space-5);
}

.cac-dialog__content strong {
	color: var(--cac-color-text-strong);
}

.cac-dialog__footer {
	display: flex;
	justify-content: flex-end;
	margin: 0;
	padding: 0 var(--cac-space-6) var(--cac-space-6);
}

.cac-dialog__footer .bb-rl-button {
	min-height: var(--cac-target-min);
	padding-inline: 1.375rem;
	font-size: var(--cac-font-size-base);
	font-weight: var(--cac-font-weight-bold);
}

/* Hide pagination when no links */
.bp-pagination:not(:has(.bp-pagination-links :is(a, span))) {
	display: none;
}

/* ---------- Member profile ---------- */

/* Profile view: the sidebar repeats the profile fields already in the main column. */
body.bp-user.xprofile.public #bb-rl-right-sidebar > .bb-rl-profile-widget {
	display: none;
}

/* Notification settings on phones: keep the real (email-only) checkbox in its row instead of BuddyBoss's mouse-only dropdown copy. */
@media screen and (max-width: 800px) {
	.bb-rl-account-settings-section .main-notification-settings .bb-mobile-setting {
		display: none;
	}

	.bb-rl-account-settings-section .main-notification-settings :is(thead, tbody) tr:not(.notification_heading) {
		display: flex;
		align-items: center;
	}

	.bb-rl-account-settings-section .main-notification-settings :is(thead th.title, tbody td:first-child) {
		flex: 1;
		min-width: 0;
	}

	.bb-rl-account-settings-section .main-notification-settings :is(th.email, td.email) {
		display: block;
		min-width: 0;
	}
}

/* ---------- Single forum: related courses (inc/community.php) ---------- */

.cac-forum-courses {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: var(--cac-space-2) var(--cac-space-4);
	margin: 0 0 var(--cac-space-6);
	padding: var(--cac-space-4) var(--cac-space-5);
	background-color: var(--cac-color-bg-subtle);
	border-radius: var(--cac-radius-md);
}

.cac-forum-courses .cac-forum-courses__title {
	margin: 0;
	font-size: var(--cac-font-size-base);
	font-weight: var(--cac-font-weight-bold);
	color: var(--cac-color-text-strong);
}

.cac-forum-courses ul {
	display: flex;
	flex-wrap: wrap;
	gap: var(--cac-space-2) var(--cac-space-4);
	margin: 0;
	padding: 0;
	list-style: none;
}

.cac-forum-courses a {
	font-size: var(--cac-font-size-base);
	font-weight: var(--cac-font-weight-bold);
	color: var(--cac-color-text-strong);
	text-decoration: underline;
}
