/**
 * JT Sale page — promo bar (dummy).
 * Glass panel parity with Type Tester Pro toolbar / font cards.
 * Left: hero-style CTA · Right: big flip-clock (no inner box border).
 */

.jt-sale-promo-bar {
	--jt-sale-promo-bar-min-height: 280px;
	--jt-sale-promo-bg-image: none;
	--jt-sale-promo-bg-position: center;
	--jt-sale-promo-bg-size: cover;
	--jt-sale-promo-bg-overlay: linear-gradient(
		115deg,
		rgba(8, 6, 18, 0.9) 0%,
		rgba(14, 12, 24, 0.68) 46%,
		rgba(255, 92, 92, 0.22) 100%
	);
	--jt-sale-promo-text: var(--jt-ttp-panel-text, rgba(255, 255, 255, 0.94));
	--jt-sale-promo-muted: var(--jt-ttp-panel-muted, rgba(255, 255, 255, 0.55));
	--jt-sale-promo-accent-1: #ffffff;
	--jt-sale-promo-accent-2: #ff8a8a;
	--jt-sale-promo-accent-3: var(--jt-sale-accent, #ff5c5c);
	--jt-sale-promo-pill-bg: rgba(255, 92, 92, 0.14);
	--jt-sale-promo-pill-border: rgba(255, 92, 92, 0.28);
	--jt-sale-promo-pill-text: var(--jt-sale-accent, #ff5c5c);
	--jt-sale-promo-transition: 0.55s;
	--jt-sale-promo-timer-col: auto;
	--jt-sale-promo-flip-size: clamp(3rem, 6.5vw, 5.25rem);
	--jt-sale-promo-flip-label-size: 9px;
	--jt-sale-promo-flip-label-gap: 8px;
	--jt-sale-promo-flip-label-offset: calc(var(--jt-sale-promo-flip-label-gap) + var(--jt-sale-promo-flip-label-size));
	--jt-sale-promo-colon-lift: 10px;

	position: relative;
	width: 100%;
	margin: 0 0 16px;
	border-radius: var(--jt-ttp-radius-panel, 22px);
	color: var(--jt-sale-promo-text);
	overflow: hidden;
}

/* Cosmic glass — same recipe as .jt-ttp__toolbar / .jt-ttp-row */
.jt-sale-page .jt-sale-promo-bar {
	background:
		linear-gradient(155deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.025) 36%, rgba(8, 6, 18, 0.45) 100%),
		var(--jt-ttp-panel-bg, rgba(14, 12, 24, 0.62));
	backdrop-filter: blur(var(--jt-ttp-glass-blur, 18px)) saturate(150%);
	-webkit-backdrop-filter: blur(var(--jt-ttp-glass-blur, 18px)) saturate(150%);
	border: 1px solid var(--jt-ttp-glass-border, rgba(255, 255, 255, 0.1));
	box-shadow: var(--jt-ttp-glass-shadow, 0 18px 48px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(120, 90, 255, 0.05));
}

.jt-sale-page .jt-sale-promo-bar::before {
	content: "";
	position: absolute;
	top: 0;
	left: 14px;
	right: 14px;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.24), transparent);
	pointer-events: none;
	z-index: 0;
}

.jt-sale-page .jt-sale-promo-bar::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	pointer-events: none;
	box-shadow: inset 0 0 0 1px rgba(120, 90, 255, 0.04);
	z-index: 0;
}

.jt-sale-promo-bar__bg {
	display: none;
	position: absolute;
	inset: 0;
	z-index: 0;
	border-radius: inherit;
	pointer-events: none;
	overflow: hidden;
}

.jt-sale-promo-bar.has-promo-bg .jt-sale-promo-bar__bg {
	display: block;
	background-image: var(--jt-sale-promo-bg-overlay), var(--jt-sale-promo-bg-image);
	background-size: cover, var(--jt-sale-promo-bg-size);
	background-position: center, var(--jt-sale-promo-bg-position);
	background-repeat: no-repeat;
}

.jt-sale-promo-bar.has-promo-bg .jt-sale-promo-bar__bg-glow {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(ellipse 48% 56% at 8% 92%, rgba(91, 141, 255, 0.28), transparent 68%),
		radial-gradient(ellipse 36% 40% at 94% 12%, rgba(255, 92, 92, 0.2), transparent 72%);
}

.jt-sale-page .jt-sale-promo-bar.has-promo-bg {
	background:
		linear-gradient(155deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.03) 38%, rgba(8, 6, 18, 0.18) 100%);
	backdrop-filter: blur(8px) saturate(145%);
	-webkit-backdrop-filter: blur(8px) saturate(145%);
}

