/**
 * Anzemah Count Down Timer - front end styles.
 *
 * Each design is a variation on one shared unit structure:
 *
 *   .anzcdt-timer-wrap            outer wrapper, carries the design class
 *     .anzcdt-clock                 the row of units
 *       .anzcdt-unit                  one unit (days / hours / minutes / seconds)
 *         .anzcdt-unit-inr              the visible face
 *           .anzcdt-digit-wrap            digit stack (front / back for flips)
 *           .anzcdt-bar                   progress bar, used by the bar design
 *         .anzcdt-label                 the unit caption
 *
 * Per-timer colours arrive as the --anzcdt-accent and --anzcdt-track custom
 * properties, written by anzcdt_generate_style().
 */

/* ---------------------------------------------------------------- Base --- */

.anzcdt-wrap,
.anzcdt-wrap * {
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
	outline: none;
}

.anzcdt-clearfix:before,
.anzcdt-clearfix:after {
	content: "";
	display: table;
}

.anzcdt-clearfix::after {
	clear: both;
}

.anzcdt-timer-wrap {
	position: relative;
	text-align: center;
	margin: 0 auto 15px auto;
	z-index: 1;

	--anzcdt-accent: #36b0e3;
	--anzcdt-track: #313332;
}

.anzcdt-timer-wrap .anzcdt-title {
	margin: 0 0 12px 0;
	line-height: 1.3;
}

.anzcdt-timer-wrap .anzcdt-content {
	margin: 0 0 12px 0;
}

.anzcdt-timer-wrap .anzcdt-content:last-child {
	margin: 12px 0 0 0;
}

.anzcdt-clock {
	width: 100%;
	margin: 0 auto;
	line-height: normal;
}

.anzcdt-completion {
	width: 100%;
}

/* -------------------------------------------------- Circle designs (JS) --- */

.time_circles {
	position: relative;
	width: 100%;
	height: 100%;
}

.time_circles > div {
	position: absolute;
	text-align: center;
}

.time_circles > div > h4 {
	margin: 0;
	padding: 0;
	text-align: center;
	text-transform: uppercase;
}

.time_circles > div > span {
	display: block;
	width: 100%;
	text-align: center;
	font-size: 300%;
	margin-top: 0.4em;
	font-weight: bold;
}

/* Circle Style 2 - lighter, wider spaced labels. */
.anzcdt-timer-design-3 .time_circles > div > h4 {
	letter-spacing: 2px;
	font-size: 90%;
	opacity: 0.75;
}

.anzcdt-timer-design-3 .time_circles > div > span {
	font-size: 260%;
	font-weight: 400;
}

/* Circle Style 3 - heavier ring, condensed numerals. */
.anzcdt-timer-design-1 .time_circles > div > h4 {
	text-transform: uppercase;
	font-size: 80%;
	font-weight: 700;
	letter-spacing: 1px;
}

.anzcdt-timer-design-1 .time_circles > div > span {
	font-size: 230%;
	font-weight: 800;
}

/* ------------------------------------------------- Digit designs (base) --- */

.anzcdt-clock-digits {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: stretch;
	gap: 12px;
}

.anzcdt-clock-digits .anzcdt-unit {
	flex: 0 1 auto;
	min-width: 74px;
	text-align: center;
}

.anzcdt-clock-digits .anzcdt-unit-inr {
	position: relative;
	display: block;
}

.anzcdt-clock-digits .anzcdt-digit-wrap {
	position: relative;
	display: block;
}

.anzcdt-clock-digits .anzcdt-digit {
	display: block;
	font-weight: 700;
	font-size: 40px;
	line-height: 1.2;
	font-variant-numeric: tabular-nums;
	font-feature-settings: "tnum";
}

/* The back face only exists for the flip designs. */
.anzcdt-clock-digits .anzcdt-digit-back {
	display: none;
}

.anzcdt-clock-digits .anzcdt-label {
	display: block;
	margin-top: 6px;
	font-size: 13px;
	line-height: 1.3;
	text-transform: uppercase;
	letter-spacing: 1px;
}

/* The progress bar is opt-in per design. */
.anzcdt-clock-digits .anzcdt-bar {
	display: none;
	width: 100%;
	height: 6px;
	margin-top: 8px;
	border-radius: 4px;
	background-color: var(--anzcdt-track);
	overflow: hidden;
}

.anzcdt-clock-digits .anzcdt-bar-fill {
	display: block;
	height: 100%;
	width: 100%;
	border-radius: 4px;
	background-color: var(--anzcdt-accent);
	transition: width 0.4s linear;
}

