/**
 * Easy Progress Bar 1.5
 */

.jx-epb {
	--epb-accent: #2563eb;
	--epb-track: #e2e8f0;
	--epb-surface: #ffffff;
	--epb-surface-alt: #f8fafc;
	--epb-text: #0f172a;
	--epb-muted: #64748b;
	--epb-border: #e2e8f0;
	--epb-radius: 14px;
	--epb-gap: 18px;
	--epb-cols: 3;
	--epb-duration: 1200ms;
	--epb-easing: ease-out;
	width: 100%;
	max-width: 100%;
	color: var(--epb-text);
	font-family: inherit;
	box-sizing: border-box;
}

.jx-epb *,
.jx-epb *::before,
.jx-epb *::after {
	box-sizing: border-box;
}

.jx-epb__intro {
	max-width: 720px;
	margin: 0 0 clamp(1.25rem, 3vw, 2rem);
}

.jx-epb__heading {
	margin: 0;
	color: var(--epb-text);
	font-size: clamp(1.5rem, 3vw, 2.25rem);
	line-height: 1.15;
	letter-spacing: -0.03em;
}

.jx-epb__lead {
	margin: 0.65rem 0 0;
	color: var(--epb-muted);
	font-size: clamp(0.9375rem, 1.5vw, 1.0625rem);
	line-height: 1.65;
}

.jx-epb__items {
	display: grid;
	grid-template-columns: repeat(var(--epb-cols), minmax(0, 1fr));
	gap: var(--epb-gap);
}

.jx-epb--list .jx-epb__items {
	grid-template-columns: 1fr;
}

.jx-epb__item {
	min-width: 0;
}

.jx-epb--cards .jx-epb__item,
.jx-epb--radial .jx-epb__item {
	padding: clamp(1rem, 2.4vw, 1.4rem);
	border: 1px solid var(--epb-border);
	border-radius: var(--epb-radius);
	background: var(--epb-surface);
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 30px rgba(15, 23, 42, 0.04);
	transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.jx-epb--cards .jx-epb__item:hover,
.jx-epb--radial .jx-epb__item:hover {
	transform: translateY(-2px);
	border-color: color-mix(in srgb, var(--epb-accent) 28%, var(--epb-border));
	box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
}

.jx-epb--list .jx-epb__item {
	padding: 0.25rem 0;
}

.jx-epb__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 0.65rem;
}

.jx-epb__title {
	margin: 0;
	color: var(--epb-text);
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1.35;
}

.jx-epb__description {
	margin: 0.3rem 0 0;
	color: var(--epb-muted);
	font-size: 0.8125rem;
	line-height: 1.5;
}

.jx-epb__value {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 3rem;
	min-height: 1.75rem;
	padding: 0.25rem 0.55rem;
	border-radius: 999px;
	background: color-mix(in srgb, var(--epb-accent) 10%, transparent);
	color: var(--epb-accent);
	font-size: 0.8125rem;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	line-height: 1;
}

.jx-epb__bar-row {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	min-width: 0;
}

.jx-epb__track {
	position: relative;
	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
	height: var(--epb-height, 14px);
	overflow: hidden;
	border-radius: min(var(--epb-radius), calc(var(--epb-height, 14px) / 2));
	background: var(--epb-track);
	box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
}

.jx-epb__fill {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	width: calc(var(--epb-progress, 0) * 100%);
	height: 100%;
	overflow: hidden;
	border-radius: inherit;
	background: var(--epb-color);
	will-change: width;
}

.jx-epb.is-pending .jx-epb__fill {
	width: 0;
}

.jx-epb--style-gradient .jx-epb__fill {
	background: linear-gradient(90deg, var(--epb-color), var(--epb-color-end));
}

[dir="rtl"] .jx-epb--style-gradient .jx-epb__fill {
	background: linear-gradient(270deg, var(--epb-color), var(--epb-color-end));
}

.jx-epb--style-striped .jx-epb__fill {
	background-color: var(--epb-color);
	background-image: linear-gradient(
		45deg,
		rgba(255, 255, 255, 0.16) 25%,
		transparent 25%,
		transparent 50%,
		rgba(255, 255, 255, 0.16) 50%,
		rgba(255, 255, 255, 0.16) 75%,
		transparent 75%,
		transparent
	);
	background-size: 1.2rem 1.2rem;
}