.jt-sale-page .jt-sale-promo-bar > *:not(.jt-sale-promo-bar__bg) {
	position: relative;
	z-index: 1;
}

.jt-sale-promo-bar.is-hidden,
.jt-sale-promo-bar.jt-sale-countdown--expired[data-hide-on-expire="1"] {
	display: none;
}

.jt-sale-promo-bar__inner {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) var(--jt-sale-promo-timer-col);
	align-items: center;
	justify-items: stretch;
	gap: 12px 0;
	min-height: var(--jt-sale-promo-bar-min-height);
	padding: 28px 32px;
}

.jt-sale-promo-bar__left {
	display: flex;
	align-items: center;
	min-width: 0;
}

.jt-sale-promo-bar__cta {
	display: flex;
	align-items: center;
	width: 100%;
	max-width: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	text-decoration: none;
	cursor: pointer;
	transition: opacity 0.18s ease;
}

.jt-sale-promo-bar__cta:hover,
.jt-sale-promo-bar__cta:focus-visible {
	opacity: 0.92;
}

.jt-sale-promo-bar__cta:focus-visible {
	outline: 2px solid rgba(255, 92, 92, 0.55);
	outline-offset: 3px;
	border-radius: 6px;
}

/* ── 1 paragraph rotator — JT Hero Banner word blur + slide ── */
.jt-sale-promo-bar__heading {
	position: relative;
	width: 100%;
	min-width: 0;
}

.jt-sale-promo-bar__heading-sizer {
	position: absolute;
	visibility: hidden;
	pointer-events: none;
	white-space: nowrap;
	font-size: clamp(1.75rem, 3.8vw, 2.85rem);
	font-weight: 700;
	line-height: 1.08;
	letter-spacing: -0.035em;
}

.jt-sale-promo-bar__heading-viewport {
	position: relative;
	width: 100%;
	min-height: clamp(1.75rem, 3.8vw, 2.85rem);
	overflow: hidden;
}

.jt-sale-promo-bar__title,
.jt-sale-promo-bar__paragraph {
	position: absolute;
	left: 0;
	right: 0;
	top: 50%;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-start;
	gap: 0.2em 0.3em;
	margin: 0;
	padding: 0;
	font-size: clamp(1.75rem, 3.8vw, 2.85rem);
	font-weight: 700;
	line-height: 1.08;
	letter-spacing: -0.035em;
	color: var(--jt-sale-promo-text);
	transform: translate3d(0, calc(-50% + 120%), 0);
	transition: transform var(--jt-sale-promo-heading-transition, 0.55s) cubic-bezier(0.22, 1, 0.36, 1);
	will-change: transform;
}

.jt-sale-promo-bar__title.is-active,
.jt-sale-promo-bar__paragraph.is-active {
	transform: translate3d(0, -50%, 0);
	z-index: 2;
}

.jt-sale-promo-bar__title.is-exit,
.jt-sale-promo-bar__paragraph.is-exit {
	transform: translate3d(0, calc(-50% - 120%), 0);
	z-index: 1;
}

.jt-sale-promo-bar__title[aria-hidden="true"]:not(.is-active):not(.is-exit),
.jt-sale-promo-bar__paragraph[aria-hidden="true"]:not(.is-active):not(.is-exit) {
	visibility: hidden;
}

.jt-sale-promo-bar__title.is-active[aria-hidden="true"],
.jt-sale-promo-bar__title.is-exit[aria-hidden="true"],
.jt-sale-promo-bar__paragraph.is-active[aria-hidden="true"],
.jt-sale-promo-bar__paragraph.is-exit[aria-hidden="true"] {
	visibility: visible;
}

/* ── Meta bar — dates | font rotator + SALE pill (bottom-left) ── */
.jt-sale-promo-bar__meta {
	position: absolute;
	left: 32px;
	bottom: 28px;
	z-index: 2;
	display: flex;
	align-items: center;
	gap: 20px;
	padding: 10px 18px;
	border-radius: 10px;
	background: #000000;
}

.jt-sale-promo-bar__dates {
	display: flex;
	flex-wrap: nowrap;
	align-items: flex-start;
	gap: 16px 28px;
}

.jt-sale-promo-bar__date {
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.jt-sale-promo-bar__date-label {
	font-size: 8px;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.45);
}

.jt-sale-promo-bar__date-value {
	font-size: 12px;
	font-weight: 600;
	line-height: 1.2;
	color: #ffffff;
	white-space: nowrap;
}

