/**
 * Countdown (Dioendang) widget — frontend styles.
 *
 * Layout only lives here (flex boxes with a gap-driven separator);
 * colors, typography, backgrounds, borders and spacing are all wired
 * to the Elementor Style panel. The box gap doubles as a CSS custom
 * property (--di-countdown-gap) so the ":" separator can center itself
 * inside the gap.
 *
 * The defaults below deliberately reproduce what BOTH legacy countdown
 * widgets the templates were authored with rendered without any style
 * setting: equal-width boxes that fill the row (the old table-layout:fixed
 * cells / Pro's flex-grow items), 20px vertical box padding, white text,
 * and an optional centered max-width row (Pro's "Container Width"). A
 * template that never set padding or colors looked like that on the old
 * site, and must look like that here.
 *
 * Neither old widget wrapped the row or shrank a box below its content: a
 * padded box in a narrow Container Width pushed past it instead. So the row
 * never wraps and a box keeps its content width (no `min-width: 0`); either
 * one put four boxes on two lines or cut their text off.
 */

.di-countdown-items {
	display: flex;
	flex-wrap: nowrap;
	justify-content: center;
	gap: var(--di-countdown-gap, 30px);
	margin: 0 auto;
	padding: 0;
	list-style: none;
}

/* `hidden` must beat the display:flex above (expiry "message" mode). */
.di-countdown-items[hidden] {
	display: none;
}

.di-countdown-item {
	position: relative;
	flex: 1 1 0;
	text-align: center;
}

.di-countdown-box {
	padding: 20px 0;
	color: #fff;
}

.di-countdown-digits {
	display: block;
	font-size: 50px;
	line-height: 1;
}

.di-countdown-label {
	display: block;
	font-size: 18px;
	line-height: 1;
}

/* Inline label mode: label sits beside the digits. */
.di-countdown-label-inline .di-countdown-digits,
.di-countdown-label-inline .di-countdown-label {
	display: inline-block;
	vertical-align: baseline;
}

/* ":" separator, centered in the gap between boxes. */
.di-countdown-show-separator .di-countdown-item:not(:last-child)::after {
	content: ":";
	position: absolute;
	top: 50%;
	left: calc(100% + var(--di-countdown-gap, 30px) / 2);
	transform: translate(-50%, -50%);
	font-size: 50px;
	line-height: 1;
}

.di-countdown-expired {
	text-align: center;
}

.di-countdown-expired[hidden] {
	display: none;
}

.di-countdown-hidden {
	display: none;
}