/* --------------------------------------------- Simple Clock 1 (design-6) --- */
/* Solid accent tiles. */

.anzcdt-timer-design-6 .anzcdt-unit-inr {
	padding: 18px 14px;
	border-radius: 6px;
	background-color: var(--anzcdt-accent);
}

.anzcdt-timer-design-6 .anzcdt-digit {
	color: #fff;
}

.anzcdt-timer-design-6 .anzcdt-label {
	font-weight: 600;
}

/* --------------------------------------------- Simple Clock 2 (design-7) --- */
/* Outlined tiles with an accent border. */

.anzcdt-timer-design-7 .anzcdt-unit-inr {
	padding: 16px 14px;
	border: 2px solid var(--anzcdt-accent);
	border-radius: 6px;
	background-color: transparent;
}

.anzcdt-timer-design-7 .anzcdt-digit {
	color: var(--anzcdt-accent);
}

/* -------------------------------------------- Simple Clock 3 (design-12) --- */
/* Minimal: no chrome, a colon between units. */

.anzcdt-timer-design-12 .anzcdt-clock-digits {
	gap: 4px;
	align-items: center;
}

.anzcdt-timer-design-12 .anzcdt-unit {
	position: relative;
	padding: 0 14px;
	min-width: 66px;
}

.anzcdt-timer-design-12 .anzcdt-unit + .anzcdt-unit::before {
	content: ":";
	position: absolute;
	left: -6px;
	top: 0;
	font-size: 36px;
	font-weight: 300;
	line-height: 1.3;
	opacity: 0.35;
}

.anzcdt-timer-design-12 .anzcdt-digit {
	font-weight: 300;
	font-size: 44px;
}

.anzcdt-timer-design-12 .anzcdt-label {
	font-size: 11px;
	opacity: 0.7;
}

/* --------------------------------------------- Simple Clock 4 (design-5) --- */
/* Rounded cards with a top accent rule. */

.anzcdt-timer-design-5 .anzcdt-unit-inr {
	padding: 20px 16px 16px 16px;
	border-radius: 10px;
	background-color: rgba(0, 0, 0, 0.04);
	border-top: 4px solid var(--anzcdt-accent);
}

.anzcdt-timer-design-5 .anzcdt-label {
	font-weight: 600;
	letter-spacing: 2px;
}

/* --------------------------------------- Horizontal Flip Clock (design-8) --- */

.anzcdt-timer-design-8 .anzcdt-unit-inr,
.anzcdt-timer-design-2 .anzcdt-unit-inr {
	position: relative;
	padding: 18px 16px;
	border-radius: 8px;
	background-color: var(--anzcdt-track);
	box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.25);
	overflow: hidden;
}

.anzcdt-timer-design-8 .anzcdt-digit,
.anzcdt-timer-design-2 .anzcdt-digit {
	color: #fff;
}

/* A hairline across the middle sells the split-flap look. */
.anzcdt-timer-design-8 .anzcdt-unit-inr::after,
.anzcdt-timer-design-2 .anzcdt-unit-inr::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 50%;
	height: 1px;
	background-color: rgba(0, 0, 0, 0.35);
}

.anzcdt-timer-design-8 .anzcdt-label,
.anzcdt-timer-design-2 .anzcdt-label {
	font-weight: 600;
}

/* Horizontal: the card turns on its vertical axis. */
.anzcdt-timer-design-8.anzcdt-timer-wrap .anzcdt-unit-inr {
	transform-origin: center;
	backface-visibility: hidden;
}

.anzcdt-timer-design-8 .anzcdt-unit.anzcdt-flipping .anzcdt-unit-inr {
	animation: anzcdt-flip-horizontal 0.45s ease-in-out;
}

@keyframes anzcdt-flip-horizontal {
	0%   { transform: rotateY(0deg); }
	50%  { transform: rotateY(-90deg); }
	100% { transform: rotateY(0deg); }
}

/* ----------------------------------------- Vertical Flip Clock (design-2) --- */

.anzcdt-timer-design-2 .anzcdt-unit.anzcdt-flipping .anzcdt-unit-inr {
	animation: anzcdt-flip-vertical 0.45s ease-in-out;
}

@keyframes anzcdt-flip-vertical {
	0%   { transform: rotateX(0deg); }
	50%  { transform: rotateX(-90deg); }
	100% { transform: rotateX(0deg); }
}

