/* Holiday Vote Engine — front-end. Inherits theme typography on purpose. */

.hv-snapshot,
.hv-score,
.hv-verdict,
.hv-vote,
.hv-related,
.hv-matchups,
.hv-pagination,
.hv-table-wrap {
	--hv-a: #0f766e;
	--hv-b: #b45309;
	--hv-line: rgba(0, 0, 0, 0.14);
	--hv-surface: rgba(0, 0, 0, 0.035);
	--hv-muted: rgba(0, 0, 0, 0.6);
	--hv-radius: 10px;
	/* One knob for the whole plugin. Raise it and every size below follows. */
	--hv-fs: 1.08rem;
	font-size: var(--hv-fs);
}

@media (prefers-color-scheme: dark) {
	.hv-snapshot,
	.hv-score,
	.hv-verdict,
	.hv-vote,
	.hv-related,
	.hv-matchups,
	.hv-pagination,
	.hv-table-wrap {
		--hv-a: #2dd4bf;
		--hv-b: #fbbf24;
		--hv-line: rgba(255, 255, 255, 0.18);
		--hv-surface: rgba(255, 255, 255, 0.06);
		--hv-muted: rgba(255, 255, 255, 0.65);
	}
}

/* Short answer box */
.hv-snapshot {
	margin: 2rem 0;
	padding: 1.1rem 1.3rem;
	border-left: 4px solid var(--hv-a);
	background: var(--hv-surface);
	border-radius: 0 var(--hv-radius) var(--hv-radius) 0;
}

.hv-snapshot__label {
	margin: 0 0 0.5rem;
	font-size: 0.76em;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--hv-muted);
}

.hv-snapshot__list {
	margin: 0;
	padding-left: 1.1rem;
}

.hv-snapshot__list li {
	margin-bottom: 0.4rem;
	line-height: 1.6;
}

/* Photos */
.hv-figure {
	margin: 2rem 0;
}

.hv-figure__img {
	width: 100%;
	height: auto;
	border-radius: var(--hv-radius);
	display: block;
}

.hv-figure figcaption {
	margin-top: 0.5rem;
	font-size: 0.88em;
	color: var(--hv-muted);
}

.hv-credit {
	opacity: 0.75;
}

.hv-credit a {
	color: inherit;
}

/* Comparison table */
.hv-table-wrap {
	margin: 2rem 0 0.6rem;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.hv-table {
	width: 100%;
	border-collapse: collapse;
	min-width: 480px;
}

.hv-table th,
.hv-table td {
	padding: 0.8rem 0.9rem;
	border-bottom: 1px solid var(--hv-line);
	text-align: left;
	vertical-align: top;
	font-size: 0.95em;
}

.hv-table thead th {
	font-size: 0.84em;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	border-bottom-width: 2px;
}

.hv-table thead th:nth-child(2) {
	color: var(--hv-a);
}

.hv-table thead th:nth-child(3) {
	color: var(--hv-b);
}

.hv-table tbody th {
	width: 26%;
	font-weight: 600;
}

.hv-table td.hv-win {
	background: var(--hv-surface);
	font-weight: 600;
	box-shadow: inset 3px 0 0 currentColor;
}

.hv-table td.hv-win:nth-child(2) {
	color: var(--hv-a);
}

.hv-table td.hv-win:nth-child(3) {
	color: var(--hv-b);
}

.hv-table-note {
	font-size: 0.86em;
	color: var(--hv-muted);
}

/* Head-to-head scorecard */
.hv-score {
	margin: 2.4rem 0;
	padding: 1.2rem 1rem;
	border: 1px solid var(--hv-line);
	border-radius: var(--hv-radius);
}

.hv-score__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.6rem;
	padding-bottom: 0.8rem;
	margin-bottom: 0.9rem;
	border-bottom: 1px solid var(--hv-line);
}

.hv-score__team {
	font-weight: 700;
	font-size: 1.02em;
}

.hv-score__team--a {
	color: var(--hv-a);
}

.hv-score__team--b {
	color: var(--hv-b);
	text-align: right;
}

.hv-score__vs {
	font-size: 0.76em;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--hv-muted);
	white-space: nowrap;
}

.hv-score__row {
	display: grid;
	grid-template-columns: 1.6rem 1fr auto 1fr 1.6rem;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 0.5rem;
}

.hv-score__label {
	font-size: 0.88em;
	text-align: center;
	color: var(--hv-muted);
	white-space: nowrap;
}

