/* CountDown */
.slider-wrapper {
	position: relative;
}
#countdown {
	position: absolute;
	z-index: 1;
	bottom: 40px;
	left: 50%;
	transform: translateX(-50%);
	display: inline-flex;
	gap: 6px;
	align-items: center;
	font-family: Wallpoet, Arial, sans-serif;
}
.cd-unit {
	min-width: 72px;
	text-align: center;
}
.cd-label {
	font-size: 12px;
	opacity: 0.8;
	margin-top: 6px;
	color: #ffffff;
}

/* Flip card */
.cd-card {
	position: relative;
	width: 72px;
	height: 56px;
	perspective: 600px;
}
.cd-face {
	position: absolute;
	inset: 0;
	border-radius: 10px;
	display: grid;
	place-items: center;
	font-size: 24px;
	font-weight: 700;
	background: #111;
	background-color: var(--primary-color);
	color: #ffffff;
	backface-visibility: hidden;
}
@media(min-width:768px) {
	#countdown {
		bottom: 80px;
		gap: 12px;
		transform: translateX(-55%);
	}
	.cd-unit {
		min-width: 86px;
	}
	.cd-card {
		width: 86px;
		height: 64px;
	}
	.cd-face {
		font-size: 28px;
	}
}

/* Flip animation */
.cd-front { transform: rotateX(0deg); }
.cd-back	{ transform: rotateX(180deg); }

.cd-card.is-flipping .cd-front {
	animation: cdFlipFront 450ms ease-in-out forwards;
}
.cd-card.is-flipping .cd-back {
	animation: cdFlipBack 450ms ease-in-out forwards;
}

@keyframes cdFlipFront {
	0%	 { transform: rotateX(0deg); }
	100% { transform: rotateX(-180deg); }
}
@keyframes cdFlipBack {
	0%	 { transform: rotateX(180deg); }
	100% { transform: rotateX(0deg); }
}

/* Final phase (5): < warn threshold */
#countdown.is-final .cd-face {
	background: #8b0000;
}
#countdown.is-final {
	animation: cdFinalPulse 1s ease-in-out infinite;
}
@keyframes cdFinalPulse {
	0%, 100% { transform: scale(1); }
	50%			{ transform: scale(1.02); }
}
