/**
 * 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.09.03.05
 */

.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;
}

/*
 * The admin-preview notice: this page is showing a season the public cannot see.
 *
 * Fixed to the foot of the viewport rather than placed in the flow, because it has to be true of
 * the whole page and not of one region of it, and because every one of these themes lays its
 * gallery out differently — anything in the flow would land somewhere different on each.
 *
 * Amber on near-black at 11.0:1, and it says what it means in words: colour alone carries none
 * of it. The stripe is decorative and marked aria-hidden.
 */
.rm-winners-preview-notice {
	position: fixed;
	inset-inline: 0;
	inset-block-end: 0;
	z-index: 2147483000;
	display: flex;
	align-items: center;
	gap: 0.6em;
	padding: 0.65em 1em;
	background: #1c1c1c;
	color: #ffc83d;
	font-size: 14px;
	line-height: 1.4;
	text-align: start;
	/* Its own stack: a theme's font may not have loaded, and this must be legible regardless. */
	font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
	box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.25);
}

.rm-winners-preview-notice__mark {
	flex: none;
	width: 0.7em;
	height: 0.7em;
	border-radius: 50%;
	background: currentColor;
}

/*
 * The notice belongs to the screen. On paper the reader has no page to relate it to, and it
 * would print across whatever sits at the foot of the sheet.
 */
@media print {
	.rm-winners-preview-notice {
		display: none;
	}
}
