/* ── Collapsible Forum Entry ─────────────────────────────────────────────── */

/* Secondary (ghost) toggle used on each top-level reply. */
.mlmmc-reply-toggle {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 14px;
	border: 1px solid var(--bb-content-border-color, #c8cbcf);
	border-radius: 6px;
	background: transparent;
	color: var(--bb-body-text-color, #5a5a5a);
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.mlmmc-reply-toggle:hover {
	background: var(--bb-content-alternate-background-color, #f2f4f5);
	border-color: var(--bb-alternate-text-color, #9b9c9f);
}
.mlmmc-reply-toggle:focus-visible {
	outline: 2px solid var(--bb-primary-color, #007cff);
	outline-offset: 2px;
}

/* ── Top-level reply: compact collapsible summary strip ────────────────── */

.mlmmc-top-level-reply {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

/* Left group: author + date. */
.mlmmc-reply-identity {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.mlmmc-reply-author {
	font-weight: 700;
	font-size: 14px;
	color: var(--bb-headings-color, #1e2132);
}
.mlmmc-reply-author a {
	color: inherit;
	text-decoration: none;
}

.mlmmc-reply-date {
	font-size: 12px;
	color: var(--bb-alternate-text-color, #9b9c9f);
}

/* Middle group: reply count + media icons, pushed right. */
.mlmmc-reply-details {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	margin-left: auto;
}

.mlmmc-reply-count {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 12px;
	font-weight: 600;
	color: var(--bb-body-text-color, #5a5a5a);
}
.mlmmc-reply-count i {
	font-size: 14px;
	color: var(--bb-alternate-text-color, #9b9c9f);
}

.mlmmc-reply-media {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
.mlmmc-reply-media i {
	font-size: 18px;
	color: var(--bb-alternate-text-color, #9b9c9f);
}

/* Toggle button sits at the far right of the strip. */
.mlmmc-reply-toggle {
	flex: 0 0 auto;
}

/* ── Collapsed excerpt preview ──────────────────────────────────────────────
 *
 * Shows the actual reply text in the summary strip, but ONLY while the reply
 * is collapsed. Replies default to expanded, so the excerpt starts hidden and
 * appears when JS adds .is-collapsed to the strip. It is clipped to a single
 * line that fills the strip's current width, with "…" appended where the text
 * overflows.
 */
.mlmmc-reply-excerpt {
	display: none;
	flex: 1 1 100%;
	min-width: 0;
	max-width: 100%;
	box-sizing: border-box;
	margin-top: 4px;
	padding: 6px 10px;
	background: rgba(0, 0, 0, 0.025);
	border-left: 3px solid var(--bb-primary-color, #007cff);
	border-radius: 6px;
	font-size: 12px;
	line-height: 1.4;
	color: var(--bb-body-text-color, #5a5a5a);
	text-align: left;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.mlmmc-top-level-reply.is-collapsed .mlmmc-reply-excerpt {
	display: block;
}

/* The actual reply body + threaded children live inside .mlmmc-reply-body. */
.mlmmc-reply-body {
	width: 100%;
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid var(--bb-content-border-color, #e4e6e9);
	animation: mlmmc-fadeIn 0.2s ease;
}

/* Decorative box for the summary strip. */
@media (min-width: 601px) {
	.mlmmc-top-level-reply {
		padding: 10px 16px;
	}
}

@keyframes mlmmc-fadeIn {
	from { opacity: 0; transform: translateY(-6px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive tweaks ──────────────────────────────────────────────────── */
@media (max-width: 600px) {
	.mlmmc-top-level-reply {
		gap: 8px;
	}
	.mlmmc-reply-date {
		font-size: 11px;
	}
	.mlmmc-reply-details {
		margin-left: auto;
	}
}

/* ── Whitespace reduction (client dislikes excess space) ───────────────────
 *
 * Removes the generous default vertical padding/margins BuddyBoss applies to
 * the single-topic reply list, its header rows and the reply body. These
 * overrides are scoped to the topic/reply list so other lists are unaffected,
 * and load after the parent theme's stylesheet so they win the cascade. */

/* Tighter gap between the summary strip and the reply body. */
.mlmmc-reply-body {
	margin-top: 6px;
	padding-top: 8px;
}

/* Reply author/date header row: pull the body content up. */
#bbpress-forums .bb-single-reply-list .bs-reply-header {
	margin-bottom: 8px;
}
#bbpress-forums ul.bbp-threaded-replies .bs-reply-header {
	margin-bottom: 4px;
}

/* Reply body content: less space below the block and each paragraph. */
#bbpress-forums .bb-single-reply-list .bbp-reply-content.bs-forum-content,
#bbpress-forums ul.bbp-threaded-replies .bbp-reply-content {
	margin-bottom: 8px;
}
#bbpress-forums .bb-single-reply-list .bbp-reply-content.bs-forum-content p,
#bbpress-forums ul.bbp-threaded-replies .bbp-reply-content p {
	margin-bottom: 8px;
}

/* Collapse empty paragraph placeholders that BuddyBoss injects (kept as
 * min-height: 1em) which add phantom vertical space under short replies. */
#bbpress-forums .bb-single-reply-list .bbp-reply-content p:empty,
#bbpress-forums ul.bbp-threaded-replies .bbp-reply-content p:empty {
	min-height: 0;
	margin: 0;
	padding: 0;
	line-height: 0;
}

/* Nested (threaded) replies: remove the 20px/30px/level padding that the
 * parent theme applies (higher-specificity rule overrides the .depth-N
 * padding-left rules). */
#bbpress-forums ul.bbp-threaded-replies .bs-reply-list-item {
	padding: 0;
}

/* Give each top-level reply a slight background so adjacent replies are
 * visually distinct from one another. */
#bbpress-forums .bb-single-reply-list > li > div.bs-reply-list-item {
	background: var(--bb-content-alternate-background-color, #f8f9fa);
	border-radius: var(--bb-block-radius, 6px);
}#bbpress-forums .bb-single-reply-list > li + li > div.bs-reply-list-item {
	margin-top: 8px;
}

/* Lead topic: tighten its wrapper, header and body spacing. */
#bbpress-forums .bb-single-forum-list .bs-item-wrap,
#bbpress-forums .bb-single-forum-list .bs-reply-list-item {
	padding-top: 12px;
	padding-bottom: 12px;
}

/* Less space reserved below the whole reply list. */
#bbpress-forums .bs-item-list.bs-single-forum-list {
	margin-bottom: 20px;
}

/* Slightly tighter toggles/strip so the summary row is compact. */
.mlmmc-reply-toggle {
	padding: 4px 10px;
}

