/* Beacon Poll - black & gold, matches Beacon Supporter / My Beacon cards */

.beacon-poll {
	/* Beacon Classic palette (shared with beacon-premium) */
	--bp-gold: #c8922a;
	--bp-gold-soft: #e0b040;
	--bp-gold-hot: #d4a554;
	--bp-ink: #1a1205;
	--bp-text: #eef0f4;
	--bp-muted: #a8b0bf;
	--bp-faint: #8b95a8;
	--bp-border: #2e3648;
	--bp-border-gold: rgba(200, 146, 42, 0.45);
	--bp-surface-0: #0c0f14;
	--bp-surface-1: #12161f;
	--bp-surface-2: #1a2030;
	--bp-surface-3: #131820;
	--bp-track: #2a3142;
	--bp-radius: 14px;
	--bp-radius-sm: 10px;

	max-width: 440px;
	margin: 1.5rem auto;
	padding: 1.45rem 1.35rem 1.35rem;
	box-sizing: border-box;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	color: var(--bp-text);
	line-height: 1.45;
	border-radius: var(--bp-radius);
	border: 1px solid var(--bp-border-gold);
	background:
		radial-gradient(ellipse 80% 70% at 10% 0%, rgba(200, 146, 42, 0.18), transparent 55%),
		linear-gradient(160deg, var(--bp-surface-0) 0%, #161c28 100%);
	box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18);
}

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

/* -- Header -- */
.beacon-poll .poll-kicker {
	margin: 0 0 0.45rem;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--bp-gold);
}

.beacon-poll .poll-question,
.beacon-poll h3.poll-question,
.td-ss-main-content .beacon-poll .poll-question,
.td-post-content .beacon-poll .poll-question,
.entry-content .beacon-poll .poll-question {
	font-size: clamp(1.1rem, 2.6vw, 1.28rem);
	font-weight: 700;
	margin: 0 0 0.55rem;
	color: #ffffff !important;
	line-height: 1.28;
}

.beacon-poll .poll-description {
	font-size: 0.95rem;
	color: var(--bp-muted);
	margin: 0 0 0.9rem;
	line-height: 1.5;
}

.beacon-poll .poll-hint,
.beacon-poll .poll-change-note {
	font-size: 0.88rem;
	color: var(--bp-faint);
	margin: 0 0 0.85rem;
	line-height: 1.45;
}

.beacon-poll .poll-status-badge {
	display: inline-block;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 0.22rem 0.65rem;
	border-radius: 999px;
	margin: 0 0 0.85rem;
	background: var(--bp-gold);
	color: var(--bp-ink);
}

.beacon-poll .poll-status-badge.poll-closed {
	background: rgba(200, 146, 42, 0.16);
	color: var(--bp-gold-soft);
	border: 1px solid var(--bp-border-gold);
}

/* -- Options (card rows) -- */
.beacon-poll .beacon-poll-form {
	margin: 0;
}

.beacon-poll .poll-option {
	margin-bottom: 0.55rem;
}

.beacon-poll .poll-option:last-of-type {
	margin-bottom: 0;
}

.beacon-poll .poll-option label {
	cursor: pointer;
	display: flex;
	align-items: flex-start;
	gap: 0.7rem;
	padding: 0.8rem 0.9rem;
	border-radius: var(--bp-radius-sm);
	border: 1px solid var(--bp-border);
	background:
		radial-gradient(ellipse 90% 60% at 0% 0%, rgba(200, 146, 42, 0.08), transparent 50%),
		linear-gradient(165deg, var(--bp-surface-2) 0%, var(--bp-surface-3) 100%);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
	transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, background 0.15s ease;
	color: var(--bp-text);
}

.beacon-poll .poll-option label:hover {
	border-color: rgba(200, 146, 42, 0.55);
	box-shadow: 0 8px 22px rgba(0, 0, 0, 0.24);
	transform: translateY(-1px);
}

.beacon-poll .poll-option input {
	margin: 0.2rem 0 0;
	accent-color: var(--bp-gold);
	flex-shrink: 0;
	width: 1.05rem;
	height: 1.05rem;
}

.beacon-poll .poll-option input:focus-visible {
	outline: 2px solid var(--bp-gold);
	outline-offset: 2px;
}

.beacon-poll .poll-option label:has(input:checked) {
	border-color: rgba(200, 146, 42, 0.7);
	background:
		radial-gradient(ellipse 90% 60% at 100% 0%, rgba(200, 146, 42, 0.2), transparent 50%),
		linear-gradient(165deg, #1e2434 0%, #151a24 100%);
	box-shadow:
		0 0 0 1px rgba(200, 146, 42, 0.2),
		0 8px 22px rgba(0, 0, 0, 0.24);
}

.beacon-poll .option-label {
	flex: 1;
	font-size: 0.96rem;
	font-weight: 500;
	line-height: 1.4;
	color: #eef0f4 !important;
	padding-top: 0.05rem;
}

/* -- Actions -- */
.beacon-poll .poll-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.85rem 1rem;
	margin-top: 1.15rem;
}

