.ctb-bar {
	position: relative;
	width: 100%;
	box-sizing: border-box;
	z-index: 99990;
	padding: var(--ctb-py, 10px) 16px;
	color: var(--ctb-text, #fff);
	font-family: var(--ctb-font, inherit);
	font-size: var(--ctb-fs, 16px);
	font-weight: var(--ctb-weight, 600);
	line-height: 1.4;
}

.ctb-bar *,
.ctb-bar *::before,
.ctb-bar *::after {
	box-sizing: border-box;
}

.ctb-bar.ctb-sticky {
	position: sticky;
	top: 0;
}

body.admin-bar .ctb-bar.ctb-sticky {
	top: 32px;
}

@media (max-width: 782px) {
	body.admin-bar .ctb-bar.ctb-sticky {
		top: 46px;
	}
}

.ctb-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: var(--ctb-justify, center);
	gap: 10px 20px;
	max-width: 1200px;
	margin: 0 auto;
	padding-right: 24px; /* room for the close button */
	padding-left: 24px;
}

/* Desktop / mobile text variants */
.ctb-m {
	display: none;
}

.ctb-text {
	text-align: var(--ctb-align, center);
	color: var(--ctb-text, #fff);
}

.ctb-text a,
.ctb-text a:visited {
	color: inherit;
	font: inherit;
	text-decoration: underline;
}

.ctb-text a:hover {
	text-decoration: none;
}

/* Countdown */
.ctb-countdown {
	display: flex;
	gap: 6px;
	color: var(--ctb-cd-color, #fff);
}

.ctb-unit {
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 48px;
	padding: 4px 6px;
	border-radius: 4px;
	background: var(--ctb-cd-bg, rgba(0, 0, 0, 0.2));
	line-height: 1.1;
}

.ctb-num {
	font-size: 1.15em;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.ctb-lbl {
	font-size: 0.6em;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	opacity: 0.85;
}

/* Button */
.ctb-btn,
.ctb-btn:visited {
	display: inline-block;
	padding: 0.45em 1.1em;
	border-radius: var(--ctb-btn-radius, 4px);
	background: var(--ctb-btn-bg, #fff);
	color: var(--ctb-btn-color, #111);
	font: inherit;
	font-size: 0.9em;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	white-space: nowrap;
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.ctb-btn:hover,
.ctb-btn:focus {
	opacity: 0.88;
	transform: translateY(-1px);
	color: var(--ctb-btn-color, #111);
	text-decoration: none;
}

/* Close button */
.ctb-close {
	position: absolute;
	top: 50%;
	right: 8px;
	transform: translateY(-50%);
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--ctb-text, #fff);
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	opacity: 0.75;
}

.ctb-close:hover,
.ctb-close:focus {
	opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
	.ctb-bar {
		font-size: var(--ctb-fsm, 14px);
		padding-top: var(--ctb-pym, var(--ctb-py, 10px));
		padding-bottom: var(--ctb-pym, var(--ctb-py, 10px));
		padding-left: 12px;
		padding-right: 12px;
	}

	.ctb-inner {
		flex-direction: column;
		justify-content: center;
		gap: 8px;
		padding-left: 22px;
		padding-right: 22px;
	}

	.ctb-text {
		text-align: center;
	}

	/* Swap to the shorter mobile text when one is provided */
	.ctb-has-m .ctb-d {
		display: none;
	}

	.ctb-has-m .ctb-m {
		display: inline;
	}

	.ctb-unit {
		min-width: 42px;
	}

	.ctb-close {
		top: 10px;
		transform: none;
		right: 4px;
	}
}

@media (max-width: 380px) {
	.ctb-countdown {
		gap: 4px;
	}

	.ctb-unit {
		min-width: 38px;
		padding: 3px 4px;
	}
}
