/*
 * BuddyNext — Blocks CSS
 *
 * Frontend stylesheet loaded for all 19 BuddyNext Gutenberg blocks.
 * Referenced as "style" in every block.json. Covers:
 *   - wp-block-buddynext-* wrapper containment + alignment
 *   - Activity feed block
 *   - Post composer block
 *   - Trending hashtags block
 *   - Member directory + member card blocks
 *   - Follow button + connection button blocks
 *   - Space directory + space card + my-spaces blocks
 *   - Profile header + profile fields + completion bar blocks
 *   - Registration + login form blocks
 *   - Notification bell block
 *   - Search bar block
 */

/* ── Shared block chrome ────────────────────────────────────────────────
 * .bn-block-heading is the small caps title six block templates emit. It was
 * defined only in bn-auth.css and bn-hashtags.css — two feature sheets no block
 * declares — so every block using it rendered an unstyled heading off-hub. It is
 * a BLOCK class, so it belongs here, in the sheet every block loads
 * (Basecamp 10182506250).
 * ──────────────────────────────────────────────────────────────────── */

.bn-block-heading {
	font-family: var(--bn-font-display);
	font-size: var(--bn-text-sm);
	font-weight: var(--bn-fw-bold);
	letter-spacing: var(--bn-ls-tight);
	color: var(--bn-ink);
	margin: 0 0 var(--bn-s3);
}

/* Wrapper for the accept/decline pair on a received connection request. The two
   buttons need to sit on one row with a gap; without a rule they were inline
   with whatever whitespace the markup happened to leave. */
.bn-connect-received {
	display: inline-flex;
	align-items: center;
	gap: var(--bn-s2);
}

/* ── Block wrappers ─────────────────────────────────────────────────── */

[class*="wp-block-buddynext-"] {
	font-family: var(--font-body);
	font-size: var(--text-base);
	color: var(--text-1);
	box-sizing: border-box;
}

[class*="wp-block-buddynext-"] *,
[class*="wp-block-buddynext-"] *::before,
[class*="wp-block-buddynext-"] *::after {
	box-sizing: inherit;
}

/* Alignment */
.wp-block-buddynext-activity-feed.alignwide,
.wp-block-buddynext-member-directory.alignwide,
.wp-block-buddynext-space-directory.alignwide {
	max-width: 100%;
}

.wp-block-buddynext-activity-feed.alignfull,
.wp-block-buddynext-member-directory.alignfull,
.wp-block-buddynext-space-directory.alignfull {
	max-width: 100%;
	padding-inline: var(--bn-s4);
}

/* ── Activity feed block ────────────────────────────────────────────── */

.wp-block-buddynext-activity-feed {
	max-width: 720px;
	margin: 0 auto;
}

/* The activity-feed block renders its post cards as direct children of
   .bn-block-activity-feed, but only .bn-feed-list (the home/profile feed) ever
   got the flex+gap treatment — so inside the block the cards sat flush against
   each other with no vertical rhythm. Mirror the home feed's spacing here. */
.bn-block-activity-feed {
	display: flex;
	flex-direction: column;
	gap: var(--bn-s4);
}

.bn-feed-list {
	display: flex;
	flex-direction: column;
	gap: var(--bn-s3);
}

/* .bn-post-card (base container) is defined ONCE in bn-feed.css (canonical,
 * on --bn-* tokens). No base copy here — only block-local layout children. */

.bn-post-card__header {
	display: flex;
	align-items: flex-start;
	gap: var(--bn-s3);
	margin-bottom: var(--bn-s3);
}

.bn-post-card__meta {
	flex: 1;
	min-width: 0;
}

.bn-post-card__author {
	font-size: var(--text-sm);
	font-weight: var(--fw-semibold);
	color: var(--text-1);
	text-decoration: none;
}

.bn-post-card__time {
	font-size: var(--text-xs);
	color: var(--text-3);
}

.bn-post-card__body {
	font-size: var(--text-sm);
	color: var(--text-1);
	line-height: var(--leading-body);
	margin-bottom: var(--bn-s3);
}

.bn-post-card__actions {
	display: flex;
	align-items: center;
	gap: var(--bn-s3);
	padding-top: var(--bn-s3);
	border-top: 1px solid var(--bn-line-faint);
}