.jx-epb--style-striped.jx-epb--stripes-moving.is-complete .jx-epb__fill {
	animation: epb-stripes 900ms linear infinite;
}

.jx-epb__inside-value {
	display: block;
	padding-inline: 0.55rem;
	color: #ffffff;
	font-size: clamp(0.6875rem, 1.4vw, 0.8125rem);
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	line-height: 1;
	white-space: nowrap;
	text-shadow: 0 1px 2px rgba(15, 23, 42, 0.3);
}

.jx-epb__value--end {
	min-width: 3.2rem;
	background: transparent;
	padding-inline: 0;
}

.jx-epb--radial .jx-epb__item {
	display: grid;
	place-items: center;
	align-content: start;
	text-align: center;
}

.jx-epb__radial {
	position: relative;
	width: min(180px, 100%);
	aspect-ratio: 1;
}

.jx-epb__radial svg {
	display: block;
	width: 100%;
	height: 100%;
	transform: rotate(-90deg);
	overflow: visible;
}

.jx-epb__ring-track,
.jx-epb__ring-value {
	fill: none;
	stroke-width: 10;
}

.jx-epb__ring-track {
	stroke: var(--epb-track);
}

.jx-epb__ring-value {
	stroke: var(--epb-color);
	stroke-linecap: round;
	stroke-dasharray: 100;
	stroke-dashoffset: calc(100 - (var(--epb-progress, 0) * 100));
	filter: drop-shadow(0 5px 8px color-mix(in srgb, var(--epb-color) 24%, transparent));
}

.jx-epb.is-pending .jx-epb__ring-value {
	stroke-dashoffset: 100;
}

.jx-epb__radial-value {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	color: var(--epb-text);
	font-size: clamp(1.4rem, 4vw, 2rem);
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	letter-spacing: -0.04em;
}

.jx-epb__radial-copy {
	margin-top: 0.85rem;
}

.jx-epb--radial .jx-epb__title {
	font-size: 1rem;
}

.jx-epb--radial .jx-epb__description {
	max-width: 28ch;
}

.jx-epb__empty {
	margin: 0;
	padding: 1.25rem;
	border: 1px dashed var(--epb-border);
	border-radius: var(--epb-radius);
	background: var(--epb-surface-alt);
	color: var(--epb-muted);
	text-align: center;
}

/* Themes */
.jx-epb--theme-dark {
	--epb-surface: #0f172a;
	--epb-surface-alt: #111827;
	--epb-text: #f8fafc;
	--epb-muted: #a8b4c7;
	--epb-border: #334155;
}

.jx-epb--theme-soft {
	--epb-surface: #f8fafc;
	--epb-surface-alt: #f1f5f9;
	--epb-text: #172033;
	--epb-muted: #59667a;
	--epb-border: #e5eaf1;
}

.jx-epb--theme-brand {
	--epb-surface: color-mix(in srgb, var(--epb-accent) 6%, #ffffff);
	--epb-surface-alt: color-mix(in srgb, var(--epb-accent) 10%, #ffffff);
	--epb-text: color-mix(in srgb, var(--epb-accent) 24%, #0f172a);
	--epb-muted: color-mix(in srgb, var(--epb-accent) 14%, #586579);
	--epb-border: color-mix(in srgb, var(--epb-accent) 18%, #e2e8f0);
}

@keyframes epb-stripes {
	to {
		background-position: 1.2rem 0;
	}
}

@media (max-width: 900px) {
	.jx-epb--cards .jx-epb__items,
	.jx-epb--radial .jx-epb__items {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.jx-epb--cols-1 .jx-epb__items {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 560px) {
	.jx-epb--cards .jx-epb__items,
	.jx-epb--radial .jx-epb__items {
		grid-template-columns: 1fr;
	}

	.jx-epb__header {
		gap: 0.65rem;
	}

	.jx-epb__radial {
		width: min(160px, 72vw);
	}
}

@media (prefers-reduced-motion: reduce) {
	.jx-epb__item,
	.jx-epb__fill,
	.jx-epb__ring-value {
		transition: none !important;
		animation: none !important;
	}
}
