/*
 * rooster/media, variant track (the page agents' gaps, package C): the legacy Panel landing's screenshot gallery
 * (themes/om-portal-theme/templates/panel-landing.php, `.panel-gallery`), complete on its own: the strip (a row of
 * figures 24 px apart that scrolls and snaps to each figure's centre, its scroll bar hidden, smooth unless reduced
 * motion is asked; a focus ring when the keyboard is on it), each figure as wide as the strip on a phone and
 * min(880 px, 86 %) from 48rem (the legacy's min(880px, 86vw): its neighbours in view), its picture in a 12 px rounded
 * hairline frame with the legacy's soft shadow, its caption 13.5 px centred under it (680 px at most, its bold in the
 * contrast ink); under the strip the round 40 px buttons with their arrows (the tone's colour under the pointer,
 * dimmed at an end) around the count, 12.5 px. Colours are the theme's tokens with the legacy's light and dark values
 * as fallbacks. Compiled by build/blocks-css.mjs.
 */

@import "../../theme.css";

.rooster-track {
	--rooster-track-line: var(--wp--preset--color--line, light-dark(#e2e8f0, rgb(255 255 255 / 12%)));
	--rooster-track-muted: var(--wp--preset--color--muted, light-dark(#64748b, #b2bbc8));
	--rooster-track-ring: var(--wp--preset--color--accent, light-dark(#334155, #cbd5e1));
	box-sizing: border-box;
	margin: 0;
	font-size: 1rem;
	line-height: 1.5;
	overflow-wrap: normal;
	word-break: normal;
}

.rooster-track *,
.rooster-track *::before,
.rooster-track *::after {
	box-sizing: border-box;
}

.rooster-track .rooster-track__strip {
	display: flex;
	gap: 1.5rem;
	margin: 0;
	padding: 0 0 4px;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.rooster-track .rooster-track__strip::-webkit-scrollbar {
	display: none;
}

.rooster-track .rooster-track__strip:focus-visible {
	outline: 2px solid var(--rooster-track-ring);
	outline-offset: 4px;
	border-radius: 0.75rem;
}

@media (prefers-reduced-motion: no-preference) {
	.rooster-track .rooster-track__strip {
		scroll-behavior: smooth;
	}
}

.rooster-track .rooster-track__slide {
	flex: 0 0 100%;
	min-width: 0;
	margin: 0;
	scroll-snap-align: center;
}

@media (min-width: 48rem) {
	.rooster-track .rooster-track__slide {
		flex-basis: min(880px, 86%);
	}
}

.rooster-track .rooster-track__image {
	display: block;
	width: 100%;
	max-width: none;
	height: auto;
	margin: 0;
	border: 1px solid var(--rooster-track-line);
	border-radius: 0.75rem;
	background: var(--wp--preset--color--bg, light-dark(#ffffff, #0f172b));
	box-shadow: 0 4px 24px rgb(0 0 0 / 6%);
}

.rooster-track .rooster-track__caption {
	max-width: 680px;
	margin: 0.75rem auto 0;
	font-size: 13.5px;
	line-height: 1.6;
	text-align: center;
	color: var(--rooster-track-muted);
}

.rooster-track .rooster-track__caption strong {
	font-weight: 600;
	color: var(--wp--preset--color--contrast, light-dark(#0f172a, #f1f5f9));
}

.rooster-track .rooster-track__nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin: 1.5rem 0 0;
}

.rooster-track .rooster-track__button {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 1px solid var(--rooster-track-line);
	border-radius: 999px;
	background: var(--wp--preset--color--bg, light-dark(#ffffff, #0f172b));
	box-shadow: none;
	font: inherit;
	line-height: 1;
	color: var(--wp--preset--color--contrast-2, light-dark(#475569, #c5cdd8));
	cursor: pointer;
	transition: color 150ms, border-color 150ms;
}

.rooster-track .rooster-track__button:hover:not([aria-disabled="true"]) {
	border-color: var(--rooster-track-ring);
	color: var(--wp--preset--color--accent-text, light-dark(#334155, #cbd5e1));
}

.rooster-track .rooster-track__button:focus-visible {
	outline: 2px solid var(--rooster-track-ring);
	outline-offset: 2px;
}

.rooster-track .rooster-track__button[aria-disabled="true"] {
	cursor: default;
	opacity: 0.45;
}

.rooster-track .rooster-track__arrow {
	display: block;
	flex: none;
	width: 18px;
	height: 18px;
	background-color: currentColor;
}

.rooster-track .rooster-track__count {
	min-width: 4.5em;
	font-size: 12.5px;
	line-height: 1.6;
	text-align: center;
	font-variant-numeric: tabular-nums;
	color: var(--rooster-track-muted);
}