.hv-score__val {
	font-size: 0.86em;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.hv-score__val--a {
	color: var(--hv-a);
}

.hv-score__val--b {
	color: var(--hv-b);
	text-align: right;
}

.hv-score__bar {
	display: flex;
	height: 9px;
	background: var(--hv-surface);
	border-radius: 99px;
	overflow: hidden;
}

.hv-score__bar--a {
	justify-content: flex-end;
}

.hv-score__bar i {
	display: block;
	height: 100%;
	border-radius: 99px;
}

.hv-score__bar--a i {
	background: var(--hv-a);
}

.hv-score__bar--b i {
	background: var(--hv-b);
}

.hv-score__total {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 1rem;
	padding-top: 0.8rem;
	border-top: 1px solid var(--hv-line);
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.hv-score__totallabel {
	font-size: 0.76em;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--hv-muted);
}

.hv-score__total span:first-child {
	color: var(--hv-a);
}

.hv-score__total span:last-child {
	color: var(--hv-b);
}

/* Verdict */
.hv-verdict {
	margin: 2.4rem 0;
	padding: 1.5rem;
	border: 2px solid var(--hv-a);
	border-radius: var(--hv-radius);
}

.hv-verdict__label {
	margin: 0;
	font-size: 0.76em;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--hv-muted);
}

.hv-verdict__pick {
	margin: 0.25rem 0 0.4rem;
	font-size: 1.9em;
	line-height: 1.15;
	font-weight: 800;
	color: var(--hv-a);
}

.hv-verdict__pick span {
	display: block;
	font-size: 0.85em;
	font-weight: 500;
	letter-spacing: 0.04em;
	color: var(--hv-muted);
}

.hv-verdict__headline {
	margin: 0 0 0.8rem;
	font-size: 1.05em;
	font-weight: 600;
}

.hv-verdict__body {
	line-height: 1.65;
}

.hv-verdict__body p:last-child {
	margin-bottom: 0;
}

/* Vote */
.hv-vote {
	margin: 2.4rem 0;
	padding: 1.4rem;
	background: var(--hv-surface);
	border-radius: var(--hv-radius);
}

.hv-vote__question {
	margin: 0 0 0.9rem;
	font-weight: 700;
	font-size: 1.1em;
}

.hv-vote__buttons {
	display: flex;
	gap: 0.6rem;
	flex-wrap: wrap;
}

.hv-vote__btn {
	flex: 1 1 160px;
	padding: 0.85rem 1rem;
	font: inherit;
	font-weight: 600;
	color: #fff;
	background: var(--hv-a);
	border: 0;
	border-radius: 8px;
	cursor: pointer;
	transition: transform 0.12s ease, opacity 0.12s ease;
}

.hv-vote__btn[data-choice="b"] {
	background: var(--hv-b);
}

.hv-vote__btn:hover {
	transform: translateY(-1px);
}

.hv-vote__btn:focus-visible {
	outline: 3px solid currentColor;
	outline-offset: 2px;
}

.hv-vote__btn[disabled] {
	opacity: 0.45;
	cursor: default;
	transform: none;
}

.hv-vote__results {
	margin-top: 1rem;
	display: none;
}

.hv-vote.is-voted .hv-vote__results {
	display: block;
}

.hv-vote.is-voted .hv-vote__buttons {
	opacity: 0.55;
}

.hv-vote__bar {
	display: flex;
	height: 14px;
	border-radius: 99px;
	overflow: hidden;
	background: var(--hv-line);
}

.hv-vote__fill {
	display: block;
	height: 100%;
	transition: width 0.5s ease;
}

.hv-vote__fill--a {
	background: var(--hv-a);
}

.hv-vote__fill--b {
	background: var(--hv-b);
}

.hv-vote__legend {
	display: flex;
	justify-content: space-between;
	margin-top: 0.5rem;
	font-size: 0.85em;
}

.hv-vote__leg--a b {
	color: var(--hv-a);
}

.hv-vote__leg--b b {
	color: var(--hv-b);
}

.hv-vote__count {
	margin: 0.4rem 0 0;
	font-size: 0.86em;
	color: var(--hv-muted);
}

.hv-vote__msg {
	margin: 0.6rem 0 0;
	font-size: 0.85em;
	color: var(--hv-muted);
	min-height: 1.2em;
}

/* Leaderboard */
.hv-board {
	list-style: none;
	margin: 1.5rem 0;
	padding: 0;
	counter-reset: hvrank;
}

.hv-board__row {
	display: grid;
	grid-template-columns: 1.6rem minmax(6rem, 10rem) 1fr auto;
	align-items: center;
	gap: 0.7rem;
	padding: 0.5rem 0;
	border-bottom: 1px solid var(--hv-line);
}

.hv-board__row::before {
	counter-increment: hvrank;
	content: counter(hvrank);
	font-size: 0.84em;
	font-weight: 700;
	color: var(--hv-muted);
}

.hv-board__name {
	font-weight: 600;
}

.hv-board__bar {
	display: block;
	height: 8px;
	background: var(--hv-surface);
	border-radius: 99px;
	overflow: hidden;
}

