/**
 * BuddyPress Anonymous Activity - front end.
 *
 * Logical properties only, so one file serves LTR and RTL.
 * Override the size of the "Post as Anonymous" checkbox label per site with
 * --bpaa-control-font-size (defaults to the 14px size of composer controls).
 */

.activity-list .avatar,
.activity-comments .avatar,
.bp-anonymous-activities .avatar {
	aspect-ratio: 1;
	object-fit: cover;
}

@-moz-document url-prefix() {
	.activity-list .activity-item .activity-avatar img.avatar {
		width: 100%;
	}
}

/*
 * "Post as Anonymous" checkbox, wherever the form is printed: BuddyPress and
 * BuddyBoss composers, Post From Anywhere (page and widget), comment forms.
 */
.post-elements-buttons-item.bp-anonymous-activity,
.bp-anonymous-comment {
	margin: 0;
}

.bp-anonymous-activity label,
.bp-anonymous-comment label {
	display: inline-flex;
	align-items: center;
	gap: var(--bpaa-space-inline, 8px);
	margin: 0;
	font-size: var(--bpaa-control-font-size, 0.875rem);
	font-weight: 400;
	line-height: 1.4;
	cursor: pointer;
}

.bp-anonymous-activity input[type="checkbox"],
.bp-anonymous-comment input[type="checkbox"] {
	flex: none;
	inline-size: 18px;
	block-size: 18px;
	margin: 0;
	cursor: pointer;
}

.bp-anonymous-activity input[type="checkbox"]:focus-visible,
.bp-anonymous-comment input[type="checkbox"]:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* BuddyBoss composer: same inset as the composer's own rows. */
.activity-update-form .activity-form.focus-in .post-elements-buttons-item.bp-anonymous-activity {
	padding-block: 20px 16px;
	padding-inline: 25px;
}

/* Comment forms: under the reply box, past the avatar column. */
.activity-comments.threaded-comments p.bp-anonymous-comment {
	margin-block-start: 12px;
	margin-inline-start: 48px;
}

.activity-comments .post-elements-buttons-item.bp-anonymous-activity {
	float: inline-end;
}

/* Reign: line up with the composer text box, which sits past the avatar. */
.reign-mobile-header-icons-enable #bp-nouveau-activity-form .bp-anonymous-activity {
	margin-inline-start: 65px;
}

.reign-mobile-header-icons-enable .activity-comments .post-elements-buttons-item.bp-anonymous-activity {
	padding-block-start: 12px;
}

@media (max-width: 480px) {
	.reign-mobile-header-icons-enable #bp-nouveau-activity-form .bp-anonymous-activity,
	.activity-comments.threaded-comments p.bp-anonymous-comment {
		margin-inline-start: 0;
	}

	.activity-comments .post-elements-buttons-item.bp-anonymous-activity {
		float: none;
	}
}

#bbpress-forums .rg-bbp-form fieldset.bbp-form label[for="bp_anonymous_post"] {
	display: inline;
}
