.wccg-progress-wrap {
	margin: 0 0 16px;
	padding: 16px;
	border-radius: 16px;
	background: linear-gradient(135deg, #faf5ff 0%, #eff6ff 50%, #ecfdf5 100%);
	border: 1px solid rgba(99, 102, 241, 0.15);
	box-shadow: 0 8px 24px rgba(99, 102, 241, 0.08);
	overflow: visible;
	box-sizing: border-box;
}

.wccg-progress-wrap--mini {
	margin: 0 16px 12px;
	padding: 14px;
}

.wccg-progress-wrap--cart,
.wccg-progress-wrap--checkout {
	margin-bottom: 24px;
}

.wccg-progress-wrap--product {
	margin: 0 0 20px;
	width: 100%;
}

.wccg-progress {
	box-sizing: border-box;
}

.wccg-progress__next-reward {
	display: flex;
	justify-content: flex-start;
	flex: 1 1 auto;
	min-width: 0;
	max-width: 100%;
	margin: 0;
}

.wccg-progress__next-reward-text {
	display: inline-block;
	max-width: 100%;
	padding: 5px 12px;
	border-radius: 10px;
	border: 2px solid #c4b5fd;
	background: linear-gradient(180deg, #fff 0%, #f5f3ff 100%);
	box-shadow: 0 2px 10px rgba(99, 102, 241, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.9);
	font-size: 12px;
	font-weight: 700;
	color: #4338ca;
	text-align: start;
	line-height: 1.45;
	animation: wccg-banner-attention 5s ease-in-out infinite;
	box-sizing: border-box;
	white-space: nowrap;
}

.wccg-progress__next-reward--success .wccg-progress__next-reward-text {
	border-color: #6ee7b7;
	color: #047857;
	background: linear-gradient(180deg, #fff 0%, #ecfdf5 100%);
	box-shadow: 0 4px 16px rgba(16, 185, 129, 0.12);
}

.wccg-progress__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 10px;
	gap: 10px;
	flex-wrap: wrap;
}

.wccg-progress__total-wrap {
	display: inline-flex;
	align-items: center;
	justify-content: flex-end;
	gap: 6px;
	flex: 0 0 auto;
	flex-wrap: nowrap;
	max-width: 100%;
}

.wccg-progress__total-label {
	font-size: 12px;
	font-weight: 700;
	color: #6b7280;
}

.wccg-progress__total {
	font-size: 14px;
	font-weight: 700;
	color: #111827;
	background: rgba(255, 255, 255, 0.85);
	padding: 4px 10px;
	border-radius: 999px;
}

.wccg-progress__total .woocommerce-Price-amount {
	font-weight: 700;
}

.wccg-progress__track-area {
	--wccg-gutter: clamp(40px, 11%, 72px);
	position: relative;
	padding: 22px var(--wccg-gutter) 10px;
	margin-bottom: 0;
	box-sizing: border-box;
}

.wccg-progress__track {
	position: relative;
	width: 100%;
	height: 14px;
	margin: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.75);
	box-shadow: inset 0 2px 6px rgba(15, 23, 42, 0.08);
	overflow: visible;
}

.wccg-progress__fill {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	border-radius: 999px;
	background: linear-gradient(90deg, #8b5cf6, #6366f1, #06b6d4);
	box-shadow: 0 0 16px rgba(99, 102, 241, 0.45);
	transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.wccg-progress__milestones {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.wccg-milestone {
	position: absolute;
	top: 7px;
	left: 0;
	transform: translateX(-50%);
	display: flex;
	flex-direction: column;
	align-items: center;
	z-index: 2;
	width: max-content;
	max-width: none;
}

.wccg-milestone__marker {
	display: flex;
	align-items: center;
	justify-content: center;
	transform: translateY(-50%);
}

.wccg-milestone__gift {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	height: 34px;
	padding: 0 4px;
	border-radius: 8px;
	background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%);
	border: 2px solid #f59e0b;
	font-size: 18px;
	line-height: 1;
	box-shadow: 0 4px 12px rgba(245, 158, 11, 0.22);
	animation: wccg-icon-attention 5s ease-in-out infinite;
}

.wccg-milestone__gift-icon {
	display: block;
	line-height: 1;
}

.wccg-milestone__gift-num {
	display: none;
}

.wccg-milestone.is-unlocked .wccg-milestone__gift {
	border-color: #10b981;
	background: linear-gradient(180deg, #ecfdf5 0%, #d1fae5 100%);
	box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12), 0 6px 16px rgba(16, 185, 129, 0.22);
}

.wccg-milestone__below {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	gap: 1px;
	margin-top: 2px;
	width: max-content;
	text-align: center;
}

.wccg-milestone__amount {
	display: block;
	font-size: 11.5px;
	font-weight: 700;
	color: #4338ca;
	white-space: nowrap;
	background: rgba(255, 255, 255, 0.95);
	padding: 2px 9px;
	border-radius: 999px;
	border: 1px solid rgba(99, 102, 241, 0.15);
}

.wccg-milestone__label {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 3px;
	max-width: none;
	font-size: 11.5px;
	font-weight: 700;
	color: #374151;
	line-height: 1.3;
	white-space: nowrap;
	background: rgba(255, 255, 255, 0.92);
	padding: 3px 9px;
	border-radius: 8px;
	border: 1px solid rgba(99, 102, 241, 0.1);
}

.wccg-milestone__label-icon {
	font-size: 12.5px;
	line-height: 1;
	flex-shrink: 0;
}

.wccg-milestone__label-text {
	overflow: visible;
	text-overflow: unset;
	white-space: nowrap;
}

/* 3+ rewards on one milestone: allow wrap. Up to 2 stay on a single line. */
.wccg-milestone__label-text--combined {
	white-space: normal;
	text-align: center;
	max-width: 160px;
}

.wccg-milestone__label-text--inline {
	white-space: nowrap;
	max-width: none;
}

.wccg-progress__labels-space {
	height: 58px;
}

/* Compact reward list: mobile + ajax mini-cart only */
.wccg-progress__reward-list {
	display: none;
	list-style: none;
	margin: 10px 0 0;
	padding: 0;
	flex-direction: column;
	gap: 8px;
}

.wccg-reward-row {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 8px 10px;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.88);
	border: 1px solid rgba(99, 102, 241, 0.12);
}

.wccg-reward-row.is-unlocked {
	border-color: rgba(16, 185, 129, 0.35);
	background: linear-gradient(180deg, #fff 0%, #ecfdf5 100%);
}

.wccg-reward-row__badge {
	position: relative;
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%);
	border: 2px solid #f59e0b;
	box-shadow: 0 3px 10px rgba(245, 158, 11, 0.2);
}

.wccg-reward-row.is-unlocked .wccg-reward-row__badge {
	border-color: #10b981;
	background: linear-gradient(180deg, #ecfdf5 0%, #d1fae5 100%);
}

.wccg-reward-row__gift {
	font-size: 18px;
	line-height: 1;
	opacity: 0.35;
	filter: blur(1.2px);
	transform: scale(1.15);
}

.wccg-reward-row__num {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.55);
	font-size: 14px;
	font-weight: 900;
	color: #7c2d12;
	text-shadow: none;
	line-height: 1;
}

.wccg-reward-row.is-unlocked .wccg-reward-row__num {
	background: rgba(255, 255, 255, 0.55);
	color: #065f46;
}

.wccg-reward-row__body {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
	flex: 1 1 auto;
}

.wccg-reward-row__amount {
	font-size: 11px;
	font-weight: 700;
	color: #4338ca;
}

.wccg-reward-row__label {
	font-size: 12px;
	font-weight: 700;
	color: #374151;
	line-height: 1.45;
	white-space: normal;
}

.wccg-celebration-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(15, 23, 42, 0.6);
	backdrop-filter: blur(6px);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.wccg-celebration-overlay.is-visible {
	opacity: 1;
	visibility: visible;
}

.wccg-celebration {
	position: relative;
	width: min(420px, 100%);
	padding: 32px 28px 24px;
	border-radius: 20px;
	text-align: center;
	background: linear-gradient(180deg, #fff 0%, #faf5ff 100%);
	box-shadow: 0 30px 80px rgba(79, 70, 229, 0.25);
	transform: scale(0.9) translateY(20px);
	transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
	overflow: hidden;
}

.wccg-celebration-overlay.is-visible .wccg-celebration {
	transform: scale(1) translateY(0);
}

.wccg-celebration__confetti {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background:
		radial-gradient(circle at 20% 20%, rgba(139, 92, 246, 0.15) 0 8px, transparent 9px),
		radial-gradient(circle at 80% 30%, rgba(6, 182, 212, 0.15) 0 6px, transparent 7px),
		radial-gradient(circle at 40% 80%, rgba(16, 185, 129, 0.15) 0 7px, transparent 8px);
	animation: wccg-confetti 2s ease infinite;
}

.wccg-celebration__close {
	position: absolute;
	top: 10px;
	left: 10px;
	right: auto;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 1px solid #fca5a5;
	border-radius: 50%;
	background: #fee2e2;
	color: #dc2626;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.wccg-celebration__close:hover {
	background: #fecaca;
	border-color: #f87171;
	color: #b91c1c;
}

.wccg-celebration__emoji {
	font-size: 56px;
	margin-bottom: 12px;
	animation: wccg-bounce 1s ease infinite;
}

.wccg-celebration__title {
	margin: 0 0 8px;
	font-size: 22px;
	font-weight: 800;
	color: #312e81;
}

.wccg-celebration__message {
	margin: 0 0 16px;
	color: #4b5563;
	font-size: 14px;
}

.wccg-celebration__reward {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	border-radius: 999px;
	background: linear-gradient(135deg, #ede9fe, #dbeafe);
	color: #4338ca;
	font-weight: 800;
	font-size: 15px;
}

.wccg-celebration__timer {
	margin-top: 16px;
	font-size: 12px;
	color: #9ca3af;
}

.wccg-celebration-overlay--next .wccg-celebration__title {
	font-size: 18px;
	line-height: 1.7;
}

.wccg-celebration-overlay--next .wccg-celebration__emoji {
	font-size: 46px;
}

@keyframes wccg-banner-attention {
	0%, 85%, 100% {
		border-color: #c4b5fd;
		box-shadow: 0 2px 10px rgba(99, 102, 241, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.9);
	}
	88%, 96% {
		border-color: #8b5cf6;
		box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.22), 0 4px 14px rgba(99, 102, 241, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.9);
	}
	92% {
		border-color: #a78bfa;
		box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.16), 0 3px 12px rgba(99, 102, 241, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.9);
	}
}

@keyframes wccg-icon-attention {
	0%, 88%, 100% {
		transform: rotate(0deg) scale(1);
	}
	90% {
		transform: rotate(-8deg) scale(1.08);
	}
	92% {
		transform: rotate(8deg) scale(1.08);
	}
	94% {
		transform: rotate(-5deg) scale(1.04);
	}
	96% {
		transform: rotate(5deg) scale(1.04);
	}
}

@keyframes wccg-bounce {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-6px); }
}

