/*
 * The block style Traverse, sideways (the multi-look demo, 20 Nov 2026, after the designer's Bright home): loaded only
 * where a traverse renders and the page's skin allows it (`settings.custom.track.sideways` 1, as the media track's
 * sideways; engine/inc/traverse.php), which prints the group's panels in a track inside a pin, the store's element under
 * the track (no bar since 20 Nov 2026) and the row's width for the room (`--rooster-traverse-row`, the panels' sizes and their rules, printed
 * once a row a page). From 1,024 px and with motion allowed, the group reserves below its pin the room the track
 * travels (the row less the group's own width), so the page is as tall as it will be before the script comes and
 * nothing shifts; the pin stays under the sticky header (`--rooster-sticky-top`, the theme's) and fills the window
 * below it, the panels as tall as the pin, side by side at their own widths (a panel without a fixed
 * size of core's: min(86vw, 1180px)); the store (traverse-sideways.js) measures the travel (`--rooster-traverse-travel`)
 * and moves the track by a transform. Narrower, or with less motion asked: the column, as the base sheet's.
 */

@media (min-width: 1024px) and (prefers-reduced-motion: no-preference) {
	.is-style-traverse.is-sideways {
		display: block;
		container-type: inline-size;
	}

	.is-style-traverse.is-sideways::after {
		content: "";
		display: block;
		height: max(0px, var(--rooster-traverse-travel, calc(var(--rooster-traverse-row, 100cqw) - 100cqw)));
	}

	.is-style-traverse.is-sideways .rooster-traverse__pin {
		position: sticky;
		top: var(--rooster-sticky-top, 0px);
		display: flex;
		flex-direction: column;
		height: calc(100svh - var(--rooster-sticky-top, 0px));
		overflow: clip;
	}

	.is-style-traverse.is-sideways .rooster-traverse__track {
		display: flex;
		flex: 1 1 auto;
		align-items: stretch;
		gap: var(--rooster-traverse-gap);
		min-height: 0;
		will-change: transform;
	}

	.is-style-traverse.is-sideways .rooster-traverse__track > * {
		flex-grow: 0;
		flex-shrink: 0;
		margin: 0;
	}

	:where(.is-style-traverse.is-sideways .rooster-traverse__track > *) {
		flex-basis: min(86vw, 1180px);
		box-sizing: border-box;
	}

	/* The store's element (rooster/traverse) under the track: no bar and no height (the owner, 20 Nov 2026: "there is a
	   yellow and thin line... messing it about"; the designer's Bright has none), so the panels fill the pin. */
	.is-style-traverse.is-sideways .rooster-traverse__rule {
		flex: none;
		height: 0;
		overflow: hidden;
	}
}

@media (width < 1024px), (prefers-reduced-motion: reduce) {
	.is-style-traverse.is-layout-flex.is-sideways {
		flex-direction: column;
		flex-wrap: nowrap;
		align-items: stretch;
	}

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

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

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

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

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