.jt-sale-promo-bar__meta-divider {
	flex-shrink: 0;
	align-self: stretch;
	width: 1px;
	min-height: 34px;
	background: rgba(255, 255, 255, 0.22);
}

.jt-sale-promo-bar__font-sale {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.jt-sale-promo-bar__font-rotator {
	position: relative;
	overflow: hidden;
	min-height: 1.25em;
	min-width: 6ch;
}

.jt-sale-promo-bar__font-sizer {
	position: absolute;
	visibility: hidden;
	pointer-events: none;
	white-space: nowrap;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.2;
}

.jt-sale-promo-bar__font-name {
	position: absolute;
	left: 0;
	top: 50%;
	margin: 0;
	padding: 0;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.2;
	color: #ffffff;
	white-space: nowrap;
	transform: translate3d(0, calc(-50% + 120%), 0);
	transition: transform var(--jt-sale-promo-font-transition, 0.45s) cubic-bezier(0.22, 1, 0.36, 1);
	will-change: transform;
}

.jt-sale-promo-bar__font-name.is-active {
	transform: translate3d(0, -50%, 0);
	z-index: 2;
}

.jt-sale-promo-bar__font-name.is-exit {
	transform: translate3d(0, calc(-50% - 120%), 0);
	z-index: 1;
}

.jt-sale-promo-bar__font-name[aria-hidden="true"]:not(.is-active):not(.is-exit) {
	visibility: hidden;
}

.jt-sale-promo-bar__font-name.is-active[aria-hidden="true"],
.jt-sale-promo-bar__font-name.is-exit[aria-hidden="true"] {
	visibility: visible;
}

.jt-sale-promo-bar__sale-pill {
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
	padding: 5px 12px;
	border-radius: 999px;
	background: var(--jt-sale-accent, #ff5c5c);
	color: #ffffff;
	font-size: 9px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

@keyframes jt-hero-banner-title-word {
	from {
		opacity: 0;
		transform: translate3d(0, 1.15em, 0);
		filter: blur(6px);
	}

	to {
		opacity: 1;
		transform: translate3d(0, 0, 0);
		filter: blur(0);
	}
}

@keyframes jt-hero-banner-title-shimmer {
	0%,
	100% {
		background-position: 0% 50%;
	}

	50% {
		background-position: 100% 50%;
	}
}

.jt-sale-promo-bar .jt-hero-banner__title-word {
	display: inline-block;
	opacity: 0;
	transform: translate3d(0, 1.15em, 0);
	filter: blur(6px);
	animation: jt-hero-banner-title-word 0.82s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.jt-sale-promo-bar .jt-hero-banner__title-word--accent {
	background-image: linear-gradient(
		100deg,
		var(--jt-sale-promo-accent-1) 0%,
		var(--jt-sale-promo-accent-2) 38%,
		var(--jt-sale-promo-accent-1) 72%,
		var(--jt-sale-promo-accent-3) 100%
	);
	background-size: 220% auto;
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	animation:
		jt-hero-banner-title-word 0.82s cubic-bezier(0.22, 1, 0.36, 1) forwards,
		jt-hero-banner-title-shimmer 5s ease-in-out 1.4s infinite;
}

/* Timer — pinned top-right, BIG flip digits, no inner box border */
.jt-sale-promo-bar__timer-box {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: center;
	justify-self: end;
	align-self: center;
	gap: 10px;
	width: fit-content;
	max-width: 100%;
	min-height: 0;
	padding: 0;
	margin-left: auto;
	border: none;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}

.jt-sale-promo-bar__timer {
	width: auto;
	line-height: 1;
}

.jt-sale-promo-bar__clock {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	width: auto;
}

.jt-sale-promo-bar__units {
	display: flex;
	align-items: flex-end;
	justify-content: flex-end;
	flex-wrap: nowrap;
	width: auto;
	gap: 2px 10px;
}

.jt-sale-promo-bar .jt-count-flip-group {
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 0;
}

.jt-sale-promo-bar .jt-count-flip__label {
	margin-top: var(--jt-sale-promo-flip-label-gap);
	font-size: var(--jt-sale-promo-flip-label-size);
	font-weight: 500;
	line-height: 1;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--jt-ttp-panel-muted, rgba(255, 255, 255, 0.55));
	white-space: nowrap;
}

.jt-sale-promo-bar .jt-count-flip {
	--jt-flip-size: var(--jt-sale-promo-flip-size);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: var(--jt-flip-size);
	font-size: var(--jt-flip-size);
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	color: var(--jt-ttp-panel-text, #ffffff);
	text-align: center;
	overflow: visible;
}

.jt-sale-promo-bar .jt-count-flip__digit {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1ch;
	height: 1em;
	overflow: visible;
	color: var(--jt-ttp-panel-text, #ffffff);
}

/* Countdown digits — blur entrance + blue gradient shimmer */
.jt-sale-promo-bar .jt-sale-promo-bar__count-digit {
	display: inline-block;
	min-width: 1ch;
	height: 1em;
	line-height: 1;
	text-align: center;
	font-size: inherit;
	font-weight: inherit;
	background-image: linear-gradient(
		100deg,
		#ffffff 0%,
		#dbeafe 38%,
		#ffffff 72%,
		#bfdbfe 100%
	);
	background-size: 220% auto;
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.jt-sale-promo-bar .jt-sale-promo-bar__count-digit.is-static {
	opacity: 1;
	transform: none;
	filter: none;
	animation: jt-hero-banner-title-shimmer 5s ease-in-out infinite;
}

.jt-sale-promo-bar .jt-sale-promo-bar__count-digit:not(.is-static) {
	--jt-count-digit-delay: 0s;
	animation:
		jt-hero-banner-title-word 0.82s cubic-bezier(0.22, 1, 0.36, 1) var(--jt-count-digit-delay) forwards,
		jt-hero-banner-title-shimmer 5s ease-in-out calc(var(--jt-count-digit-delay) + 1.4s) infinite;
}

.jt-sale-promo-bar .jt-count-flip__digit:nth-child(1) .jt-sale-promo-bar__count-digit.is-static {
	animation-delay: 0s;
}

.jt-sale-promo-bar .jt-count-flip__digit:nth-child(2) .jt-sale-promo-bar__count-digit.is-static {
	animation-delay: 0.35s;
}

.jt-sale-promo-bar .jt-count-flip__colon {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: clamp(6px, 1.2vw, 10px);
	align-self: flex-end;
	flex-shrink: 0;
	height: var(--jt-flip-size);
	margin-bottom: calc(var(--jt-sale-promo-flip-label-offset) + var(--jt-sale-promo-colon-lift));
	padding: 0 clamp(4px, 0.8vw, 8px);
	box-sizing: border-box;
}

.jt-sale-promo-bar .jt-count-flip__colon::before,
.jt-sale-promo-bar .jt-count-flip__colon::after {
	content: "";
	width: clamp(4px, 0.7vw, 7px);
	height: clamp(4px, 0.7vw, 7px);
	border-radius: 1px;
	background: rgba(255, 255, 255, 0.38);
}

@media (max-width: 960px) {
	.jt-sale-promo-bar {
		--jt-sale-promo-flip-size: clamp(2.2rem, 5vw, 3.5rem);
		--jt-sale-promo-bar-min-height: 192px;
	}
}

@media (max-width: 720px) {
	.jt-sale-promo-bar {
		--jt-sale-promo-flip-size: clamp(2rem, 9vw, 2.85rem);
		--jt-sale-promo-bar-min-height: auto;
	}

	.jt-sale-promo-bar__inner {
		grid-template-columns: 1fr;
		gap: 12px;
		padding: 14px 14px;
	}

	.jt-sale-promo-bar__meta {
		left: 14px;
		bottom: 14px;
		flex-wrap: wrap;
		gap: 12px 16px;
		max-width: calc(100% - 28px);
	}

	.jt-sale-promo-bar__meta-divider {
		display: none;
	}

	.jt-sale-promo-bar__timer-box {
		justify-self: end;
		width: fit-content;
		max-width: 100%;
		padding: 0;
	}

}

@media (prefers-reduced-motion: reduce) {
	.jt-sale-promo-bar__title,
	.jt-sale-promo-bar__paragraph {
		transition: none;
	}

	.jt-sale-promo-bar__title:not(.is-active),
	.jt-sale-promo-bar__paragraph:not(.is-active) {
		visibility: hidden;
	}

	.jt-sale-promo-bar__font-name {
		transition: none;
	}

	.jt-sale-promo-bar__font-name:not(.is-active) {
		visibility: hidden;
	}

	.jt-sale-promo-bar .jt-hero-banner__title-word {
		animation: none;
		opacity: 1;
		transform: none;
		filter: none;
	}

	.jt-sale-promo-bar .jt-sale-promo-bar__count-digit {
		animation: none;
		opacity: 1;
		transform: none;
		filter: none;
		color: var(--jt-ttp-panel-text, #ffffff);
		background-image: none;
		-webkit-background-clip: border-box;
		background-clip: border-box;
	}

}
