/**
 * Minimal styles for the shared winners gallery.
 *
 * Deliberately tiny. Each site's gallery is styled by its own theme; the only thing that has
 * to be true everywhere is that the live region announcing result counts is available to
 * assistive technology without being visible, since the galleries showed no count before and
 * adding visible text would be a layout change.
 *
 * Not every theme defines .screen-reader-text — Davey does not — so the rule is scoped to
 * this library's own class rather than relying on one being present.
 *
 * Build: 2026.08.26.10
 */

.rm-winners__status.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.rm-winners__alert[hidden] {
	display: none;
}

/*
 * The runtime hides things with the `hidden` attribute, which the UA stylesheet implements as
 * `display: none`. That is only a default, and any class carrying its own `display` beats it —
 * signal's `.achievement-block__title { display: block }` did exactly that, leaving a results
 * heading visible above the curated view it was supposed to stay out of.
 *
 * Scoped to the elements this library hides rather than applied to `[hidden]` globally, so it
 * cannot change how a theme handles the attribute anywhere else.
 */
[data-rm-winners][hidden],
[data-rm-winners-heading][hidden],
[data-rm-winners-default][hidden],
[data-rm-winners-pagination][hidden],
[data-rm-winners-alert][hidden] {
	display: none !important;
}

/*
 * The results region is focused after a filter, a page turn or a search so a keyboard or screen
 * reader user lands on the content that just changed, rather than being left at a control whose
 * surroundings were silently replaced. The region is not a control and cannot be tabbed to — the
 * runtime marks it only while its tabindex is -1 — so the ring says nothing to anyone, and drawn
 * around a full-width grid it reads as a box someone has boxed the page in.
 *
 * This is not the outline:none that guardrail 29 forbids: every real control keeps its
 * :focus-visible ring, and nothing here is reachable by keyboard to lose one.
 */
[data-rm-winners-focus][tabindex="-1"]:focus {
	outline: none;
}
