/* Native WoodMart attributes own the design; this sheet owns shared behavior. */
.wd-timer.wmx-enhanced {
	max-inline-size: 100%;
	font-variant-numeric: tabular-nums;
}
.wd-timer:where(.wmx-enhanced) > span {
	min-width: 0;
	min-height: 0;
}
.wd-timer.wmx-enhanced .wmx-unit-hidden,
.wd-timer.wmx-static {
	display: none !important;
}
.wmx-countdown-aux {
	margin-block-start: 8px;
	font-size: 12px;
}
.wmx-countdown-aux[hidden],
.wmx-countdown-aux [hidden] {
	display: none !important;
}
.wmx-countdown-toggle {
	display: inline;
	min-height: 0;
	padding: 2px 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: var(--wd-primary-color);
	font: inherit;
	line-height: 1.5;
	text-decoration: underline;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
}
.wmx-countdown-toggle:hover,
.wmx-countdown-toggle:focus-visible {
	background: transparent;
	color: var(--color-gray-800);
}
.wmx-countdown-toggle:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}
.wmx-countdown-date {
	display: block;
	margin-block-end: 4px;
	color: var(--color-gray-800);
}
.wmx-countdown-message {
	margin: 0;
	color: var(--color-gray-800);
}
/* Explicit rule overrides win over per-block native styles only while active. */
.wd-timer.wmx-enhanced.wmx-color-numbers .wd-timer-value,
.wd-timer.wmx-enhanced.wmx-color-numbers > .wd-sep {
	color: var(--wmx-countdown-numbers) !important;
}
.wd-timer.wmx-enhanced.wmx-color-labels .wd-timer-text {
	color: var(--wmx-countdown-labels) !important;
}
.wd-timer.wmx-enhanced.wmx-color-background > span:not(.wd-sep) {
	background-color: var(--wmx-countdown-background) !important;
}
.wd-timer.wmx-enhanced.wmx-color-border > span:not(.wd-sep) {
	border-color: var(--wmx-countdown-border) !important;
}
.wmx-countdown-color-picker .components-color-palette__custom-color-value {
	direction: ltr;
	unicode-bidi: isolate;
}
@media (prefers-reduced-motion: reduce) {
	.wmx-enhanced *, .wmx-countdown-aux * { transition: none; animation: none; }
}

/* Flip presentation helper */
.wmx-flip-source {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(1px, 1px, 1px, 1px) !important;
	clip-path: inset(50%) !important;
	border: 0 !important;
	white-space: nowrap !important;
}

.wmx-flip {
	display: inline-flex;
	align-items: stretch;
	gap: .08em;
	direction: ltr;
	font-variant-numeric: tabular-nums;
	line-height: 1.35em;
	background-color: inherit;
	border-radius: inherit;
	border-color: inherit;
	vertical-align: middle;
}

.wmx-flip-digit {
	position: relative;
	display: inline-block;
	width: .7em;
	height: 1.35em;
	box-sizing: border-box;
	border: 1px solid;
	border-color: inherit;
	border-radius: inherit;
	background: inherit;
	box-shadow: 0 1px 1px rgba(0,0,0,.04);
	overflow: hidden;
	perspective: 400px;
	isolation: isolate;
}
.wmx-flip-digit::after {
	content: '';
	position: absolute;
	inset-inline: 0;
	top: 50%;
	height: 1px;
	background-color: currentColor;
	opacity: .15;
	z-index: 5;
	pointer-events: none;
}

.wmx-flip-half {
	position: absolute;
	left: 0;
	width: 100%;
	height: 50%;
	overflow: hidden;
	background: inherit;
	box-sizing: border-box;
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
}

.wmx-flip-top {
	top: 0;
	transform-origin: 50% 100%;
	box-shadow: inset 0 -1px rgba(0,0,0,.12);
}

.wmx-flip-bottom {
	bottom: 0;
	transform-origin: 50% 0%;
}

.wmx-flip-half > span {
	position: absolute;
	left: 0;
	width: 100%;
	height: 200%;
	line-height: 1.35em;
	text-align: center;
	display: block;
	background: inherit;
}

.wmx-flip-top > span {
	top: 0;
}

.wmx-flip-bottom > span {
	top: 0;
	transform: translateY(-50%);
}

.wmx-flip-old-upper {
	z-index: 3;
	animation: wmx-flip-old-upper 180ms linear forwards;
}

.wmx-flip-old-lower {
	z-index: 1;
}

.wmx-flip-new-lower {
	z-index: 4;
	transform: rotateX(90deg);
	animation: wmx-flip-new-lower 180ms linear 180ms forwards;
}

@keyframes wmx-flip-old-upper {
	0% { transform: rotateX(0deg); }
	100% { transform: rotateX(-90deg); }
}

@keyframes wmx-flip-new-lower {
	0% { transform: rotateX(90deg); }
	100% { transform: rotateX(0deg); }
}

@media (prefers-reduced-motion: reduce) {
	.wmx-flip-old-upper,
	.wmx-flip-old-lower,
	.wmx-flip-new-lower {
		animation: none !important;
		display: none !important;
	}
}