.bn-post-card__action {
	display: inline-flex;
	align-items: center;
	gap: var(--bn-s1);
	font-size: var(--text-xs);
	color: var(--text-3);
	background: none;
	border: none;
	cursor: pointer;
	padding: var(--bn-s1) var(--bn-s2);
	border-radius: var(--bn-r-md);
	transition: background 0.1s, color 0.1s;
}

.bn-post-card__action:hover {
	background: var(--bg-hover);
	color: var(--brand);
}

.bn-post-card__action--active {
	color: var(--brand);
}

.bn-feed-load-more {
	display: flex;
	justify-content: center;
	padding: var(--bn-s4) 0;
}

/* ── Post composer block ──────────────────────────────────────────────
 * Rules match the markup this block emits: a card, an avatar, and a link
 * styled as an input that sends the member to the feed to compose.
 *
 * What was here before styled .bn-composer / __row / __textarea / __footer —
 * the HUB composer's BEM, emitted by templates/partials/composer.php and
 * already defined canonically in bn-feed.css and bn-base.css. This block emits
 * none of it. Meanwhile the two classes it DOES emit, bn-composer-input-wrap
 * and bn-composer-trigger, were defined in no stylesheet at all, so the trigger
 * fell back to bare .bn-input on an ordinary page (Basecamp 10182506250).
 * ──────────────────────────────────────────────────────────────────── */

.wp-block-buddynext-post-composer {
	max-width: 720px;
	margin: 0 auto var(--bn-s4);
}

.bn-block-post-composer {
	display: flex;
	align-items: center;
	gap: var(--bn-s3);
}

.bn-block-post-composer__avatar {
	flex: 0 0 auto;
}

.bn-composer-input-wrap {
	flex: 1 1 auto;
	min-width: 0;
}

/* The trigger is an <a> wearing .bn-input, so it needs the parts an input gets
   from the UA that a link does not: a text baseline inside the box, and the
   placeholder's muted tone rather than link colour. */
.bn-composer-trigger {
	display: flex;
	align-items: center;
	width: 100%;
	color: var(--bn-ink-3);
	text-decoration: none;
	cursor: text;
}

.bn-composer-trigger:hover,
.bn-composer-trigger:focus-visible {
	color: var(--bn-ink-2);
	border-color: var(--bn-line-strong);
}

/* ── Trending hashtags block ────────────────────────────────────────── */

.wp-block-buddynext-trending-hashtags {
	/* width controlled by theme */
}

.bn-hashtags-list {
	display: flex;
	flex-direction: column;
	gap: 0;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--bn-r-lg);
	overflow: hidden;
}

.bn-hashtag-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: var(--bn-s3) var(--bn-s4);
	border-bottom: 1px solid var(--bn-line-faint);
	text-decoration: none;
	transition: background 0.1s;
}

.bn-hashtag-row:last-child {
	border-bottom: none;
}

.bn-hashtag-row:hover {
	background: var(--bg-hover);
}

.bn-hashtag-row__tag {
	font-size: var(--text-sm);
	font-weight: var(--fw-semibold);
	color: var(--brand);
}

.bn-hashtag-row__count {
	font-size: var(--text-xs);
	color: var(--text-3);
}

/* ── Member directory block ─────────────────────────────────────────── */

.wp-block-buddynext-member-directory {
	max-width: 960px;
	margin: 0 auto;
}

.bn-dir-filters {
	display: flex;
	gap: var(--bn-s2);
	margin-bottom: var(--bn-s4);
	flex-wrap: wrap;
	align-items: center;
}

.bn-dir-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: var(--bn-s4);
}

/* Member card block — .bn-member-card is defined ONCE in bn-members.css
 * (on --bn-* tokens). No block-local copy here. */

/* ── Follow button block ────────────────────────────────────────────── */

.wp-block-buddynext-follow-button {
	display: inline-block;
}

.bn-follow-btn {
	display: inline-flex;
	align-items: center;
	gap: var(--bn-s1);
	padding: var(--bn-s2) var(--bn-s4);
	border-radius: var(--bn-r-md);
	font-family: var(--font-body);
	font-size: var(--text-sm);
	font-weight: var(--fw-semibold);
	cursor: pointer;
	transition: background 0.15s, color 0.15s, border-color 0.15s;
	border: 1px solid transparent;
}

