/*
 * The block style Traverse on core/group (`is-style-traverse`; the multi-look demo, 20 Nov 2026, after the designer's
 * Bright home, its families section): an alignfull group, core's flex layout without wrapping, whose direct children
 * are its panels (core/group, each as wide as core's flex-child size, its inside on core's grid). Loaded only where
 * such a group renders (engine/inc/traverse.php). The ground is the Fields section style's (`--wp--custom--fields--ground`),
 * the ink rules between the panels and between a panel's cells its gap (`--wp--custom--fields--gap`), and a panel's
 * cells are framed as the Fields style frames its children (the inset and the surface, at no weight in the theme's
 * first layer, so any rule of the content's or of the theme's outweighs them).
 *
 * Wherever the traverse does not move (a skin whose `--wp--custom--track--sideways` is not 1, or one put on in place
 * that says so): the panels stack in a column as wide as the group, each panel's grid in one column with its cells
 * in source order (core's spans and starts, its count of columns and rows overridden), no pin and no room. The
 * sideways sheet (traverse-sideways.css) holds the row, and the same column below 1,024 px or with less motion asked.
 */

.is-style-traverse {
	--rooster-traverse-gap: var(--wp--custom--fields--gap, var(--wp--style--block-gap, 1.5rem));
}

.is-style-traverse:not(.has-background) {
	background-color: var(--wp--custom--fields--ground, transparent);
}

.is-style-traverse.is-layout-flex,
:is(.is-style-traverse, .rooster-traverse__track) > .is-layout-grid {
	gap: var(--rooster-traverse-gap);
}

/* The column */
.is-style-traverse.is-layout-flex:not(.is-sideways) {
	flex-direction: column;
	flex-wrap: nowrap;
	align-items: stretch;
}

.is-style-traverse:not(.is-sideways) :is(.rooster-traverse__pin, .rooster-traverse__track) {
	display: contents;
}

.is-style-traverse:not(.is-sideways) .rooster-traverse__rule {
	display: none;
}

:is(.is-style-traverse:not(.is-sideways), .is-style-traverse:not(.is-sideways) .rooster-traverse__track) > * {
	flex: none;
	width: auto;
	margin: 0;
}

:is(.is-style-traverse:not(.is-sideways), .is-style-traverse:not(.is-sideways) .rooster-traverse__track) > .is-layout-grid {
	grid-template-columns: minmax(0, 1fr);
	grid-template-rows: none;
}

:is(.is-style-traverse:not(.is-sideways), .is-style-traverse:not(.is-sideways) .rooster-traverse__track) > .is-layout-grid > * {
	grid-column: auto;
	grid-row: auto;
}

/* The frames: a panel that is not a grid, and a grid panel's cells */
@layer rooster.reset {
	:where(.is-style-traverse > :not(.is-layout-grid, .rooster-traverse__pin), .rooster-traverse__track > :not(.is-layout-grid), .is-style-traverse > .is-layout-grid > *, .rooster-traverse__track > .is-layout-grid > *) {
		padding: var(--wp--custom--fields--inset, 0);
	}

	:where(.is-style-traverse > :not(.is-layout-grid, .rooster-traverse__pin, .has-background), .rooster-traverse__track > :not(.is-layout-grid, .has-background), .is-style-traverse > .is-layout-grid > :not(.has-background), .rooster-traverse__track > .is-layout-grid > :not(.has-background)) {
		background-color: var(--wp--custom--fields--surface, transparent);
	}
}
