/*
 * Blurb (cis/blurb). Loaded with the block, front end and editor canvas.
 *
 * Moved here from the Etch styles of the Blurb component: .bw-blurb, .bw-blurb__icon, .bw-blurb__content-wrapper,
 * plus the title and text rules (.bw-blurb__title, .bw-blurb__text) that the cis/heading and cis/paragraph
 * blocks inside it carry as classes. Etch still prints those styles for any page that has the class names in
 * its markup, so every rule here is written with two classes (.bw-blurb first) to win on its own and to match
 * the old look exactly. Plain stylesheet, not compiled by Etch, so:
 *   - lengths are ACSS variables as they were;
 *   - the Etch @custom-media tokens do not exist here, so their conditions are written out:
 *       --block-query-large / --container-query-large = inline-size >= 800px  (50rem)
 *   - the commented-out rules of the old .bw-blurb style were dead code and are left out.
 *
 * The container queries need an ancestor with container-type: inline-size. On the page that is the Etch
 * container (or, later, the section block). The editor canvas has none, so it shows the small-screen look.
 *
 * The icon size comes from ACSS ([data-icon][data-icon-size="..."]), not from here.
 *
 * Mobile first: the unqualified rules are the small-screen look.
 */

.bw-blurb {
	display: flex;
	flex-direction: column;
	flex-wrap: wrap;
	align-items: center;
	text-align: center;
	gap: var(--space-xs);
}

.bw-blurb .bw-blurb__icon {
	flex-shrink: 0;
}

.bw-blurb .bw-blurb__content-wrapper {
	display: flex;
	flex-direction: column;
	gap: var(--space-xxs);

	@container (inline-size >= 50rem) {
		padding-block: var(--space-s);
		padding-inline: var(--space-xs);
	}
}

.bw-blurb .bw-blurb__title {
	color: var(--neutral);
	text-transform: uppercase;
	margin: 0;
	min-inline-size: 0;

	@container (inline-size >= 50rem) {
		flex: none;
		text-align: center;
	}
}

.bw-blurb .bw-blurb__text {
	text-align: center;
	color: var(--base);
	font-weight: 400;
	margin: 0;
	flex-basis: 100%;

	@container (inline-size >= 50rem) {
		flex-basis: auto;
	}
}

/* ---- Editor canvas only ---------------------------------------------------------------------------
 * The block wrapper adds its own margins; the grid it sits in does the spacing. */
.bw-blurb-editor.wp-block {
	margin: 0;
}

.bw-blurb-editor .bw-blurb__icon-preview {
	display: block;
	flex-shrink: 0;
	inline-size: var(--icon-size, 2rem);
	block-size: auto;
}

.bw-blurb-editor .bw-blurb__icon-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	inline-size: 5rem;
	block-size: 5rem;
	border: 0.0625rem dashed currentColor;
	border-radius: var(--radius-m);
	color: var(--neutral);
	font-size: var(--text-s);
}