.bn-follow-btn--follow {
	background: var(--brand);
	color: var(--text-on-brand);
	border-color: var(--brand);
}

.bn-follow-btn--follow:hover {
	background: var(--brand-hover);
	border-color: var(--brand-hover);
}

.bn-follow-btn--following {
	background: var(--surface);
	color: var(--text-2);
	border-color: var(--border);
}

.bn-follow-btn--following:hover {
	background: var(--bn-danger-bg);
	color: var(--red);
	border-color: var(--red);
}

.bn-follow-btn[disabled],
.bn-follow-btn--loading {
	opacity: 0.6;
	pointer-events: none;
}


/* ── Connection button block ────────────────────────────────────────── */

.wp-block-buddynext-connection-button {
	display: inline-block;
}

.bn-connect-btn {
	display: inline-flex;
	align-items: center;
	gap: var(--bn-s1);
	padding: var(--bn-s2) var(--bn-s4);
	border-radius: var(--bn-r-full);
	font-family: var(--font-body);
	font-size: var(--text-sm);
	font-weight: var(--fw-semibold);
	cursor: pointer;
	transition: background 0.15s, color 0.15s, border-color 0.15s;
	border: 1px solid var(--border);
	background: var(--surface);
	color: var(--text-1);
}

.bn-connect-btn:hover {
	border-color: var(--brand);
	color: var(--brand);
}

.bn-connect-btn--pending {
	color: var(--amber);
	border-color: var(--amber);
}

.bn-connect-btn--connected {
	background: var(--brand-light);
	color: var(--brand);
	border-color: var(--brand-light);
}

.bn-connect-btn[disabled],
.bn-connect-btn--loading {
	opacity: 0.6;
	pointer-events: none;
}

/* ── Space directory block ──────────────────────────────────────────── */

.wp-block-buddynext-space-directory {
	max-width: 960px;
	margin: 0 auto;
}

/* ── Space card block ───────────────────────────────────────────────── */

.wp-block-buddynext-space-card {
	/* inline card — uses .bn-space-card classes from bn-spaces.css */
}

/* ── My spaces block ────────────────────────────────────────────────── */

.wp-block-buddynext-my-spaces {
	/* sidebar widget */
}

/* ── My Spaces block ────────────────────────────────────────────────────
 * Rules match the markup the template actually emits. They did not: the row is
 * the <a class="bn-my-spaces-link">, not the <li>, so the avatar and name were
 * laid out by an undefined class and sat unaligned; and .bn-my-spaces-item__name
 * / __count were BEM the template had already dropped, styling nothing
 * (Basecamp 10184505202).
 * ──────────────────────────────────────────────────────────────────── */

.bn-my-spaces-list {
	display: flex;
	flex-direction: column;
	gap: var(--bn-s1);
	list-style: none;
	margin: 0;
	padding: 0;
}

.bn-my-spaces-item {
	margin: 0;
}

/* The anchor is the row: it owns the layout, the padding and the hover. */
.bn-my-spaces-link {
	display: flex;
	align-items: center;
	gap: var(--bn-s3);
	padding: var(--bn-s2) var(--bn-s3);
	border-radius: var(--bn-r-md);
	text-decoration: none;
	color: inherit;
	transition: background var(--bn-dur-fast, 0.14s) var(--bn-ease, ease);
}

.bn-my-spaces-link:hover,
.bn-my-spaces-link:focus-visible {
	background: var(--bn-sunken);
}

.bn-my-spaces-avatar {
	flex-shrink: 0;
}

.bn-my-spaces-name {
	font-size: var(--bn-text-sm);
	font-weight: var(--bn-fw-semibold);
	color: var(--bn-ink);
	flex: 1;
	min-width: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}


/* ── Profile header block ───────────────────────────────────────────── */

.wp-block-buddynext-profile-header {
	margin-bottom: var(--bn-s6);
}

/* Edit action in the profile header block. */
.bn-profile-header__edit {
	flex: 0 0 auto;
}

.bn-profile-header {
	position: relative;
	border-radius: var(--bn-r-lg);
	overflow: hidden;
}

.bn-profile-header__cover {
	height: 200px;
	background: var(--brand-light);
	object-fit: cover;
	width: 100%;
	display: block;
}

