/**
 * Spokane Tribe Casino — venue screen display
 *
 * A TV seen from across a loud room. Everything is sized in vw/vh so it fills
 * whatever it's plugged into, and the entry number is deliberately enormous —
 * that's the thing guests read off the screen and type into the ballot.
 *
 * Theme-free, like contest.css: colours come from custom properties that a
 * per-contest Elementor stylesheet overrides.
 */

/* ---------- clear the page for a kiosk ----------
 *
 * Two layers on purpose. The template filter puts this page on Elementor
 * Canvas, which should mean no header or footer at all; these rules are the
 * fallback for when it isn't — a theme-builder footer painting across a venue
 * TV is a very public failure, and it already happened once.
 */

body.stc-screen-page .elementor-location-header,
body.stc-screen-page .elementor-location-footer,
body.stc-screen-page > header,
body.stc-screen-page > footer,
body.stc-screen-page .site-header,
body.stc-screen-page .site-footer,
body.stc-screen-page #wpadminbar {
	display: none !important;
}

body.stc-screen-page {
	margin: 0 !important;
	padding: 0 !important;
	overflow: hidden;          /* a TV never scrolls */
	background: #12101f;
}

html.stc-screen-html { overflow: hidden; }

.stc-screen {
	/* Above anything the theme positions, including a sticky header that
	   survived the rules above. */
	z-index: 2147483000;

	/* Defaults only. A per-contest theme overrides these from
	   .stc-contest--{slug}, same arrangement as contest.css, so nothing
	   seasonal is baked into the plugin. */
	--stc-screen-bg: #12101f;
	--stc-screen-text: #ffffff;
	--stc-screen-muted: #bdb6d4;
	--stc-screen-accent: #b5d331;
	--stc-screen-on-accent: #050405;
	--stc-screen-display: "cc-primal-scream", "Bangers", "Knockout", sans-serif;

	position: fixed;
	inset: 0;
	background: var(--stc-screen-bg);
	color: var(--stc-screen-text);
	font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
	overflow: hidden;
}

/* ---------- stage: the photo gets the screen ---------- */

.stc-screen-stage {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 4vh 3vw;
}

.stc-screen-entry {
	margin: 0;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity 240ms ease;
}

.stc-screen-entry.is-fading { opacity: 0; }

.stc-screen-photo {
	/* Deliberately short of filling the screen. The background is the event's
	   own artwork and it should read as the backdrop, not be covered by the
	   photo — at 2560x1254 over a 16:9 screen, `cover` shows nearly its full
	   height, so leaving room around the photo is what makes it visible. */
	max-height: 70vh;
	max-width: 56vw;
	object-fit: contain;
	border-radius: 10px;
	background: #000;
}

/*
 * The entry number stays. It isn't decoration — it's how a guest connects the
 * costume they just saw to a row on the ballot, and the gallery has a
 * "know the entry number?" jump box that depends on it.
 */
.stc-screen-num {
	position: absolute;
	left: 2vh;
	bottom: 2vh;

	/* Centred with flex against an explicit box, not with padding.
	   Padding only works if you know the font's metrics, and these badges
	   render in whichever of cc-primal-scream / Bangers / Knockout actually
	   loads — each sits differently in the em box, so any hand-tuned padding
	   is correct for exactly one of them. */
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-width: 1.7em;
	height: 1.5em;
	padding: 0 0.25em;

	background: var(--stc-screen-accent);
	color: var(--stc-screen-on-accent);
	font-size: 8vh;
	font-weight: 800;
	line-height: 1;
	border-radius: 10px;
	text-align: center;
}

.stc-screen-empty {
	font-size: 4vh;
	color: var(--stc-screen-muted);
	margin: 0;
}

/* ---------- vote card: only while voting is open ---------- */

.stc-screen-vote {
	position: absolute;
	right: 3vh;
	bottom: 3vh;
	background: #fff;
	border-radius: 14px;
	padding: 2vh;
	text-align: center;
	box-shadow: 0 1vh 4vh rgba(0, 0, 0, .55);
}


/* The hidden attribute must always win.
 *
 * [hidden] works through the browser's own `[hidden] { display: none }`,
 * which is the same specificity as a class. Any class here that sets a
 * display value and is also toggled with `hidden` silently beats it — that's
 * how the lightbox ended up covering the whole admin screen, and how the
 * upload panel sat permanently on the entry form. Scoped guard so it can't
 * happen again in this component.
 */
.stc-screen [hidden],
.stc-screen[hidden] { display: none !important; }

.stc-screen-cta {
	font-size: 3.4vh;
	font-weight: 800;
	letter-spacing: .01em;
	margin: 0 0 1.4vh;
	color: #050405;
	text-transform: uppercase;
}

.stc-screen-qr {
	display: block;
	width: 26vh;
	height: 26vh;
	object-fit: contain;
	background: #fff;
}

.stc-screen-qr--missing {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #3a2230;
	color: #ffb4b4;
	font-size: 1.8vh;
	padding: 2vh;
	text-align: center;
	border: 2px dashed #ff8a8a;
}

/* ---------- rotation timer ----------
 * Kept deliberately: on an unattended screen it's the only cue that the page
 * is alive rather than frozen on one photo.
 */

