/**
 * PasionGift Side Cart - Free shipping bar (premium journey).
 */

.pgsc-side-cart__free-shipping {
	flex-shrink: 0;
	padding: 0 24px 16px;
	margin-top: -4px;
	background: linear-gradient(180deg, var(--pgsc-nude, #f8f1ec) 0%, var(--pgsc-white, #ffffff) 100%);
	border-bottom: 1px solid var(--pgsc-rose-muted, #f3d9de);
}

.pgsc-side-cart__free-shipping--hidden {
	display: none;
}

.pgsc-free-shipping-bar {
	padding: 14px 16px 16px;
	border: 1px solid var(--pgsc-rose-muted, #f3d9de);
	border-radius: var(--pgsc-radius-md, 12px);
	background: linear-gradient(145deg, var(--pgsc-white, #ffffff) 0%, var(--pgsc-rose-soft, #f8e8ec) 100%);
	box-shadow: 0 8px 24px var(--pgsc-shadow-soft, rgba(42, 38, 38, 0.08));
	margin-bottom: 0;
	overflow: hidden;
}

.pgsc-free-shipping-bar--hidden {
	display: none;
	margin-bottom: 0;
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
}

.pgsc-free-shipping-bar__message {
	margin: 0 0 14px;
	font-size: 13px;
	line-height: 1.5;
	font-weight: 600;
	color: var(--pgsc-black-soft, #2a2626);
	text-align: center;
}

.pgsc-free-shipping-bar__message .woocommerce-Price-amount {
	font-weight: 700;
	color: var(--pgsc-wine, #6b2838);
}

/* Journey: truck → cherries + gift */

.pgsc-free-shipping-bar__journey {
	display: flex;
	align-items: center;
	gap: 10px;
}

.pgsc-free-shipping-bar__track {
	position: relative;
	flex: 1;
	height: 6px;
	border-radius: 999px;
	background: var(--pgsc-nude-deep, #ede3db);
	box-shadow: inset 0 1px 2px rgba(42, 38, 38, 0.06);
	overflow: visible;
}

.pgsc-free-shipping-bar__fill {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	width: 0;
	border-radius: inherit;
	overflow: hidden;
	background: linear-gradient(
		90deg,
		var(--pgsc-wine-light, #8f3d52) 0%,
		var(--pgsc-wine, #6b2838) 45%,
		var(--pgsc-rose, #e8b4bc) 100%
	);
	box-shadow: 0 0 12px rgba(107, 40, 56, 0.22);
	transition: width 0.65s var(--pgsc-ease-app, cubic-bezier(0.32, 0.72, 0, 1));
}

.pgsc-free-shipping-bar__fill::after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: linear-gradient(
		90deg,
		transparent 0%,
		rgba(255, 255, 255, 0.35) 50%,
		transparent 100%
	);
	transform: translateX(-100%);
	animation: pgsc-free-shipping-shimmer 2.4s ease-in-out infinite;
}

.pgsc-free-shipping-bar.is-animating .pgsc-free-shipping-bar__fill::after {
	animation-duration: 1.1s;
}

@keyframes pgsc-free-shipping-shimmer {
	0% {
		transform: translateX(-100%);
	}

	100% {
		transform: translateX(100%);
	}
}

.pgsc-free-shipping-bar__vehicle {
	position: absolute;
	top: 50%;
	left: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	font-size: 18px;
	line-height: 1;
	transform: translate(-35%, -50%);
	filter: drop-shadow(0 2px 4px rgba(42, 38, 38, 0.12));
	transition:
		left 0.65s var(--pgsc-ease-app, cubic-bezier(0.32, 0.72, 0, 1)),
		transform 0.65s var(--pgsc-ease-app, cubic-bezier(0.32, 0.72, 0, 1));
	will-change: left;
	z-index: 2;
}

.pgsc-free-shipping-bar.is-animating .pgsc-free-shipping-bar__vehicle {
	animation: pgsc-free-shipping-drive 0.65s var(--pgsc-ease-app, cubic-bezier(0.32, 0.72, 0, 1));
}

.pgsc-free-shipping-bar__goal {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	gap: 2px;
	padding-left: 2px;
}

.pgsc-free-shipping-bar__goal-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	font-size: 16px;
	line-height: 1;
	filter: drop-shadow(0 1px 2px rgba(42, 38, 38, 0.1));
}

.pgsc-free-shipping-bar__goal-icon--cherry {
	animation: pgsc-free-shipping-goal-pulse 2.4s ease-in-out infinite;
}

.pgsc-free-shipping-bar__goal-icon--gift {
	animation: pgsc-free-shipping-goal-pulse 2.4s ease-in-out 0.35s infinite;
}

/* Achieved celebration */

.pgsc-free-shipping-bar--achieved {
	background: linear-gradient(135deg, var(--pgsc-rose-soft, #f8e8ec) 0%, var(--pgsc-white, #ffffff) 55%, var(--pgsc-nude, #f8f1ec) 100%);
	border-color: var(--pgsc-rose, #e8b4bc);
}

.pgsc-free-shipping-bar__celebration {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 6px 8px;
	padding: 4px 0 2px;
	text-align: center;
}

.pgsc-free-shipping-bar__celebration-text {
	margin: 0;
	font-size: 14px;
	line-height: 1.45;
	font-weight: 700;
	color: var(--pgsc-wine, #6b2838);
	letter-spacing: 0.01em;
}

.pgsc-free-shipping-bar__celebration-icon {
	display: inline-flex;
	font-size: 17px;
	line-height: 1;
	filter: drop-shadow(0 1px 3px rgba(107, 40, 56, 0.15));
}

.pgsc-free-shipping-bar.is-celebrating .pgsc-free-shipping-bar__celebration-icon--spark {
	animation: pgsc-free-shipping-sparkle 1.1s ease-in-out infinite alternate;
}

.pgsc-free-shipping-bar.is-celebrating .pgsc-free-shipping-bar__celebration-icon--cherry,
.pgsc-free-shipping-bar.is-celebrating .pgsc-free-shipping-bar__celebration-icon--gift {
	animation: pgsc-free-shipping-celebrate-bounce 0.9s var(--pgsc-ease, cubic-bezier(0.4, 0, 0.2, 1)) infinite alternate;
}

.pgsc-free-shipping-bar.is-celebrating .pgsc-free-shipping-bar__celebration-text {
	animation: pgsc-free-shipping-text-glow 1.4s ease-in-out infinite alternate;
}

@keyframes pgsc-free-shipping-drive {
	0%,
	100% {
		transform: translate(-35%, -50%) rotate(0deg);
	}

	25% {
		transform: translate(-35%, -52%) rotate(-2deg);
	}

	75% {
		transform: translate(-35%, -48%) rotate(2deg);
	}
}

@keyframes pgsc-free-shipping-goal-pulse {
	0%,
	100% {
		transform: scale(1);
	}

	50% {
		transform: scale(1.08);
	}
}

@keyframes pgsc-free-shipping-sparkle {
	0% {
		opacity: 0.65;
		transform: scale(0.92) rotate(-8deg);
	}

	100% {
		opacity: 1;
		transform: scale(1.08) rotate(8deg);
	}
}

@keyframes pgsc-free-shipping-celebrate-bounce {
	0% {
		transform: translateY(0);
	}

	100% {
		transform: translateY(-3px);
	}
}

@keyframes pgsc-free-shipping-text-glow {
	0% {
		color: var(--pgsc-wine, #6b2838);
	}

	100% {
		color: var(--pgsc-wine-light, #8f3d52);
	}
}

@media (prefers-reduced-motion: reduce) {
	.pgsc-free-shipping-bar__fill,
	.pgsc-free-shipping-bar__fill::after,
	.pgsc-free-shipping-bar__vehicle {
		transition: none;
		animation: none;
	}

	.pgsc-free-shipping-bar.is-animating .pgsc-free-shipping-bar__vehicle,
	.pgsc-free-shipping-bar__goal-icon,
	.pgsc-free-shipping-bar.is-celebrating .pgsc-free-shipping-bar__celebration-icon,
	.pgsc-free-shipping-bar.is-celebrating .pgsc-free-shipping-bar__celebration-text {
		animation: none;
	}
}

@media screen and (max-width: 782px) {
	.pgsc-side-cart__free-shipping {
		padding: 0 16px 12px;
		margin-top: 0;
	}

	.pgsc-free-shipping-bar {
		padding: 12px 14px 14px;
	}

	.pgsc-free-shipping-bar__message {
		margin-bottom: 12px;
		font-size: 12px;
	}

	.pgsc-free-shipping-bar__vehicle {
		width: 26px;
		height: 26px;
		font-size: 16px;
	}

	.pgsc-free-shipping-bar__goal-icon {
		width: 22px;
		height: 22px;
		font-size: 15px;
	}

	.pgsc-free-shipping-bar__celebration-text {
		font-size: 13px;
	}
}
