/* Brand colors read the --tvi-games-* custom properties a theme may set; the fallbacks are TV Insider's. */
/* The inline trivia player. Everything scopes under .tvi-trivia-player so
   nothing leaks into (or in from) the page; typography inherits the theme,
   which is the point of being inline. */

/* The theme ships the Regular cut of its condensed data font but only
   declares the 700 face — declare 400 here (against the theme's own file)
   so the question numbers get the true Regular, not faux-thinned bold. */
@font-face {
	font-display: swap;
	font-family: IBMPlexSansCondensed;
	font-style: normal;
	font-weight: 400;
	src: url(/wp-content/themes/tv/dist/fonts/IBMPlexSansCondensed-Regular.woff2) format("woff2"),
		url(/wp-content/themes/tv/dist/fonts/IBMPlexSansCondensed-Regular.woff) format("woff");
}

.tvi-trivia-player {
	/* The theme has no column wrapper — it constrains article content
	   per element (article .post-block p, frontend.css). The player is
	   one custom block those selectors can't reach, so it carries the
	   same column itself. */
	max-width: 768px;
	margin: 24px auto 48px;
}

/* The submit panel: progress while answering; once complete, the email
   field (when collecting) + See My Results. The email blocks the ANSWERS,
   never the questions. */

.tvi-trivia-player .tvi-trivia-submit {
	border: 2px solid var(--tvi-games-accent, #00aeef);
	border-radius: 16px;
	padding: 20px 24px;
	text-align: center;
	max-width: 480px;
	margin: 8px auto 0;
}

.tvi-trivia-player .tvi-trivia-progress {
	/* No margins of its own: while the quiz is incomplete this is the
	   panel's ONLY child, and any bottom margin skews it off vertical
	   center. The gap it used to carry belongs to the pairing below. */
	margin: 0;
	color: #666;
}

/* Space between "Enter your email…" and the form, only when both exist. */
.tvi-trivia-player .tvi-trivia-progress + form {
	margin-top: 10px;
}

.tvi-trivia-player .tvi-trivia-submit form {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
}

.tvi-trivia-player .tvi-trivia-email {
	flex: 1 1 220px;
	max-width: 320px;
	padding: 8px 12px;
	font-size: 16px;
	border: 1px solid #ccc;
	border-radius: 8px;
}

.tvi-trivia-player .tvi-trivia-email.tvi-trivia-invalid {
	border-color: #d9534f;
}

/* The subscribe disclosure. flex-basis:100% drops it onto its own line
   below the email + button row; it is text, not a control, so it takes no
   cursor and no hover. */
.tvi-trivia-player .tvi-trivia-subscribe-note {
	flex-basis: 100%;
	margin: 0;
	text-align: center;
	font-size: 13px;
	color: #767676; /* 4.54:1 on white — the AA floor for small text. */
}

.tvi-trivia-player .tvi-trivia-see-results {
	background-color: var(--tvi-games-accent, #00aeef);
	color: #fff;
	border: 0;
	border-radius: 18px;
	padding: 6px 20px;
	text-transform: uppercase;
	font-weight: 600;
	font-size: 15px;
	cursor: pointer;
	transition: 0.3s;
}

.tvi-trivia-player .tvi-trivia-see-results:hover {
	background-color: #000;
}

/* Questions */

.tvi-trivia-player .tvi-trivia-q {
	margin: 0 0 32px;
}

.tvi-trivia-player .tvi-trivia-q-head {
	display: flex;
	align-items: baseline;
	gap: 10px;
	margin-bottom: 10px;
}

.tvi-trivia-player .tvi-trivia-q-number {
	flex-shrink: 0;
	/* Site red + the data font (the theme's condensed stack), in the true
	   Regular (declared above). A pill, not a fixed circle: single digits
	   render round, double digits get room instead of getting tight. */
	background: #d60000;
	color: #fff;
	font-family: "IBMPlexSansCondensed", "OpenSans", "Helvetica Neue", Helvetica, Arial, sans-serif;
	font-weight: 400;
	font-size: 17px;
	border-radius: 999px;
	box-sizing: border-box;
	min-width: 30px;
	height: 30px;
	line-height: 30px;
	padding: 0 9px;
	text-align: center;
}

.tvi-trivia-player .tvi-trivia-q-text {
	font-weight: 600;
	font-size: 18px;
	line-height: 1.35;
}

.tvi-trivia-player .tvi-trivia-q-image {
	/* The 16:9 box, like every game image (served as the theme's 770x433
	   crop; the ratio holds even for uncropped fallbacks). */
	display: block;
	width: calc(100% - 38px);
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: 8px;
	margin: 0 0 12px 38px;
}

/* Choices — three layouts */

.tvi-trivia-player .tvi-trivia-choices {
	margin-left: 38px;
}

.tvi-trivia-player .tvi-trivia-choice {
	display: block;
	width: 100%;
	text-align: left;
	background: #f6f6f6;
	border: 2px solid #dee1e3;
	border-radius: 10px;
	padding: 10px 14px;
	margin-bottom: 8px;
	font-size: 16px;
	cursor: pointer;
	transition: 0.15s;
}

.tvi-trivia-player .tvi-trivia-choice:hover:enabled {
	border-color: var(--tvi-games-accent, #00aeef);
}

.tvi-trivia-player .tvi-trivia-choice.tvi-trivia-selected {
	border-color: var(--tvi-games-accent, #00aeef);
	background: var(--tvi-games-accent-wash, #e5f6fd);
}

.tvi-trivia-player .tvi-trivia-choice:disabled {
	cursor: default;
	opacity: 0.75;
}

.tvi-trivia-player .tvi-trivia-choice.tvi-trivia-right {
	border-color: #2e9e4f;
	background: #e8f6ec;
	opacity: 1;
}

.tvi-trivia-player .tvi-trivia-choice.tvi-trivia-wrong {
	border-color: #d9534f;
	background: #fdecea;
	opacity: 1;
}

/* Stacked: image beside the caption, one full-width row per choice. */

.tvi-trivia-player .tvi-trivia-layout-stacked .tvi-trivia-choice {
	display: flex;
	align-items: center;
	gap: 12px;
}

.tvi-trivia-player .tvi-trivia-layout-stacked .tvi-trivia-choice img {
	/* Choice images ride the theme's 16:9 crop (the poll rule); the
	   ratio here holds the row height even for uncropped fallbacks. */
	width: 96px;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: 6px;
	flex-shrink: 0;
}

/* Grid: image cards, two across. */

.tvi-trivia-player .tvi-trivia-layout-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}

.tvi-trivia-player .tvi-trivia-layout-grid .tvi-trivia-choice {
	margin-bottom: 0;
	text-align: center;
}

.tvi-trivia-player .tvi-trivia-layout-grid .tvi-trivia-choice img {
	/* Same 16:9 normalization as the stacked row above. */
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: 6px;
	display: block;
	margin: 0 0 8px;
}

/* Score */

.tvi-trivia-player .tvi-trivia-score {
	text-align: center;
	color: #666;
	margin-top: 8px;
}

.tvi-trivia-player .tvi-trivia-score-final {
	color: inherit;
	font-size: 22px;
	border-top: 1px solid #dee1e3;
	padding-top: 20px;
}