.hv-board__bar i {
	display: block;
	height: 100%;
	background: var(--hv-a);
	border-radius: 99px;
}

.hv-board__num {
	font-variant-numeric: tabular-nums;
	font-size: 0.85em;
	color: var(--hv-muted);
}

/* FAQ */
.hv-faq__item {
	border-bottom: 1px solid var(--hv-line);
	padding: 0.7rem 0;
}

.hv-faq__item summary {
	cursor: pointer;
	font-weight: 600;
}

.hv-faq__item p {
	margin: 0.6rem 0 0;
	line-height: 1.6;
}

/* Related */
.hv-related {
	margin: 2.4rem 0;
	padding: 1.1rem 1.3rem;
	border: 1px solid var(--hv-line);
	border-radius: var(--hv-radius);
}

.hv-related__label {
	margin: 0 0 0.5rem;
	font-size: 0.76em;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--hv-muted);
}

.hv-related ul {
	margin: 0;
	padding-left: 1.1rem;
}

@media (max-width: 600px) {
	.hv-score__row {
		grid-template-columns: 1.5rem 1fr 1fr 1.5rem;
		grid-template-areas:
			"label label label label"
			"va bara barb vb";
		row-gap: 0.15rem;
	}

	.hv-score__label {
		grid-area: label;
		text-align: left;
	}

	.hv-score__val--a {
		grid-area: va;
	}

	.hv-score__bar--a {
		grid-area: bara;
	}

	.hv-score__bar--b {
		grid-area: barb;
	}

	.hv-score__val--b {
		grid-area: vb;
	}

	.hv-verdict__pick {
		font-size: 1.5em;
	}

	.hv-board__row {
		grid-template-columns: 1.4rem 1fr auto;
	}

	.hv-board__bar {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hv-vote__fill,
	.hv-vote__btn {
		transition: none;
	}
}

/* Matchup index */
.hv-matchups {
	margin: 1.5rem 0;
}

.hv-matchups__label {
	margin: 0 0 0.8rem;
	font-size: 0.76em;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--hv-muted);
}

.hv-matchups__list {
	margin: 0;
	padding-left: 1.1rem;
}

.hv-matchups__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 1.4rem;
}

.hv-mcard {
	border: 1px solid var(--hv-line);
	border-radius: var(--hv-radius);
	overflow: hidden;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hv-mcard:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 22px rgba(0, 0, 0, 0.09);
}

.hv-mcard__link {
	display: block;
	color: inherit;
	text-decoration: none;
}

.hv-mcard__link:focus-visible {
	outline: 3px solid var(--hv-a);
	outline-offset: -3px;
}

.hv-mcard__media {
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--hv-surface);
}

.hv-mcard__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.hv-mcard__body {
	display: block;
	padding: 0.9rem 1rem 1rem;
}

/* The split line is the signature: two destinations, one divider. */
.hv-mcard__vs {
	display: flex;
	align-items: baseline;
	gap: 0.4rem;
	font-size: 0.84em;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	margin-bottom: 0.4rem;
}

.hv-mcard__vs b {
	font-weight: 700;
}

.hv-mcard__a {
	color: var(--hv-a);
}

.hv-mcard__b {
	color: var(--hv-b);
}

.hv-mcard__vs i {
	font-style: normal;
	font-size: 0.74em;
	color: var(--hv-muted);
	flex: 0 0 auto;
}

.hv-mcard__title {
	display: block;
	font-weight: 600;
	line-height: 1.35;
	margin-bottom: 0.4rem;
}

.hv-mcard__meta {
	display: block;
	font-size: 0.84em;
	color: var(--hv-muted);
}

.hv-mcard__votes {
	display: block;
	margin-top: 0.7rem;
}

.hv-mcard__bar {
	display: flex;
	height: 6px;
	border-radius: 99px;
	overflow: hidden;
	background: var(--hv-b);
	margin-bottom: 0.35rem;
}

.hv-mcard__bar i {
	display: block;
	height: 100%;
	background: var(--hv-a);
}

.hv-mcard__count {
	font-size: 0.76em;
	color: var(--hv-muted);
}

.hv-pagination ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	list-style: none;
	margin: 1.6rem 0 0;
	padding: 0;
	justify-content: center;
}

.hv-pagination a,
.hv-pagination span {
	display: block;
	padding: 0.4rem 0.75rem;
	border: 1px solid var(--hv-line);
	border-radius: 6px;
	text-decoration: none;
	font-size: 0.85em;
	color: inherit;
}

.hv-pagination .current {
	background: var(--hv-a);
	border-color: var(--hv-a);
	color: #fff;
}

.hv-empty {
	color: var(--hv-muted);
	font-style: italic;
}

@media (prefers-reduced-motion: reduce) {
	.hv-mcard {
		transition: none;
	}
}
