/*
 * Winners gallery.
 *
 * The two <style> blocks that template-aivagallery.php printed into the page, moved to a real
 * asset so they are cached and versioned rather than re-sent inside every gallery response.
 * Rules are unchanged; only the alert-block rule lost its PHP `if ($alert)` wrapper, since a
 * rule with no matching element costs nothing and the condition is now decided at render time.
 *
 * Nothing here styles the filter selects. They are presented by rm-winners-select.js, which
 * renders the same markup and class names Choices.js does, so the theme's existing .choices
 * rules in css/style.css style them with no addition.
 *
 * Version: 2026.08.25.01
 */

/*
 * The filter selects had no labels at all, so a screen reader announced three unnamed controls.
 * They have labels now, and this hides them visually. The theme ships no visually-hidden
 * utility of its own — not under this name or any of the usual ones — so it is defined here
 * rather than assumed. WordPress's conventional name, since that is what the markup expects.
 */
.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.wrapper { background-color: var(--white); color: var(--black); }
.gallery-filters__block,
.gallery-filters__block:after { background-color: var(--white); color: var(--dark); }
.gallery-filters__col .choices { z-index: 200; }
.search-field__btn svg { filter: invert(1); }

.winner-item { position: relative; }

.winner-item__badge {
	position: absolute;
	z-index: 2;
	width: 70px;
	right: -20px;
	top: -20px;
	display: block;
}

.winner-item__popup .alert-block.text-center {
	max-width: 87.8vw;
	flex-basis: 100%;
	width: 100%;
	max-height: 40px;
}

.winner-item__popup { display: grid; }
.winner-item__popup { z-index: 900; }

strong.share__title { min-width: 70px; }

.bg-black .select-award .choices__list--dropdown { min-width: 150px; }
.bg-black .cat-type .choices__list--dropdown { min-width: 200px; }

.bg-black .winner-item__title {
	max-width: 100%;
	text-overflow: ellipsis;
	overflow: hidden;
}

@media (max-width: 767px) {
	.winners-gallery .winner-item + .winner-item + .winner-item + .winner-item { display: block; }
}

@media (min-width: 1024px) {
	.winner-item { max-width: 360px; }
	.gallery-filters__row { grid-template-columns: 95px 200px 143px 1fr; }
}