@keyframes wccg-confetti {
	0%, 100% { opacity: 0.6; transform: translateY(0); }
	50% { opacity: 1; transform: translateY(-4px); }
}

/* Ajax mini-cart: numbered gifts + vertical reward list (all viewports) */
.wccg-progress-wrap--mini .wccg-milestone__below {
	display: none;
}

.wccg-progress-wrap--mini .wccg-progress__labels-space {
	height: 8px;
}

.wccg-progress-wrap--mini .wccg-progress__reward-list {
	display: flex;
}

.wccg-progress-wrap--mini .wccg-milestone__gift {
	width: 36px;
	min-width: 36px;
	height: 36px;
	padding: 0;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 3px 10px rgba(245, 158, 11, 0.2);
	animation: none;
}

.wccg-progress-wrap--mini .wccg-milestone.is-unlocked .wccg-milestone__gift {
	box-shadow: 0 3px 10px rgba(16, 185, 129, 0.2);
}

.wccg-progress-wrap--mini .wccg-milestone__gift-icon {
	font-size: 18px;
	line-height: 1;
	opacity: 0.35;
	filter: blur(1.2px);
	transform: scale(1.15);
}

.wccg-progress-wrap--mini .wccg-milestone__gift-num {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.55);
	font-size: 14px;
	font-weight: 900;
	color: #7c2d12;
	text-shadow: none;
	line-height: 1;
}

