/**
 * Cyber Week 2026 homepage overlay
 *
 * Loaded by cyber-week-overlay.js only when the overlay shows. The overlay
 * carries data-theme="dark" and a literal #1e1e1e fallback, since it sits on a
 * photo in both themes. Sizes are the spec's, for a 1280 x 760 viewport; the
 * headline, quote and product name scale down to 1024.
 *
 * @copyright   2026, ON1
 */

/* Campaign-only; goes with the overlay after the sale */
#cw-overlay {
	--gradient-cw2026: linear-gradient(90deg, #2181e8 0%, #ff8329 55%, #ff5b73 100%);
	background: #1e1e1e;
	color: var(--white);
	inset: 0;
	opacity: 0;
	position: fixed;
	transform: scale(1.015);
	transition: opacity 0.45s ease, transform 0.45s ease, visibility 0s 0.45s;
	visibility: hidden;
	z-index: 10000;
}

#cw-overlay.is-open {
	opacity: 1;
	transform: none;
	transition: opacity 0.45s ease, transform 0.45s ease;
	visibility: visible;
}

#cw-overlay:focus {
	outline: none;
}

/* The one darkening layer on the photo */
#cw-overlay::before {
	background: rgba(0, 0, 0, 0.4);
	content: "";
	inset: 0;
	position: absolute;
	z-index: 1;
}

.cw-ov-lock {
	overflow: hidden;
}

.cw-ov__photo img {
	height: 100%;
	inset: 0;
	object-fit: cover;
	object-position: 50% 62%;
	position: absolute;
	width: 100%;
}

.cw-ov__body {
	height: 100%;
	position: relative;
	z-index: 2;
}

/* Left padding 40, not the spec's 24: col-6 starts 16px left of the mockup's 1.05fr / 1fr split */
.cw-ov__panel {
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow-y: auto;
	padding: 40px 48px 32px 40px;
}

/* Auto margins center it, and let it scroll from the top when it overflows */
.cw-ov__content {
	margin: auto 0;
}

.cw-ov__product {
	color: var(--white);
	font-size: clamp(26px, 2.5vw, 32px);
	font-weight: 900;
	letter-spacing: -0.01em;
	line-height: 1.1;
	margin: 0 0 18px;
}

.cw-ov__product img {
	margin-right: 18px;
	vertical-align: middle;
}

/* Solid fallback where gradient text is unsupported */
.cw-ov__headline {
	color: #ff8329;
	font-size: clamp(56px, 6.9vw, 88px);
	font-weight: 900;
	letter-spacing: -0.02em;
	line-height: 1;
	margin: 0 0 16px;
}

.cw-ov__headline span {
	display: block;
	line-height: 1.06;
	padding-bottom: 0.04em;
	width: fit-content;
}

@supports (-webkit-background-clip: text) or (background-clip: text) {
	.cw-ov__headline span {
		-webkit-background-clip: text;
		background-clip: text;
		background-image: var(--gradient-cw2026);
		color: transparent;
	}
}

@media (forced-colors: active) {
	.cw-ov__headline span {
		background: none;
		color: CanvasText;
	}
}

/* "CYBER WEEK" is the outline SVG, not gradient text; sized off the headline's font size */
.cw-ov__headline .cw-ov__outline {
	-webkit-background-clip: border-box;
	background: none;
	background-clip: border-box;
	color: inherit;
	line-height: 1;
	max-width: 100%;
}

.cw-ov__headline .cw-outline {
	display: block;
	filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.6)) drop-shadow(0 2px 16px rgba(0, 0, 0, 0.55));
	height: auto;
	max-width: 100%;
	overflow: visible;
	width: 6.9728em;
}

/* "CYBER MONDAY", through CYBER_MONDAY_END: same letter size, wider word */
.cw-ov__headline .cw-outline--monday {
	width: 8.7297em;
}

.cw-ov__subline {
	color: var(--white);
	font-size: 17px;
	line-height: 1.55;
	margin: 0 0 18px;
	max-width: 480px;
}

.cw-ov__quote {
	border: 0;
	color: var(--white);
	font-size: clamp(20px, 2vw, 25px);
	font-style: normal;
	font-weight: 600;
	letter-spacing: -0.005em;
	line-height: 1.38;
	margin: 0 0 26px;
	max-width: 560px;
	padding: 0;
}

.cw-ov__actions {
	column-gap: 28px;
	margin-bottom: 14px;
	row-gap: 14px;
}

.cw-ov__cta {
	background: var(--blue-500);
	border-radius: var(--border-radius);
	color: var(--white);
	display: inline-block;
	font-size: 16px;
	font-weight: 600;
	height: 65px;
	line-height: 65px;
	padding: 0 36px;
	text-decoration: none;
	transition: background-color 0.2s;
}

.cw-ov__cta svg {
	margin-left: 10px;
	vertical-align: -3px;
}

.cw-ov__cta:hover {
	background: var(--blue-300);
	color: var(--white);
}

.cw-ov__cta:active {
	background: var(--blue-600);
}

/* 44px tall hit area */
.cw-ov__exit {
	background: none;
	border: 0;
	color: var(--blue-300);
	font-size: 16px;
	line-height: 24px;
	padding: 10px 0;
	text-decoration: none;
}

.cw-ov__exit:hover,
.cw-ov__exit:focus {
	color: var(--white);
}

.cw-ov__cta:focus-visible,
.cw-ov__exit:focus-visible,
.cw-ov__close button:focus-visible {
	outline: 2px solid var(--white);
	outline-offset: 3px;
}

.cw-ov__ends {
	color: rgba(255, 255, 255, 0.8);
	font-size: 12.5px;
	line-height: 1.5;
	margin: 0;
}

.cw-ov__close {
	color: var(--white);
	font-size: 12px;
	position: absolute;
	right: 28px;
	top: 24px;
	z-index: 3;
}

.cw-ov__close span {
	margin-right: 10px;
	vertical-align: middle;
}

.cw-ov__close button {
	background: transparent;
	border: 0;
	border-radius: 50%;
	color: var(--white);
	height: 40px;
	padding: 0;
	transition: background-color 0.2s;
	vertical-align: middle;
	width: 40px;
}

.cw-ov__close button:hover {
	background: rgba(255, 255, 255, 0.15);
}

.cw-ov__close svg {
	display: block;
	margin: 0 auto;
}

.cw-ov__credit {
	bottom: 24px;
	color: var(--white);
	font-size: 11px;
	left: 28px;
	letter-spacing: 0.12em;
	margin: 0;
	position: absolute;
	text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
	text-transform: uppercase;
	z-index: 2;
}

/* Short windows: content scrolls inside the panel, gaps tighten by 25% */
@media (max-height: 699.98px) {
	.cw-ov__product {
		margin-bottom: 13.5px;
	}

	.cw-ov__headline {
		margin-bottom: 12px;
	}

	.cw-ov__subline {
		margin-bottom: 13.5px;
	}

	.cw-ov__quote {
		margin-bottom: 19.5px;
	}

	.cw-ov__actions {
		margin-bottom: 10.5px;
	}
}

@media (prefers-reduced-motion: reduce) {
	#cw-overlay,
	#cw-overlay.is-open {
		transform: none;
		transition: none;
	}
}

@media print {
	#cw-overlay {
		display: none !important;
	}

	.cw-ov-lock {
		overflow: visible;
	}
}
