/* The inline poll player. Everything scopes under .tvi-poll-player so
   nothing leaks into (or in from) the page; typography inherits the theme.
   Embedded in article bodies, so it carries the article column width the
   theme applies per-element (same rationale as the trivia player). */

.tvi-poll-player {
	max-width: 768px;
	margin: 24px auto;
}

.tvi-poll-player .tvi-poll-question {
	font-size: 20px;
	line-height: 1.3;
	margin: 0 0 14px;
}

/* Choices — buttons style: full-width rows (the trivia list look). */

.tvi-poll-player .tvi-poll-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-poll-player .tvi-poll-choice:hover {
	border-color: #00aeef;
}

.tvi-poll-player .tvi-poll-choice.tvi-poll-selected {
	border-color: #00aeef;
	background: #e5f6fd;
}

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

.tvi-poll-player .tvi-poll-style-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	margin-bottom: 8px;
}

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

.tvi-poll-player .tvi-poll-style-grid .tvi-poll-choice img {
	/* Uniform card shape: the server serves the theme's 16:9 crop, and
	   this holds the ratio even when an old original predates that
	   registered size and falls back uncropped. */
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: 6px;
	display: block;
	margin: 0 0 8px;
}

/* The vote panel (email + Vote, or just Vote). */

.tvi-poll-player .tvi-poll-panel {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin-top: 12px;
}

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

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

.tvi-poll-player .tvi-poll-vote {
	background-color: #00aeef;
	color: #fff;
	border: 0;
	border-radius: 18px;
	padding: 6px 24px;
	text-transform: uppercase;
	font-weight: 600;
	font-size: 15px;
	cursor: pointer;
	transition: 0.3s;
}

.tvi-poll-player .tvi-poll-vote:hover:enabled {
	background-color: #000;
}

.tvi-poll-player .tvi-poll-vote:disabled {
	opacity: 0.5;
	cursor: default;
}

/* The subscribe disclosure. flex-basis:100% drops it onto its own line
   below the email + Vote row; it is text, not a control, so it takes no
   cursor and no hover. */
.tvi-poll-player .tvi-poll-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-poll-player .tvi-poll-note {
	flex-basis: 100%;
	text-align: center;
	color: #d9534f;
	margin: 0;
}

/* Results — labeled bars that draw out from zero. */

.tvi-poll-player .tvi-poll-result {
	margin-bottom: 12px;
}

.tvi-poll-player .tvi-poll-result-head {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 4px;
}

.tvi-poll-player .tvi-poll-result-thumb {
	width: 36px;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: 4px;
	flex-shrink: 0;
}

.tvi-poll-player .tvi-poll-result-label {
	font-size: 16px;
}

.tvi-poll-player .tvi-poll-your-vote {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	color: #00aeef;
	border: 1px solid #00aeef;
	border-radius: 999px;
	padding: 1px 8px;
}

.tvi-poll-player .tvi-poll-result-pct {
	margin-left: auto;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.tvi-poll-player .tvi-poll-result-track {
	background: #eef0f1;
	border-radius: 999px;
	height: 12px;
	overflow: hidden;
}

.tvi-poll-player .tvi-poll-result-bar {
	/* Drawn at zero width; player.js sets the real width a frame later so
	   this transition animates the line out. */
	width: 0;
	height: 100%;
	background: #00aeef;
	border-radius: 999px;
	transition: width 0.8s ease-out;
}

.tvi-poll-player .tvi-poll-mine .tvi-poll-result-bar {
	background: #0072bc;
}

@media (prefers-reduced-motion: reduce) {
	.tvi-poll-player .tvi-poll-result-bar {
		transition: none;
	}
}

.tvi-poll-player .tvi-poll-total,
.tvi-poll-player .tvi-poll-already {
	text-align: center;
	color: #666;
	margin: 10px 0 0;
	font-size: 14px;
}