.bn-profile-header__body {
	display: flex;
	align-items: flex-end;
	gap: var(--bn-s4);
	padding: 0 var(--bn-s6) var(--bn-s4);
	margin-top: -40px;
}

.bn-profile-header__avatar {
	width: 80px;
	height: 80px;
	border-radius: var(--bn-r-full);
	border: 3px solid var(--surface);
	overflow: hidden;
	flex-shrink: 0;
	background: var(--bg-subtle);
}

.bn-profile-header__avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.bn-profile-header__info {
	flex: 1;
	min-width: 0;
}

.bn-profile-header__name {
	font-size: var(--text-2xl);
	font-weight: var(--fw-bold);
	font-family: var(--font-display);
	color: var(--text-1);
	margin: 0 0 var(--bn-s1);
}

.bn-profile-header__stats {
	display: flex;
	gap: var(--bn-s4);
	font-size: var(--text-xs);
	color: var(--text-3);
}

.bn-profile-header__stat strong {
	color: var(--text-1);
	font-weight: var(--fw-bold);
}

/* ── Profile fields block ───────────────────────────────────────────── */

.wp-block-buddynext-profile-fields {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--bn-r-lg);
	padding: var(--bn-s4);
}

.bn-profile-fields-list {
	display: flex;
	flex-direction: column;
	gap: var(--bn-s3);
}

.bn-profile-field {
	display: flex;
	gap: var(--bn-s4);
}

.bn-profile-field__label {
	width: 120px;
	flex-shrink: 0;
	font-size: var(--text-xs);
	font-weight: var(--fw-bold);
	color: var(--text-3);
	text-transform: uppercase;
	letter-spacing: var(--ls-wider);
	padding-top: 2px;
}

.bn-profile-field__value {
	flex: 1;
	font-size: var(--text-sm);
	color: var(--text-1);
	line-height: var(--leading-body);
}

/* ── Profile completion bar block ───────────────────────────────────── */

.wp-block-buddynext-profile-completion-bar {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--bn-r-lg);
	padding: var(--bn-s4);
}

.bn-completion-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: var(--bn-s3);
}

.bn-completion-title {
	font-size: var(--text-sm);
	font-weight: var(--fw-semibold);
	color: var(--text-1);
	margin: 0;
}

.bn-completion-pct {
	font-size: var(--text-sm);
	font-weight: var(--fw-bold);
	color: var(--brand);
}

/* .bn-completion-bar / .bn-completion-bar__fill are defined ONCE in
 * bn-profile.css (on --bn-p-* tokens). No copy here. */

.bn-completion-steps {
	display: flex;
	flex-direction: column;
	gap: var(--bn-s2);
	margin-top: var(--bn-s3);
}

.bn-completion-step {
	display: flex;
	align-items: center;
	gap: var(--bn-s2);
	font-size: var(--text-xs);
	color: var(--text-2);
}

.bn-completion-step--done {
	color: var(--green);
}

.bn-completion-step--done .bn-completion-step__icon {
	color: var(--green);
}

/* ── Login form block ───────────────────────────────────────────────── */

.wp-block-buddynext-login-form {
	max-width: 420px;
	margin: 0 auto;
}

.bn-auth-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--bn-r-xl);
	padding: var(--bn-s8);
}

.bn-auth-card__title {
	font-size: var(--text-2xl);
	font-weight: var(--fw-bold);
	font-family: var(--font-display);
	color: var(--text-1);
	margin: 0 0 var(--bn-s1);
	text-align: center;
}

.bn-auth-card__sub {
	font-size: var(--text-sm);
	color: var(--text-3);
	text-align: center;
	margin-bottom: var(--bn-s6);
}

.bn-form-group {
	margin-bottom: var(--bn-s4);
}

.bn-form-label {
	display: block;
	font-size: var(--text-xs);
	font-weight: var(--fw-semibold);
	color: var(--text-2);
	margin-bottom: var(--bn-s1);
}

.bn-form-input {
	width: 100%;
	padding: var(--bn-s3) var(--bn-s4);
	border: 1px solid var(--border);
	border-radius: var(--bn-r-md);
	font-family: var(--font-body);
	font-size: var(--text-sm);
	color: var(--text-1);
	background: var(--bg-subtle);
	transition: border-color 0.15s, background 0.15s;
	outline: none;
}

