/**
 * [af_countdown] clock. Shown/hidden by assets/js/af-countdown.js.
 *
 * Excluded from WP Rocket's Remove Unused CSS in functions.php: at render time the
 * clock is still [hidden], so its "visible" rules would otherwise be stripped.
 *
 * Sizes follow Divi's breakpoints (tablet <=980px, phone <=767px) at the same
 * ratio as the intro heading (60/50/35px): 25px / 22px / 18px.
 */

.af-countdown[hidden] {
	display: none !important;
}

/* The <p> the shortcode sits in takes no room while the clock is hidden. */
.et_pb_text p:has(> .af-countdown[hidden]) {
	display: none !important;
}

/* Block, not inline: no baseline gap in the <p>, so margins are exact. */
.af-countdown {
	display: block;
	font-family: 'Moon', 'Arial', sans-serif;
	font-size: 25px;
	font-weight: 700;
	line-height: 1.4;
	white-space: nowrap;
	color: #440099;
}

.af-countdown b {
	display: inline-block;
	min-width: 1.4em;
	text-align: center;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	color: #ee7318;
}

/* Intro ("Welkom bij ..."), white background. */
.et_pb_text p:has(> .af-countdown) {
	padding-bottom: 4px !important;
}

/* Promo row, deep purple background. */
.action-row .af-countdown {
	color: #fff;
	margin-bottom: 10px;
}

.action-row .et_pb_text p:has(> .af-countdown) {
	padding-bottom: 10px !important;
}

@media (max-width: 980px) {
	.af-countdown {
		font-size: 22px;
	}
}

@media (max-width: 767px) {
	.af-countdown {
		font-size: 18px;
	}
}

/*
 * Phones <=577px: the promo row is split 50/50 with the image, so the clock
 * matches the badge's width instead (16px). Additional CSS pins the badge with
 * position:absolute; top:0 inside the text module and reserves 20px above the
 * headline for it. While the clock is visible it takes that top spot, so the
 * badge and the reserved space move down by the clock's height + 10px margin
 * (16px x 1.4 + 10px = 32.4px; the <p> has no padding here).
 */
@media (max-width: 577px) {
	.action-row .af-countdown {
		font-size: 16px;
	}

	.action-row .et_pb_text p:has(> .af-countdown) {
		padding-bottom: 0 !important;
	}

	.action-row .et_pb_text:has(.af-countdown:not([hidden])) p > span.badge {
		top: 33px;
	}

	.action-row .et_pb_text:has(.af-countdown:not([hidden])) p:has(.badge) {
		padding-top: 53px !important;
	}
}
