/* RH Polls – inherits the theme's font and text colour.
   Change --rhpoll-accent in your theme's CSS to match the site's house colour. */
.rhpoll {
	--rhpoll-accent: #1f5f9e;
	--rhpoll-line: rgba(128, 128, 128, .32);
	--rhpoll-soft: rgba(128, 128, 128, .13);
	border: 1px solid var(--rhpoll-line);
	border-top: 4px solid var(--rhpoll-accent);
	border-radius: 4px;
	padding: 1.25rem 1.25rem 1rem;
	margin: 1.75rem 0;
	max-width: 40rem;
	color: inherit;
	font: inherit;
	line-height: 1.45;
}
.rhpoll * { box-sizing: border-box; }
.rhpoll .rhpoll__title { margin: 0 0 .9rem; font-size: 1.2em; line-height: 1.25; }

.rhpoll__progress { display: flex; align-items: center; gap: .75rem; margin: 0 0 1rem; font-size: .85em; }
.rhpoll__step { white-space: nowrap; opacity: .75; }
.rhpoll__track { flex: 1; height: 3px; background: var(--rhpoll-soft); }
.rhpoll__trackfill { height: 100%; background: var(--rhpoll-accent); transition: width .25s ease; }

.rhpoll .rhpoll__q { border: 0; margin: 0; padding: 0; min-width: 0; }
.rhpoll .rhpoll__qtext { display: block; float: none; width: 100%; margin: 0 0 .75rem; padding: 0; font-size: 1.05em; font-weight: 700; }

.rhpoll__opt {
	display: flex; align-items: center; gap: .65rem;
	margin: 0 0 .45rem; padding: .7rem .85rem;
	border: 1px solid var(--rhpoll-line); border-radius: 4px;
	cursor: pointer; font-weight: 400;
}
.rhpoll__opt:hover { border-color: var(--rhpoll-accent); }
.rhpoll__opt:has(input:checked) { border-color: var(--rhpoll-accent); background: var(--rhpoll-soft); }
.rhpoll__opt input { margin: 0; flex: none; width: 1.1em; height: 1.1em; accent-color: var(--rhpoll-accent); }

.rhpoll__nav { display: flex; justify-content: space-between; gap: .5rem; margin-top: 1rem; }
.rhpoll__nav > :only-child { margin-left: auto; }
.rhpoll .rhpoll__btn {
	appearance: none; border: 1px solid var(--rhpoll-accent); border-radius: 4px;
	background: var(--rhpoll-accent); color: #fff;
	padding: .6rem 1.15rem; font: inherit; font-weight: 700; line-height: 1.2; cursor: pointer;
}
.rhpoll .rhpoll__btn--ghost { background: transparent; color: inherit; border-color: var(--rhpoll-line); }
.rhpoll .rhpoll__btn:disabled { opacity: .4; cursor: not-allowed; }
.rhpoll .rhpoll__btn:focus-visible,
.rhpoll__opt:has(input:focus-visible) { outline: 2px solid var(--rhpoll-accent); outline-offset: 2px; }

.rhpoll__note { margin: 0 0 1rem; font-size: .9em; opacity: .8; }
.rhpoll__res { margin: 0 0 .8rem; }
.rhpoll__reslabel { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .3rem; }
.rhpoll__reslabel strong { font-variant-numeric: tabular-nums; }
.rhpoll__bar { height: .7rem; background: var(--rhpoll-soft); border-radius: 2px; overflow: hidden; }
.rhpoll__barfill { width: 0; height: 100%; background: var(--rhpoll-accent); opacity: .45; transition: width .7s cubic-bezier(.2, .7, .2, 1); }
.rhpoll__res.is-top .rhpoll__barfill { opacity: 1; }

.rhpoll__total, .rhpoll__msg, .rhpoll__loading { margin: .6rem 0 0; font-size: .85em; opacity: .75; }
.rhpoll__msg:empty { display: none; }
.rhpoll__msg[role="alert"]:not(:empty) { opacity: 1; color: #b3261e; }

@media (prefers-reduced-motion: reduce) {
	.rhpoll__barfill, .rhpoll__trackfill { transition: none; }
}