.bn-form-input:focus {
	border-color: var(--brand);
	background: var(--surface);
}

.bn-form-submit {
	width: 100%;
	padding: var(--bn-s3) var(--bn-s4);
	background: var(--brand);
	color: var(--text-on-brand);
	border: none;
	border-radius: var(--bn-r-md);
	font-family: var(--font-body);
	font-size: var(--text-sm);
	font-weight: var(--fw-semibold);
	cursor: pointer;
	transition: background 0.15s;
	margin-top: var(--bn-s2);
}

.bn-form-submit:hover {
	background: var(--brand-hover);
}

.bn-form-submit:disabled {
	opacity: 0.6;
	pointer-events: none;
}

.bn-auth-links {
	text-align: center;
	margin-top: var(--bn-s4);
	font-size: var(--text-xs);
	color: var(--text-3);
}

.bn-auth-links a {
	color: var(--brand);
	text-decoration: none;
}

/* ── Registration form block ────────────────────────────────────────── */

.wp-block-buddynext-registration-form {
	max-width: 480px;
	margin: 0 auto;
}

/* Inherits .bn-auth-card + .bn-form-* from login form above */

.bn-form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--bn-s3);
}

.bn-password-strength {
	margin-top: var(--bn-s1);
}

.bn-password-strength__bar {
	height: 4px;
	background: var(--border);
	border-radius: var(--bn-r-full);
	overflow: hidden;
}

.bn-password-strength__fill {
	height: 100%;
	border-radius: var(--bn-r-full);
	transition: width 0.3s, background 0.3s;
}

.bn-password-strength--weak   .bn-password-strength__fill { width: 33%; background: var(--red); }
.bn-password-strength--fair   .bn-password-strength__fill { width: 66%; background: var(--amber); }
.bn-password-strength--strong .bn-password-strength__fill { width: 100%; background: var(--green); }

/* ── Notification bell block ────────────────────────────────────────── */

.wp-block-buddynext-notification-bell {
	display: inline-block;
}

/* Uses .bn-bell-wrap + .bn-bell-dropdown from bn-notifications.css */

/* ── Search bar block ───────────────────────────────────────────────── */

/* The form is the block's own row; it was emitted with no rule at all, so the
   icon-and-input wrap had no container to size against off-hub. */
.bn-search-form {
	display: flex;
	align-items: center;
	width: 100%;
}

.bn-search-input-wrap {
	position: relative;
	display: flex;
	align-items: center;
}
.bn-search-icon {
	position: absolute;
	inset-inline-start: 14px;
	top: 50%;
	transform: translateY(-50%);
	display: inline-flex;
	pointer-events: none;
	color: var(--text-3);
}
.bn-search-icon svg {
	width: 18px;
	height: 18px;
}
/* Compound .bn-input.<class> so the icon-clearing padding beats the .bn-input
   primitive's `padding` shorthand (else the placeholder overlaps the icon). */
.bn-input.bn-search-input {
	width: 100%;
	padding-inline-start: 44px;
}

/* ── Block titles (widget headings) ─────────────────────────────────── */

.bn-block-title {
	font-size: var(--text-xs);
	font-weight: var(--fw-bold);
	color: var(--text-3);
	text-transform: uppercase;
	letter-spacing: var(--ls-wider);
	margin: 0 0 var(--bn-s3);
}

/* ── Dark mode ────────────────────────────────────────────────────────
   Dark rules must list the canonical trio: [data-bn-theme="dark"] (BN toggle),
   [data-theme="dark"] (legacy alias) and [data-bx-mode="dark"] (bridges the
   BuddyX / Reign colour-mode toggle). See bn-base.css. */

[data-bn-theme="dark"] .bn-post-card,
[data-theme="dark"] .bn-post-card,
[data-bx-mode="dark"] .bn-post-card,
[data-bn-theme="dark"] .bn-composer,
[data-theme="dark"] .bn-composer,
[data-bx-mode="dark"] .bn-composer,
[data-bn-theme="dark"] .bn-auth-card,
[data-theme="dark"] .bn-auth-card,
[data-bx-mode="dark"] .bn-auth-card,
[data-bn-theme="dark"] .wp-block-buddynext-profile-fields,
[data-theme="dark"] .wp-block-buddynext-profile-fields,
[data-bx-mode="dark"] .wp-block-buddynext-profile-fields,
[data-bn-theme="dark"] .wp-block-buddynext-profile-completion-bar,
[data-theme="dark"] .wp-block-buddynext-profile-completion-bar,
[data-bx-mode="dark"] .wp-block-buddynext-profile-completion-bar {
	background: var(--surface);
	border-color: var(--border);
}

