/**
 * "Mosaic" style: a grid on a computer, a single column on a phone.
 *
 * The columns are built with auto-fill rather than a fixed count, so the
 * layout adapts to the width actually available, whatever the theme's
 * content width happens to be.
 */

.mgst-reviews--mosaique {
	display: grid;
	gap: 1em;
	/* 0.16.0: min() so a column narrower than 300px (a section with
	   padding on a phone) never makes the cards stick out. */
	grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
}

.mgst-reviews--mosaique .mgst-review {
	display: flex;
	flex-direction: column;
	height: 100%;
}

/*
 * Below this width a grid would squeeze the text into unreadable columns,
 * so the cards stack, which is what reads best on a phone.
 */
@media (max-width: 640px) {
	.mgst-reviews--mosaique {
		grid-template-columns: minmax(0, 1fr);
	}
}