.wccg-progress-wrap--mini .wccg-milestone.is-unlocked .wccg-milestone__gift-num {
	background: rgba(255, 255, 255, 0.55);
	color: #065f46;
}

.wccg-progress-wrap--mini .wccg-progress__track-area {
	padding-inline: 10px;
	padding-bottom: 4px;
}

@media (max-width: 768px) {
	.wccg-progress__header {
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
	}

	.wccg-progress__next-reward {
		justify-content: flex-start;
	}

	.wccg-progress__next-reward-text {
		font-size: 11px;
		padding: 4px 10px;
		white-space: normal;
	}

	.wccg-progress__total-wrap {
		justify-content: flex-start;
	}

	.wccg-progress__track-area {
		padding-inline: 8px;
		padding-bottom: 4px;
	}

	.wccg-milestone__below {
		display: none;
	}

	.wccg-progress__labels-space {
		height: 8px;
	}

	.wccg-milestone__gift {
		width: 36px;
		min-width: 36px;
		height: 36px;
		padding: 0;
		border-radius: 10px;
		overflow: hidden;
		box-shadow: 0 3px 10px rgba(245, 158, 11, 0.2);
		animation: none;
	}

	.wccg-milestone.is-unlocked .wccg-milestone__gift {
		box-shadow: 0 3px 10px rgba(16, 185, 129, 0.2);
	}

	.wccg-milestone__gift-num {
		position: absolute;
		inset: 0;
		display: flex;
		align-items: center;
		justify-content: center;
		z-index: 1;
		border-radius: 8px;
		background: rgba(255, 255, 255, 0.55);
		font-size: 14px;
		font-weight: 900;
		color: #7c2d12;
		text-shadow: none;
		line-height: 1;
	}

	.wccg-milestone.is-unlocked .wccg-milestone__gift-num {
		background: rgba(255, 255, 255, 0.55);
		color: #065f46;
	}

	.wccg-milestone__gift-icon {
		font-size: 18px;
		line-height: 1;
		opacity: 0.35;
		filter: blur(1.2px);
		transform: scale(1.15);
	}

	.wccg-progress__reward-list {
		display: flex;
	}

	.wccg-progress-wrap--mini {
		margin-inline: 12px;
	}
}
