.theme-polls {
	font-family: inherit;
	font-size: inherit;
	font-weight: inherit;
	font-style: inherit;
	letter-spacing: inherit;
	line-height: inherit;
	color: inherit;
	position: relative;
	isolation: isolate;
	box-sizing: border-box;
	max-width: 40em;
	margin: 1.5em 0;
	overflow: hidden;
}

.theme-polls *,
.theme-polls *::before,
.theme-polls *::after {
	box-sizing: border-box;
}

.theme-polls__backdrop {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	z-index: 0;
	pointer-events: none;
}

/* Dark scrim so white poll text stays readable on any featured image. */
.theme-polls__backdrop::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(
			180deg,
			rgba(0, 0, 0, 0) 0%,
			rgba(0, 0, 0, 0.165) 45%,
			rgba(0, 0, 0, 0.333) 100%
		);
}

.theme-polls--has-image {
	color: #fff;
}

.theme-polls--has-image .theme-polls__question,
.theme-polls--has-image .theme-polls__option,
.theme-polls--has-image .theme-polls__result-label,
.theme-polls--has-image .theme-polls__result-pct,
.theme-polls--has-image .theme-polls__total,
.theme-polls--has-image .theme-polls__preview-note,
.theme-polls--has-image .theme-polls__status {
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.theme-polls__panel {
	position: relative;
	z-index: 1;
	padding: 1.25em 1.35em 1.4em;
}

.theme-polls__brand {
	display: inline-flex;
	align-items: center;
	margin: 0 0 1em;
}

.theme-polls--has-image .theme-polls__brand {
	background: #fff;
	color: #111;
}

.theme-polls__logo {
	display: block;
	max-height: 2.5em;
	width: auto;
	height: auto;
}

.theme-polls--has-image .theme-polls__site-name {
	color: #111;
}

.theme-polls__site-name {
	font-family: inherit;
	font-size: 0.85em;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.theme-polls__question {
	font-family: inherit;
	font-size: 1.35em;
	font-weight: 700;
	line-height: 1.25;
	margin: 0 0 0.85em;
	color: inherit;
}

.theme-polls__preview-note {
	font-family: inherit;
	font-size: 0.9em;
	margin: 0 0 0.85em;
	opacity: 0.85;
}

.theme-polls__options {
	display: flex;
	flex-direction: column;
	gap: 0.5em;
}

.theme-polls__option {
	font-family: inherit;
	font-size: inherit;
	line-height: inherit;
	color: inherit;
	text-align: left;
	width: 100%;
	margin: 0;
	padding: 0.7em 0.9em;
	cursor: pointer;
	background: color-mix(in srgb, currentColor 10%, transparent);
	border: 1px solid color-mix(in srgb, currentColor 28%, transparent);
	appearance: none;
	-webkit-appearance: none;
}

.theme-polls__option p {
	margin: 0;
}

.theme-polls__option:hover,
.theme-polls__option:focus-visible {
	background: color-mix(in srgb, currentColor 18%, transparent);
}

.theme-polls__option:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.theme-polls__option:disabled {
	cursor: wait;
	opacity: 0.7;
}

.theme-polls__results {
	display: flex;
	flex-direction: column;
	gap: 0.85em;
}

.theme-polls__result-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.75em;
	margin: 0 0 0.35em;
}

.theme-polls__result-label {
	flex: 1 1 auto;
	min-width: 0;
}

.theme-polls__result-label p {
	margin: 0;
}

.theme-polls__result-pct {
	font-family: inherit;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.theme-polls__bar-track {
	width: 100%;
	height: 0.7em;
	background: color-mix(in srgb, currentColor 16%, transparent);
	overflow: hidden;
}

.theme-polls__bar-fill {
	height: 100%;
	width: 0;
	background: currentColor;
	transition: width 0.45s ease;
}

.theme-polls__total {
	font-family: inherit;
	margin: 0.4em 0 0;
	opacity: 0.9;
}

.theme-polls__status {
	font-family: inherit;
	font-size: 0.9em;
	margin: 0.75em 0 0;
}

.theme-polls-notice {
	font-family: inherit;
}

@media (max-width: 600px) {
	.theme-polls__panel {
		padding: 1em;
	}

	.theme-polls__question {
		font-size: 1.2em;
	}
}