.stc-screen-timer {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 5px;
	background: rgba(255, 255, 255, .07);
}

.stc-screen-timer-bar {
	height: 100%;
	width: 0;
	background: var(--stc-screen-accent);
}

/* Portrait screens: move the vote card so it can't cover the photo. */
@media (orientation: portrait) {
	.stc-screen-photo { max-height: 72vh; }
	.stc-screen-vote { right: 50%; transform: translateX(50%); bottom: 2vh; }
	.stc-screen-qr { width: 18vh; height: 18vh; }
}


/* ==========================================================================
   Theme: Spokane Dead 2026 — matched to the event landing page
   --------------------------------------------------------------------------
   Lives here rather than in Elementor custom CSS because the screen page is
   forced onto the Canvas template, so there's no comfortable place to paste
   per-page CSS for it. Still scoped to the contest slug, so next year's
   contest is a new block and nothing in the markup changes.

   Values come from design/theme-halloween-2026.css: slime #b5d331, purple
   panel #8f529c, night #1b1840, CC Primal Scream headings with a hard black
   offset.
   ========================================================================== */

.stc-screen.stc-contest--halloween-2026 {
	--stc-screen-bg: #1b1840;
	--stc-screen-accent: #b5d331;
	--stc-screen-on-accent: #050405;
	--stc-screen-muted: #efe3f5;

	/* The event page's own photo, over a gradient of the same sky. The
	   gradient matters: on venue WiFi a 2MB background can take a while, and
	   a half-loaded screen in front of the room should still look deliberate. */
	background:
		url("https://spokanetribecasino.com/wp-content/uploads/2026/09/HalloweenBackground_web-scaled.jpg") center top / cover no-repeat,
		linear-gradient(180deg, #6a2c86 0, #d9742b 14%, #e8a23c 24%, #8a4a9a 42%, #1b1840 78%) #1b1840;
}

/* Photo sits in the page's purple panel with its 30px card radius. */
/* The page's purple card, held close to the photo so the sky stays visible
   around it rather than being boxed out. */
.stc-screen.stc-contest--halloween-2026 .stc-screen-entry::before {
	content: "";
	position: absolute;
	inset: -14px;
	border-radius: 30px;
	background: linear-gradient(180deg, rgba(116, 66, 154, .92), rgba(143, 82, 156, .92));
	box-shadow: 0 2vh 6vh rgba(0, 0, 0, .45);
	z-index: -1;
}

.stc-screen.stc-contest--halloween-2026 .stc-screen-entry {
	position: relative;
	z-index: 1;
	margin: 18px;
}

.stc-screen.stc-contest--halloween-2026 .stc-screen-photo {
	border-radius: 20px;
}

/* Entry number: black Primal Scream on the lime gradient, as the prize list. */
.stc-screen.stc-contest--halloween-2026 .stc-screen-num {
	font-family: var(--stc-screen-display);
	font-weight: 400;
	background: linear-gradient(180deg, #d8df25, #90c73e);
	border-radius: 14px;
	text-shadow: none;
}

/* Vote card: the page's lime card, 30px radius, black type. */
.stc-screen.stc-contest--halloween-2026 .stc-screen-vote {
	background: linear-gradient(180deg, #d8df25, #90c73e);
	border-radius: 30px;
	box-shadow: 0 1vh 4vh rgba(0, 0, 0, .6);
}

.stc-screen.stc-contest--halloween-2026 .stc-screen-cta {
	font-family: var(--stc-screen-display);
	font-weight: 400;
	font-size: 4.6vh;
	letter-spacing: .02em;
	text-shadow: 2px 2px 0 rgba(255, 255, 255, .35);
}

/* The QR stays on plain white inside the lime card — a code printed on a
   coloured ground is the classic reason a scan fails across a room. */
.stc-screen.stc-contest--halloween-2026 .stc-screen-qr {
	background: #fff;
	padding: 1.4vh;
	border-radius: 14px;
}

.stc-screen.stc-contest--halloween-2026 .stc-screen-empty {
	font-family: var(--stc-screen-display);
	font-weight: 400;
	font-size: 6vh;
	color: #b5d331;
	text-shadow: 4px 4px 0 #050405;
	text-transform: uppercase;
}

.stc-screen.stc-contest--halloween-2026 .stc-screen-timer-bar {
	background: linear-gradient(90deg, #d8df25, #90c73e);
}


/* The landing page's display face, now that the Typekit kit is loaded on
   contest pages. The stack still degrades to Bangers then Knockout if the
   kit is blocked on a domain. */
.stc-screen.stc-contest--halloween-2026 .stc-screen-num,
.stc-screen.stc-contest--halloween-2026 .stc-screen-cta,
.stc-screen.stc-contest--halloween-2026 .stc-screen-empty {
	font-family: "cc-primal-scream", "Bangers", "Knockout", sans-serif;
	font-weight: 400;
}

/* Primal Scream runs small for its point size, so the number needs more. */
.stc-screen.stc-contest--halloween-2026 .stc-screen-num {
	font-size: 10vh;
	letter-spacing: .02em;

	/* Primal Scream's glyphs sit low in the em box, so the flex-centred line
	   box still reads a touch low. A small optical nudge, not a layout one —
	   it moves the glyph without changing the badge. */
	padding: 0 0.25em 0.12em;
}
