/*!
 * Action Network Custom Embed: neutral base styles for the counter.
 * Colours are meant to be set in the Elementor widget (Style tab) or via the
 * custom properties --ance-bg and --ance-accent.
 * Copyright (c) Florian Hülsebusch - admk, https://admk.de
 */

.ance-notice {
	padding: 0.75rem 1rem;
	border-left: 4px solid #dba617;
	background: #fcf9e8;
	color: #3c3c3c;
	font-size: 0.9rem;
}

/* ---- Circle ---------------------------------------------------------------- */
.an-counter--circle .progressWrapper {
	margin: 0 auto;
	padding: 0;
	width: 100%;
	max-width: 300px;
	aspect-ratio: 1;
	position: relative;
	display: flex;
	justify-content: center;
	align-items: center;
}
.an-counter--circle .progress-circle {
	position: relative;
	width: 100%;
	height: 100%;
}
.an-counter--circle .progressWrapper svg {
	transform: rotate(-90deg);
	width: 100%;
	height: 100%;
	overflow: visible;
}
.an-counter--circle .progressWrapper circle {
	fill: none;
	stroke-width: 12;
	stroke-linecap: round;
}
.an-counter--circle .progressWrapper .bg {
	stroke-width: 18;
	stroke: var(--ance-bg, rgba(0, 0, 0, 0.2));
}
.an-counter--circle .progressWrapper .front {
	fill: var(--ance-bg, rgba(0, 0, 0, 0.2));
}
.an-counter--circle .progress {
	stroke-dasharray: 440;
	stroke-dashoffset: 440;
}
.an-counter--circle .progressWrapper .progress-text {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	text-align: center;
	width: 90%;
}
.an-counter--circle .progressWrapper .progress-text .number {
	font-size: 1rem;
	font-weight: 700;
	line-height: 1;
}
.an-counter--circle .progressWrapper .progress-text .currentVotes {
	font-size: 210%;
	font-weight: 700;
	line-height: 1em;
	color: var(--ance-accent, currentColor);
}
.an-counter--circle .progressWrapper .progress-text .requiredVotes {
	font-size: 130%;
	font-weight: 700;
}
.an-counter--circle .progressWrapper .progress-text .vote-label {
	font-size: 100%;
}
.an-counter--circle .progressWrapper .confetti-canvas {
	position: absolute;
	top: 40%;
	left: 50%;
	pointer-events: none;
	width: 240%;
	height: 240%;
	transform: translate(-50%, -50%);
	transform-origin: center center;
	z-index: 9999;
}

/* ---- Horizontal bar ----------------------------------------------------------- */
.an-counter--horizontal {
	--bar-color-1: #ff0000;
	--bar-color-2: #000000;
}
.an-counter--horizontal .bar-track-wrap {
	position: relative;
	margin: 0.3rem;
}
.an-counter--horizontal .bar-track-wrap::after {
	content: "";
	width: calc(100% + 0.6rem);
	height: calc(100% + 0.6rem);
	background-color: rgba(255, 255, 255, 0.25);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	position: absolute;
	left: -0.3rem;
	top: -0.3rem;
	z-index: 0;
}
.an-counter--horizontal .bar-track {
	position: relative;
	z-index: 10;
	display: flex;
	justify-content: flex-end;
	flex-direction: column;
	align-items: flex-end;
	overflow: hidden;
}
.an-counter--horizontal .bar-fill {
	flex-shrink: 1;
	width: 0;
	min-width: 0 !important;
	height: 100%;
	position: relative;
	display: flex;
	align-items: center;
	gap: 0;
	background: linear-gradient(to left, var(--bar-color-1), var(--bar-color-2));
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
}
.an-counter--horizontal .bar-fill .bar-label {
	display: none;
	margin-left: 0.5rem;
	margin-right: 0.5rem;
	font-weight: 700;
	white-space: nowrap;
}
.an-counter--horizontal .bar-fill .bar-tip-image {
	position: relative;
	left: 0;
	top: 0;
	object-fit: contain;
	width: auto;
	height: 100%;
}
.an-counter--horizontal .progress-bar-wrapper {
	position: relative;
}
.an-counter--horizontal .progress-bar-wrapper .progress-bar {
	display: flex;
	flex-direction: column;
}
.an-counter--horizontal .progress-bar-wrapper .progress-text {
	z-index: 100;
	display: flex;
	gap: 0 0.5rem;
	align-items: center;
}
.an-counter--horizontal .progress-bar-wrapper .progress-text .vote-count {
	display: flex;
	flex-wrap: nowrap;
	gap: 0 0.5rem;
}
.an-counter--horizontal .progress-bar-wrapper .progress-text .vote-count .currentVotes,
.an-counter--horizontal .progress-bar-wrapper .progress-text .vote-count .requiredVotes {
	font-weight: 600;
}
.an-counter--horizontal .progress-bar-wrapper .confetti-canvas {
	position: absolute;
	top: 0;
	left: 50%;
	pointer-events: none;
	width: 120%;
	height: 800%;
	transform: translate(-50%, -50%);
	transform-origin: center center;
	z-index: 9999;
}
.an-counter--horizontal.text-pos-above .progress-text { order: 1; }
.an-counter--horizontal.text-pos-above .bar-track-wrap { order: 2; }
.an-counter--horizontal.text-pos-below .progress-text { order: 2; }
.an-counter--horizontal.text-pos-below .bar-track-wrap { order: 1; }
.an-counter--horizontal.dir-ltr .bar-track { align-items: flex-start; }
.an-counter--horizontal.dir-ltr .bar-track .bar-fill { justify-content: flex-end; }
.an-counter--horizontal.dir-ltr .bar-track .bar-fill .bar-tip-image { order: 2; }
.an-counter--horizontal.dir-ltr .bar-track .bar-fill .bar-label { order: 1; }
.an-counter--horizontal.dir-rtl .bar-track { align-items: flex-end; }
.an-counter--horizontal.dir-rtl .bar-track .bar-fill { justify-content: flex-start; }
.an-counter--horizontal.dir-rtl .bar-track .bar-fill .bar-tip-image { order: 1; }
.an-counter--horizontal.dir-rtl .bar-track .bar-fill .bar-label { order: 2; }
