/**
 * BBNT Fan Polls frontend styling.
 * Uses the host theme's amber accent (#FFB300) by convention; falls back gracefully
 * if the active theme doesn't define --bbnt-amber.
 */

.bbnt-poll {
	--bbnt-poll-amber: var(--bbnt-amber, #ffb300);
	--bbnt-poll-ink: var(--bbnt-ink, #141216);
	--bbnt-poll-border: var(--bbnt-border, #e7e0d3);
	--bbnt-poll-muted: var(--bbnt-muted, #6b6570);

	border: 1px solid var(--bbnt-poll-border);
	border-radius: 4px;
	padding: 18px;
	margin: 24px 0;
	background: #fff;
	font-family: inherit;
}

.bbnt-poll-disclaimer {
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--bbnt-poll-muted);
	background: #f4efe4;
	border-radius: 4px;
	padding: 8px 12px;
	margin: 0 0 16px;
}

.bbnt-poll-nojs {
	font-size: 0.85rem;
	color: var(--bbnt-poll-muted);
	margin-bottom: 12px;
}

.bbnt-poll-options {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.bbnt-poll-option {
	display: block;
	width: 100%;
	min-height: 48px;
	padding: 0 16px;
	background: #faf6ef;
	border: 2px solid var(--bbnt-poll-border);
	border-radius: 4px;
	font-size: 1rem;
	font-weight: 700;
	color: var(--bbnt-poll-ink);
	text-align: left;
	cursor: pointer;
}

.bbnt-poll-option:hover:not(:disabled) {
	border-color: var(--bbnt-poll-amber);
	background: #fff;
}

.bbnt-poll-option:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.bbnt-poll-option.is-selected {
	border-color: var(--bbnt-poll-amber);
	background: #fff8e6;
}

/* Results — hidden until a vote is cast or already-voted state is restored. */
.bbnt-poll-results {
	display: none;
	margin-top: 6px;
}

.bbnt-poll.is-voted .bbnt-poll-options {
	display: none;
}

.bbnt-poll.is-voted .bbnt-poll-results {
	display: block;
}

.bbnt-poll-bar-row + .bbnt-poll-bar-row {
	margin-top: 12px;
}

.bbnt-poll-bar-label {
	display: flex;
	justify-content: space-between;
	font-size: 0.9rem;
	font-weight: 600;
	margin-bottom: 4px;
}

.bbnt-poll-bar-track {
	height: 12px;
	background: #f0ece1;
	border-radius: 999px;
	overflow: hidden;
}

.bbnt-poll-bar-fill {
	height: 100%;
	background: var(--bbnt-poll-amber);
	border-radius: 999px;
	transition: width 0.4s ease;
}

.bbnt-poll-total {
	margin: 14px 0 0;
	font-size: 0.8rem;
	color: var(--bbnt-poll-muted);
}

.bbnt-poll-closed {
	margin-top: 12px;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--bbnt-poll-muted);
}

/* Honeypot: visually and programmatically hidden from real users, present for bots. */
.bbnt-poll-hp {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
	white-space: nowrap !important;
	left: -9999px !important;
}