/* Respect a reduced-motion preference: keep the numbers, drop the animation. */
@media (prefers-reduced-motion: reduce) {

	.anzcdt-timer-design-8 .anzcdt-unit.anzcdt-flipping .anzcdt-unit-inr,
	.anzcdt-timer-design-2 .anzcdt-unit.anzcdt-flipping .anzcdt-unit-inr {
		animation: none;
	}

	.anzcdt-clock-digits .anzcdt-bar-fill {
		transition: none;
	}
}

/* ------------------------------------------------ Modern Clock (design-9) --- */
/* Accent gradient panel with oversized numerals. */

.anzcdt-timer-design-9 .anzcdt-clock-digits {
	gap: 16px;
}

.anzcdt-timer-design-9 .anzcdt-unit-inr {
	padding: 22px 18px;
	border-radius: 14px;
	background-image: linear-gradient(160deg, var(--anzcdt-accent) 0%, rgba(0, 0, 0, 0.35) 180%);
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

.anzcdt-timer-design-9 .anzcdt-digit {
	color: #fff;
	font-size: 46px;
	font-weight: 800;
	letter-spacing: -1px;
}

.anzcdt-timer-design-9 .anzcdt-label {
	margin-top: 10px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 2px;
}

/* ----------------------------------------------- Shadow Clock (design-11) --- */
/* Soft raised tiles with an accent digit. */

.anzcdt-timer-design-11 .anzcdt-clock-digits {
	gap: 18px;
}

.anzcdt-timer-design-11 .anzcdt-unit-inr {
	padding: 22px 18px;
	border-radius: 16px;
	background-color: rgba(255, 255, 255, 0.9);
	box-shadow: 8px 8px 18px rgba(0, 0, 0, 0.12), -8px -8px 18px rgba(255, 255, 255, 0.9);
}

.anzcdt-timer-design-11 .anzcdt-digit {
	color: var(--anzcdt-accent);
	font-size: 42px;
}

.anzcdt-timer-design-11 .anzcdt-label {
	margin-top: 10px;
	opacity: 0.65;
}

/* -------------------------------------------------- Bars Clock (design-4) --- */
/* Each unit shows its progress through the current cycle. */

.anzcdt-timer-design-4 .anzcdt-clock-digits {
	display: block;
	max-width: 560px;
}

.anzcdt-timer-design-4 .anzcdt-unit {
	display: flex;
	align-items: center;
	gap: 14px;
	width: 100%;
	margin-bottom: 12px;
	text-align: left;
}

.anzcdt-timer-design-4 .anzcdt-unit-inr {
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	gap: 14px;
	order: 2;
}

.anzcdt-timer-design-4 .anzcdt-digit-wrap {
	flex: 0 0 auto;
	min-width: 56px;
}

.anzcdt-timer-design-4 .anzcdt-digit {
	font-size: 28px;
	color: var(--anzcdt-accent);
}

.anzcdt-timer-design-4 .anzcdt-bar {
	display: block;
	flex: 1 1 auto;
	margin-top: 0;
	height: 10px;
}

.anzcdt-timer-design-4 .anzcdt-label {
	order: 1;
	flex: 0 0 90px;
	margin-top: 0;
	text-align: right;
	font-size: 12px;
}

/* The days bar has no fixed maximum, so it stays full rather than misleading. */
.anzcdt-timer-design-4 .anzcdt-unit-days .anzcdt-bar-fill {
	width: 100%;
}

/* ------------------------------------------------------ Builder preview --- */

.anzcdt-builder-shrt-prev {
	padding: 15px;
	border: 1px dashed #b4b9be;
	background-color: #f6f7f7;
	text-align: center;
	color: #50575e;
}

.anzcdt-builder-shrt-title {
	margin-bottom: 6px;
	font-weight: 600;
}

/* ------------------------------------------------------------ Responsive --- */

@media screen and (max-width: 600px) {

	.anzcdt-clock-digits {
		gap: 8px;
	}

	.anzcdt-clock-digits .anzcdt-unit {
		min-width: 62px;
	}

	.anzcdt-clock-digits .anzcdt-digit {
		font-size: 30px;
	}

	.anzcdt-timer-design-9 .anzcdt-digit,
	.anzcdt-timer-design-11 .anzcdt-digit,
	.anzcdt-timer-design-12 .anzcdt-digit {
		font-size: 32px;
	}

	.anzcdt-clock-digits .anzcdt-label {
		font-size: 11px;
		letter-spacing: 0.5px;
	}

	.anzcdt-timer-design-4 .anzcdt-label {
		flex-basis: 64px;
	}
}
