/**
 * Block: firm/reviews (Trustindex widget in page content).
 *
 * Only the wrapper is styled: its loaded height is reserved so the content
 * doesn't shift when the widget appears. The widget changes its column
 * count at its own widths, so each of our ranges reserves the smallest
 * loaded height measured in it (never an empty gap; the rest is a small
 * shift): custom.reviewsWidget.pageMinHeight (mobile), …Tablet (48em),
 * …Laptop (64em). Re-measure when the widget or its reviews change. Never
 * style or offset the widget's insides. Loaded in <head> only where the content has the block
 * (or its shortcode), and as an editor style.
 */

.firm-reviews-widget--page {
	min-block-size: var(--wp--custom--reviews-widget--page-min-height);
}

/* tablet */
@media (min-width: 48em) {
	.firm-reviews-widget--page {
		min-block-size: var(--wp--custom--reviews-widget--page-min-height-tablet);
	}
}

/* laptop */
@media (min-width: 64em) {
	.firm-reviews-widget--page {
		min-block-size: var(--wp--custom--reviews-widget--page-min-height-laptop);
	}
}

/* The widget spans the content container, not the text measure: where the
   layout offers a full width (page-layout.css, --firm-layout-full-width:
   the one-column layout from desktop) it breaks out of the text column,
   centered on it. Elsewhere (narrower screens, beside a sidebar or a table
   of contents) the column already is the limit. */
.firm-content .firm-reviews-widget--page {
	inline-size: var(--firm-layout-full-width, auto);
	margin-inline: calc(50% - var(--firm-layout-full-width, 100%) / 2);
}

/* Editor: the block is a box holding the widget ID (the widget only loads on the front end). */
.firm-reviews-block.is-editing {
	display: grid;
	gap: var(--wp--preset--spacing--30);
	padding: var(--wp--preset--spacing--40);
	border: var(--wp--custom--border-width--thin) dashed var(--wp--preset--color--divider);
	background: var(--wp--preset--color--surface);
}

.firm-reviews-block__label,
.firm-reviews-block__note {
	margin: 0;
	font-size: var(--wp--preset--font-size--body-sm);
}

.firm-reviews-block__label {
	font-weight: 700;
}