.beacon-poll .vote-button {
	display: inline-block;
	background: var(--bp-gold);
	color: var(--bp-ink);
	border: none;
	padding: 0.72rem 1.35rem;
	border-radius: 8px;
	cursor: pointer;
	font-size: 0.95rem;
	font-weight: 700;
	letter-spacing: 0.01em;
	transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
	box-shadow: 0 4px 14px rgba(200, 146, 42, 0.25);
}

.beacon-poll .vote-button:hover {
	background: var(--bp-gold-hot);
	color: var(--bp-ink);
}

.beacon-poll .vote-button:active {
	transform: translateY(1px);
}

.beacon-poll .vote-button:focus-visible {
	outline: 2px solid var(--bp-gold-soft);
	outline-offset: 2px;
}

.beacon-poll .vote-button:disabled,
.beacon-poll .vote-button.is-loading {
	opacity: 0.6;
	cursor: wait;
	box-shadow: none;
}

.beacon-poll .see-results-link {
	color: var(--bp-gold-soft);
	text-decoration: underline;
	text-underline-offset: 2px;
	font-size: 0.9rem;
	font-weight: 600;
}

.beacon-poll .see-results-link:hover {
	color: var(--bp-gold);
}

/* -- Results -- */
.beacon-poll .poll-results {
	margin-top: 0.25rem;
}

.beacon-poll .poll-results .result-item {
	margin-bottom: 0.95rem;
	padding: 0.75rem 0.85rem 0.85rem;
	border-radius: var(--bp-radius-sm);
	border: 1px solid var(--bp-border);
	background: linear-gradient(165deg, var(--bp-surface-2) 0%, var(--bp-surface-3) 100%);
}

.beacon-poll .poll-results .result-item:last-child {
	margin-bottom: 0;
}

.beacon-poll .result-meta {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 0.75rem;
	margin-bottom: 0.45rem;
}

.beacon-poll .result-text {
	font-size: 0.95rem;
	font-weight: 600;
	color: #ffffff !important;
	line-height: 1.35;
}

.beacon-poll .result-stats {
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--bp-gold-soft);
	white-space: nowrap;
}

.beacon-poll .result-bar {
	background: var(--bp-track);
	border-radius: 999px;
	height: 9px;
	overflow: hidden;
	border: 1px solid rgba(46, 54, 72, 0.9);
}

.beacon-poll .bar-fill {
	background: linear-gradient(90deg, #a87820 0%, var(--bp-gold) 45%, var(--bp-gold-soft) 100%);
	height: 100%;
	border-radius: 999px;
	min-width: 0;
	transition: width 0.55s ease;
	box-shadow: 0 0 10px rgba(200, 146, 42, 0.35);
}

.beacon-poll .total-votes {
	font-size: 0.85rem;
	color: var(--bp-faint);
	margin: 0.95rem 0 0;
	text-align: right;
	font-weight: 500;
}

.beacon-poll .poll-thanks,
.beacon-poll .beacon-poll-login {
	color: var(--bp-muted);
	margin: 0.5rem 0;
	font-size: 0.98rem;
	line-height: 1.5;
}

.beacon-poll .beacon-poll-error {
	color: #f5a8a8;
	margin: 0;
}

.beacon-poll .beacon-poll-loading {
	color: var(--bp-muted);
	margin: 0;
	font-size: 0.95rem;
}

.beacon-poll .poll-results-preview {
	margin-top: 1.25rem;
	padding-top: 1.1rem;
	border-top: 1px solid var(--bp-border);
}

.beacon-poll .poll-results-preview > .poll-question,
.beacon-poll .poll-results-preview > .poll-kicker,
.beacon-poll .poll-results-preview > .poll-description {
	display: none;
}

/* Email verify + Turnstile */
.beacon-poll .poll-email-field {
	margin: 0.9rem 0 0.35rem;
}

.beacon-poll .poll-email-label {
	display: block;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--bp-gold);
	margin-bottom: 0.4rem;
}

.beacon-poll .poll-email-input {
	width: 100%;
	padding: 0.65rem 0.75rem;
	border-radius: 8px;
	border: 1px solid var(--bp-border);
	background: #0f131a;
	color: #ffffff !important;
	font-size: 0.95rem;
}

.beacon-poll .poll-email-input:focus {
	outline: 2px solid var(--bp-gold);
	outline-offset: 1px;
	border-color: rgba(200, 146, 42, 0.65);
}

.beacon-poll .beacon-poll-turnstile {
	margin: 0.9rem 0 0.25rem;
	min-height: 65px;
}

.beacon-poll .poll-flash-ok {
	margin-bottom: 0.85rem !important;
	color: #e0b040 !important;
	font-weight: 600;
}

/* Full-width option when embedded in wide content */
@media (min-width: 640px) {
	.beacon-poll {
		max-width: 480px;
		padding: 1.55rem 1.5rem 1.45rem;
	}
}

/* Optional wide layout via shortcode class on parent */
.beacon-poll.beacon-poll--wide {
	max-width: 560px;
}

/* Prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
	.beacon-poll .poll-option label,
	.beacon-poll .bar-fill,
	.beacon-poll .vote-button {
		transition: none;
	}

	.beacon-poll .poll-option label:hover {
		transform: none;
	}
}