[data-bn-theme="dark"] .bn-post-card:hover,
[data-theme="dark"] .bn-post-card:hover,
[data-bx-mode="dark"] .bn-post-card:hover {
	background: var(--bg-hover);
}

[data-bn-theme="dark"] .bn-composer__textarea,
[data-theme="dark"] .bn-composer__textarea,
[data-bx-mode="dark"] .bn-composer__textarea,
[data-bn-theme="dark"] .bn-form-input,
[data-theme="dark"] .bn-form-input,
[data-bx-mode="dark"] .bn-form-input {
	background: var(--bg-subtle);
	color: var(--text-1);
}

[data-bn-theme="dark"] .bn-profile-header__avatar,
[data-theme="dark"] .bn-profile-header__avatar,
[data-bx-mode="dark"] .bn-profile-header__avatar {
	border-color: var(--surface);
}

/* ── Mobile ─────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
	.wp-block-buddynext-activity-feed,
	.wp-block-buddynext-post-composer,
	.wp-block-buddynext-member-directory,
	.wp-block-buddynext-space-directory {
		max-width: 100%;
	}

	.bn-dir-grid {
		grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	}

	.bn-post-card__actions {
		gap: var(--bn-s2);
	}

	.bn-post-card__action {
		font-size: var(--text-xs);
		padding: var(--bn-s1);
	}

	.bn-profile-header__cover {
		height: 120px;
	}

	.bn-profile-header__body {
		padding: 0 var(--bn-s4) var(--bn-s3);
		margin-top: -28px;
	}

	.bn-profile-header__avatar {
		width: 60px;
		height: 60px;
	}

	.bn-profile-header__name {
		font-size: var(--text-xl);
	}

	.bn-profile-header__stats {
		gap: var(--bn-s3);
	}

	.bn-profile-field {
		flex-direction: column;
		gap: var(--bn-s1);
	}

	.bn-profile-field__label {
		width: auto;
	}

	.bn-form-row {
		grid-template-columns: 1fr;
	}

	.bn-auth-card {
		padding: var(--bn-s6) var(--bn-s4);
	}

	.bn-composer__footer {
		flex-direction: column;
		align-items: flex-start;
	}
}

/* ── Member Directory block ─────────────────────────────────────────────
 * Only the block's own chrome lives here. The member cards themselves are the
 * SHARED .bn-md-card, rendered through parts/member-directory-grid.php and
 * styled in bn-members.css, which the block declares as a named handle — so the
 * block and the /members/ directory cannot drift apart.
 *
 * The bespoke row rules that used to be here (bn-member-list, bn-member-item,
 * bn-member-link, bn-member-item__avatar, bn-member-name, bn-member-bio) went
 * with the bespoke markup they styled. Nothing else emitted those classes
 * (Basecamp 10184505772).
 * ──────────────────────────────────────────────────────────────────── */

.bn-block-member-directory__toolbar,
.bn-block-member-directory .bn-member-directory__toolbar {
	margin-block-end: var(--bn-s3);
}

/* ── Members showcase block ─────────────────────────────────────────────
 * Compact rows by default (avatar, name over headline, action on the right),
 * or a card grid. Self-contained: styled here on top of the bn-base token
 * layer so the block looks the same on any block surface in any theme, and
 * scoped under its own root so it cannot collide with the directory grid.
 * ──────────────────────────────────────────────────────────────────── */

.bn-block-members-showcase .bn-ms-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: var(--bn-s2);
}

.bn-block-members-showcase .bn-ms-item {
	display: flex;
	align-items: center;
	gap: var(--bn-s3);
	margin: 0;
	padding: var(--bn-s2);
	border: 1px solid var(--bn-line);
	border-radius: var(--bn-r-md);
	background: var(--bn-surface);
}

/* Identity block is the link; the action sits outside it so a click on the
   Follow button never navigates to the profile. */
