/*
 * Countdown Timer widget (product page, and pro's shop loop with the same
 * classes). Design settings arrive as `--spsg-countdown-timer-*` variables
 * (ADR-005); each fallback is the setting's default, so a site that never
 * saved one renders the default. Type and box sizes are in em of the root's
 * font-size, so the shop loop and the admin preview scale them with one
 * value; the px settings (radius, spacing, line height) stay as set.
 * Fonts load through StorefrontFonts, not from here.
 */

.spsg-countdown-timer {
	box-sizing: border-box;
	max-width: 100%;
	margin: var(--spsg-countdown-timer-margin, 0 0 25px);
	padding: var(--spsg-countdown-timer-padding, 10px);
	border: 1px solid var(--spsg-countdown-timer-border, #1677ff);
	border-radius: var(--spsg-countdown-timer-radius, 10px);
	background: var(--spsg-countdown-timer-bg, #fff);
	font-size: 16px;
	line-height: 1.2;
}

.spsg-countdown-timer-wrapper {
	display: flex;
	flex-direction: column;
	align-items: var(--spsg-countdown-timer-align, flex-start);
	gap: 1.25em;
}

.spsg-countdown-timer-heading {
	max-width: 100%;
	margin: 0;
	color: var(--spsg-countdown-timer-heading-color, #008dff);
	font-family: var(--spsg-countdown-timer-heading-font, "Roboto", sans-serif);
	font-size: 1.5em;
	font-weight: var(--spsg-countdown-timer-heading-weight, 500);
	letter-spacing: var(--spsg-countdown-timer-heading-tracking, 0);
	line-height: var(--spsg-countdown-timer-heading-leading, 24px);
	text-align: var(--spsg-countdown-timer-text-align, left);
}

.spsg-countdown-timer-items {
	display: flex;
	align-self: var(--spsg-countdown-timer-counter-align, flex-start);
	align-items: center;
	gap: 0.375em;
	margin: var(--spsg-countdown-timer-counter-margin, 0);
}

.spsg-countdown-timer-item {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.25em;
	min-width: 4em;
	padding: var(--spsg-countdown-timer-counter-padding, 6px);
	border: 1px solid var(--spsg-countdown-timer-counter-border, #ecedf0);
	border-radius: var(--spsg-countdown-timer-counter-radius, 6px);
	background: var(--spsg-countdown-timer-counter-bg, #fff);
	color: var(--spsg-countdown-timer-label-color, #64748b);
	font-family: var(--spsg-countdown-timer-counter-font, "Roboto", sans-serif);
	font-weight: var(--spsg-countdown-timer-counter-weight, 500);
	letter-spacing: var(--spsg-countdown-timer-counter-tracking, 0);
	text-align: center;
	text-transform: uppercase;
}

/* Digits; without the variable (pro's shop template) they take the box's colour. */
.spsg-countdown-timer-item strong {
	display: block;
	color: var(--spsg-countdown-timer-digit-color, inherit);
	font-size: 1.5em;
	font-weight: inherit;
	line-height: 1.2;
}

.spsg-countdown-timer-item span {
	font-size: 0.625em;
	line-height: 1.2;
}

.spsg-colon {
	flex: 0 0 auto;
	color: var(--spsg-countdown-timer-separator-color, #1e293b);
	font-size: 1.5em;
	font-weight: 600;
	line-height: 1;
}

/* Shop loop and narrow screens: the same widget, smaller. */
.products .spsg-countdown-timer,
.products-block-post-template .spsg-countdown-timer {
	font-size: 11px;
}

@media (max-width: 430px) {
	.spsg-countdown-timer {
		font-size: 12px;
	}
}

/* The second old layout (`ct-layout-2`): gradient strip behind the boxes. */
.spsg-countdown-timer.ct-layout-2 {
	background: linear-gradient(180deg, aliceblue 70%, #fff 0%) !important;
}

.spsg-countdown-timer-items.ct-layout-2 {
	align-self: center;
	width: fit-content;
	border-radius: 6px;
	color: #fff;
	background: linear-gradient(90deg, #32dbbe 0%, #008dff 100%);
	box-shadow: 0 12px 48px 0 rgba(27, 27, 80, 0.1);
}

.spsg-countdown-timer-heading.ct-layout-2 {
	-webkit-background-clip: text;
}

/* Its gradient heading (a transparent heading colour); kept when pro's box
   colours drop the `ct-layout-2` class. */
.spsg-countdown-timer-heading.default {
	background: linear-gradient(90deg, #32dbbe 0%, #008dff 100%) text;
	-webkit-text-fill-color: transparent;
}
