/* ==========================================================================
   Awesome Progress Bar Widget (Global Token Edition v2.5.0)
   ========================================================================== */

.awea-progress-wrapper {
	--awea-pb-primary: var(--e-global-color-primary);
	--awea-pb-secondary: var(--e-global-color-secondary);
	--awea-pb-text: var(--e-global-color-text);
	--awea-pb-accent: var(--e-global-color-accent);
	--awea-pb-track: color-mix(in srgb, currentColor 12%, transparent);

	width: 100%;
	position: relative;
	box-sizing: border-box;
}

.awea-progress-wrapper *,
.awea-progress-wrapper *::before,
.awea-progress-wrapper *::after {
	box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   1. Circular Ring Style
   -------------------------------------------------------------------------- */
.awea-style-circle {
	display: flex;
	justify-content: center;
	align-items: center;
}

.awea-radial-container {
	position: relative;
	width: 200px;
	max-width: 100%;
	aspect-ratio: 1 / 1;
	display: flex;
	justify-content: center;
	align-items: center;
	box-sizing: border-box;
}

.awea-progress-svg {
	transform: rotate(-90deg);
	width: 100%;
	height: 100%;
	display: block;
}

.awea-progress-svg circle {
	fill: none;
	stroke-linecap: round;
}

.awea-progress-track {
	stroke: var(--awea-pb-track);
	stroke-width: 8px;
}

.awea-progress-circle-fill {
	stroke: var(--awea-pb-accent);
	stroke-width: 8px;
	stroke-dasharray: 263.89;
	stroke-dashoffset: 263.89;
	transition: stroke 0.3s ease;
}

.awea-radial-content {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 18px;
	gap: 6px;
	box-sizing: border-box;
	pointer-events: none;
}

/* --------------------------------------------------------------------------
   2. Horizontal Bar Style
   -------------------------------------------------------------------------- */
.awea-style-line {
	width: 100%;
	box-sizing: border-box;
}

.awea-linear-container {
	width: 100%;
	box-sizing: border-box;
}

.awea-linear-meta {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin-bottom: 10px;
	gap: 12px;
	box-sizing: border-box;
}

.awea-line-track {
	width: 100%;
	height: 10px;
	background-color: var(--awea-pb-track);
	border-radius: 100px;
	overflow: hidden;
	position: relative;
	box-sizing: border-box;
}

.awea-line-fill {
	position: relative;
	overflow: hidden;
	height: 100%;
	width: 0%;
	background-color: var(--awea-pb-accent);
	border-radius: 100px;
	transition: background-color 0.3s ease;
	will-change: width;
}

.awea-pb-shimmer-yes .awea-line-fill::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		90deg,
		transparent 0%,
		color-mix(in srgb, var(--e-global-color-background, #ffffff) 32%, transparent) 50%,
		transparent 100%
	);
	animation: aweaPbShimmer 2.4s infinite ease-in-out;
}

@keyframes aweaPbShimmer {
	0% {
		transform: translateX(-100%);
	}
	100% {
		transform: translateX(100%);
	}
}

/* --------------------------------------------------------------------------
   3. Typography Defaults
   -------------------------------------------------------------------------- */
.awea-progress-percent {
	line-height: 1;
	color: var(--awea-pb-primary);
	font-variant-numeric: tabular-nums;
	display: inline-block;
	white-space: nowrap;
}

.awea-style-line .awea-progress-percent {
	line-height: 1.2;
}

.awea-progress-label {
	color: var(--awea-pb-secondary);
	line-height: 1.35;
	word-break: break-word;
}

/* --------------------------------------------------------------------------
   4. Accessibility & Mobile
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	.awea-pb-shimmer-yes .awea-line-fill::after {
		animation: none !important;
	}
}

@media (max-width: 767px) {
	.awea-radial-container {
		width: min(200px, 80vw);
		aspect-ratio: 1 / 1;
	}

	.awea-radial-content {
		padding: 12px;
	}
}