.bn-block-members-showcase .bn-ms-item__id {
	display: flex;
	align-items: center;
	gap: var(--bn-s3);
	flex: 1 1 auto;
	min-width: 0;
	color: inherit;
	text-decoration: none;
}

.bn-block-members-showcase .bn-ms-item__avatar {
	flex: none;
}

.bn-block-members-showcase .bn-ms-item__initials {
	display: grid;
	place-items: center;
	inline-size: 100%;
	block-size: 100%;
	font-weight: var(--bn-fw-bold);
}

.bn-block-members-showcase .bn-ms-item__text {
	display: flex;
	flex-direction: column;
	gap: var(--bn-s1);
	min-width: 0;
}

.bn-block-members-showcase .bn-ms-item__name {
	font-weight: var(--bn-fw-semibold);
	color: var(--bn-ink);
	line-height: var(--bn-leading-snug);
}

.bn-block-members-showcase .bn-ms-item__headline {
	font-size: var(--bn-text-sm);
	color: var(--bn-ink-3);
	line-height: var(--bn-leading-snug);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.bn-block-members-showcase .bn-ms-item__action {
	flex: none;
	margin-inline-start: auto;
}

/* Grid renders the same row as a card in a responsive track. */
.bn-block-members-showcase--grid .bn-ms-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: var(--bn-s2);
}

@media (max-width: 640px) {
	.bn-block-members-showcase--grid .bn-ms-list {
		grid-template-columns: 1fr;
	}

	.bn-block-members-showcase .bn-ms-item__headline {
		white-space: normal;
	}
}

/* ── Community activity block ───────────────────────────────────────────
 * A read-only window into the public Explore feed: avatar, who did what,
 * an excerpt that links through, and when. No composer and no reactions -
 * this is proof the place is alive, not the feed itself.
 * ──────────────────────────────────────────────────────────────────── */

.bn-block-community-activity .bn-ca-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: var(--bn-s2);
}

.bn-block-community-activity .bn-ca-item {
	display: flex;
	align-items: flex-start;
	gap: var(--bn-s3);
	margin: 0;
	padding: var(--bn-s2);
	border-radius: var(--bn-r-md);
}

.bn-block-community-activity .bn-ca-item:hover {
	background: var(--bn-sunken);
}

.bn-block-community-activity .bn-ca-item__avatar {
	flex: none;
}

.bn-block-community-activity .bn-ca-item__initials {
	display: grid;
	place-items: center;
	inline-size: 100%;
	block-size: 100%;
	font-weight: var(--bn-fw-bold);
}

.bn-block-community-activity .bn-ca-item__body {
	display: flex;
	flex-direction: column;
	gap: var(--bn-s1);
	min-width: 0;
}

.bn-block-community-activity .bn-ca-item__head {
	font-size: var(--bn-text-sm);
	color: var(--bn-ink-2);
	line-height: var(--bn-leading-snug);
}

.bn-block-community-activity .bn-ca-item__author,
.bn-block-community-activity .bn-ca-item__space {
	font-weight: var(--bn-fw-semibold);
	color: var(--bn-ink);
	text-decoration: none;
}

/* The excerpt is the click target through to the post permalink. Clamped so a
   long post cannot stretch a sidebar placement out of shape. */
.bn-block-community-activity .bn-ca-item__excerpt {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	color: var(--bn-ink);
	text-decoration: none;
	line-height: var(--bn-leading-snug);
}

.bn-block-community-activity .bn-ca-item__when {
	font-size: var(--bn-text-xs);
	color: var(--bn-ink-3);
	font-variant-numeric: tabular-nums;
}

/* ── Editor hint ────────────────────────────────────────────────────────
 *
 * Shown ONLY inside the block editor's server-side preview, by
 * BlockRegistrar::editor_hint(), when a block needs a target the owner has not
 * chosen yet. The front end renders nothing in that state, so this rule never
 * paints on a member-facing page — it exists so an unconfigured block reads as
 * "tell me which one" instead of as an empty, broken box.
 */
.bn-block-hint {
	padding: var(--bn-s4);
	border: 1px dashed var(--bn-line-strong);
	border-radius: var(--bn-r-md);
	background: var(--bn-sunken);
	color: var(--bn-ink-2);
	font-size: var(--bn-text-sm);
	text-align: center;
}
