.scf-poll {
	--scf-poll-ink: #17212b;
	--scf-poll-muted: #5d6b78;
	--scf-poll-line: #d8e1e8;
	--scf-poll-panel: #ffffff;
	--scf-poll-soft: #eef6f8;
	--scf-poll-accent: #007c89;
	--scf-poll-accent-dark: #005f69;
	--scf-poll-success: #176f45;
	--scf-poll-error: #a33a2a;
	margin: 1.5rem 0;
	color: var(--scf-poll-ink);
	font-family: inherit;
}

.scf-poll *,
.scf-poll *::before,
.scf-poll *::after {
	box-sizing: border-box;
}

.scf-poll__panel {
	border: 1px solid var(--scf-poll-line);
	border-radius: 8px;
	background: var(--scf-poll-panel);
	box-shadow: 0 16px 34px rgba(23, 33, 43, 0.08);
	overflow: hidden;
}

.scf-poll__header {
	padding: 22px 24px 12px;
}

.scf-poll__kicker {
	margin: 0 0 8px;
	color: var(--scf-poll-accent-dark);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: uppercase;
}

.scf-poll__question {
	margin: 0;
	color: var(--scf-poll-ink);
	font-size: clamp(1.2rem, 2vw, 1.55rem);
	line-height: 1.25;
}

.scf-poll__form {
	padding: 0 24px 22px;
}

.scf-poll__options {
	display: grid;
	gap: 10px;
	margin: 8px 0 18px;
}

.scf-poll__option {
	position: relative;
	display: block;
	margin: 0;
}

.scf-poll__choice {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 12px;
	align-items: center;
	min-height: 54px;
	width: 100%;
	padding: 14px 16px;
	border: 1px solid var(--scf-poll-line);
	border-radius: 8px;
	background: #fff;
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	overflow: hidden;
	transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.scf-poll__choice::before {
	content: "";
	width: 18px;
	height: 18px;
	border: 2px solid #9eb2bf;
	border-radius: 999px;
	position: absolute;
	left: 16px;
	top: 50%;
	transform: translateY(-50%);
	background: #fff;
	z-index: 2;
}

.scf-poll__choice-label {
	position: relative;
	z-index: 2;
	min-width: 0;
	padding-left: 30px;
	font-weight: 700;
	line-height: 1.35;
	overflow-wrap: anywhere;
}

.scf-poll__option:hover .scf-poll__choice:not(:disabled),
.scf-poll__choice:focus {
	border-color: var(--scf-poll-accent);
	box-shadow: 0 0 0 3px rgba(0, 124, 137, 0.14);
	outline: 0;
}

.scf-poll__option:hover .scf-poll__choice:not(:disabled) {
	transform: translateY(-1px);
}

.scf-poll__choice.is-selected {
	border-color: var(--scf-poll-accent);
}

.scf-poll__choice.is-selected::before {
	border-color: var(--scf-poll-accent);
	box-shadow: inset 0 0 0 4px #fff;
	background: var(--scf-poll-accent);
}

.scf-poll__choice:disabled {
	cursor: default;
}

.scf-poll__result {
	position: static;
	z-index: 1;
	display: none;
	align-items: center;
	gap: 10px;
	min-width: 62px;
	color: var(--scf-poll-muted);
	font-weight: 700;
}

.scf-poll--results .scf-poll__result {
	display: inline-flex;
}

.scf-poll__bar {
	position: absolute;
	inset: 0 auto 0 0;
	width: 0;
	background: linear-gradient(90deg, rgba(0, 124, 137, 0.16), rgba(64, 169, 190, 0.24));
	transition: width 420ms ease;
	z-index: 0;
}

.scf-poll__percent {
	position: relative;
	z-index: 2;
	min-width: 42px;
	text-align: right;
}

.scf-poll__actions {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
}

.scf-poll__choice.is-loading::after {
	content: "";
	position: absolute;
	right: 16px;
	top: 50%;
	width: 18px;
	height: 18px;
	border: 2px solid rgba(255, 255, 255, 0.55);
	border-top-color: var(--scf-poll-accent);
	border-radius: 50%;
	transform: translateY(-50%);
	animation: scf-poll-spin 700ms linear infinite;
	z-index: 3;
}

.scf-poll__total {
	color: var(--scf-poll-muted);
	font-size: 0.92rem;
	font-weight: 700;
}

.scf-poll__message {
	min-height: 1.4em;
	margin-top: 12px;
	font-size: 0.95rem;
	font-weight: 700;
	white-space: pre-line;
}

.scf-poll__message[data-type="success"] {
	color: var(--scf-poll-success);
}

.scf-poll__message[data-type="error"] {
	color: var(--scf-poll-error);
}

.scf-poll--voted .scf-poll__option {
	cursor: default;
}

.scf-poll--voted .scf-poll__choice {
	transform: none;
}

@keyframes scf-poll-spin {
	to {
		transform: translateY(-50%) rotate(360deg);
	}
}

@media (max-width: 560px) {
	.scf-poll__header,
	.scf-poll__form {
		padding-left: 18px;
		padding-right: 18px;
	}

	.scf-poll__choice {
		grid-template-columns: minmax(0, 1fr);
		gap: 8px;
	}

	.scf-poll__result {
		padding-left: 30px;
	}
}
