/* Images inside the text of pages and articles. Used by both the public site and the editor. */
.text-image {
	float: none;
	max-width: 100%;
	margin: 1.5rem auto;
	border: 0;
}

.text-image img {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	margin: 0;
	border: 0;
	border-radius: 8px;
}

.text-image figcaption {
	margin-top: 0.5rem;
	font-size: 0.85rem;
	line-height: 1.3;
	font-style: italic;
	color: var(--text-secondary);
}

.text-image.size-small  { width: 30%; }
.text-image.size-medium { width: 50%; }
.text-image.size-full   { width: 100%; }

/* Keep floated images inside the text they belong to */
:has(> .text-image) {
	display: flow-root;
}

.text-image.align-left:not(.size-full) {
	float: left;
	margin: 0.4rem 1.5rem 1rem 0;
}

.text-image.align-right:not(.size-full) {
	float: right;
	margin: 0.4rem 0 1rem 1.5rem;
}

@media (max-width: 600px) {
	.text-image.text-image {
		float: none;
		width: 100%;
		margin: 1.25rem 0;
	}
}
