/**
 * Black Friday membership popup — desktop split + mobile stacked.
 */

.knxb-offer-popup {
	position: fixed;
	inset: 0;
	z-index: 2000000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	box-sizing: border-box;
}

.knxb-offer-popup[hidden] {
	display: none !important;
}

.knxb-offer-popup.is-open {
	display: flex !important;
}

.knxb-offer-popup__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(6, 16, 12, 0.62);
	backdrop-filter: blur(2px);
}

.knxb-offer-popup__dialog {
	position: relative;
	z-index: 1;
	width: min(920px, 100%);
	max-height: min(92vh, 640px);
	background: #fff;
	border-radius: 22px;
	overflow: hidden;
	box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
	display: flex;
	flex-direction: column;
	animation: knxb-popup-in 0.38s ease-out;
}

@keyframes knxb-popup-in {
	from {
		opacity: 0;
		transform: translateY(12px) scale(0.98);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

.knxb-offer-popup__close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 5;
	width: 36px;
	height: 36px;
	border-radius: 999px;
	border: 1px solid rgba(15, 23, 42, 0.12);
	background: rgba(255, 255, 255, 0.92);
	color: #334155;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

.knxb-offer-popup__close:hover {
	background: #fff;
	color: #0f172a;
}

.knxb-offer-popup__grid {
	display: grid;
	grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
	min-height: 460px;
	max-height: inherit;
}

.knxb-offer-popup__visual {
	position: relative;
	overflow: hidden;
	background:
		linear-gradient(160deg, rgba(4, 28, 18, 0.55) 0%, rgba(4, 20, 14, 0.72) 100%),
		var(--knxb-popup-visual-bg, none),
		linear-gradient(145deg, #071912 0%, #0f2f1f 48%, #06110c 100%);
	background-size: cover;
	background-position: center;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 28px 18px 28px 24px;
}

.knxb-offer-popup__rain {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 1;
	overflow: hidden;
}

.knxb-offer-popup__rain-symbol {
	position: absolute;
	top: 0;
	left: 0;
	font-weight: 800;
	line-height: 1;
	color: #e10600;
	text-shadow:
		0 0 6px rgba(225, 6, 0, 0.5),
		0 0 14px rgba(225, 6, 0, 0.25);
	pointer-events: none;
	user-select: none;
	will-change: transform, opacity;
}

.knxb-offer-popup__logo {
	display: flex;
	justify-content: center;
}

.knxb-offer-popup__logo img {
	display: block;
	max-height: 42px;
	width: auto;
	height: auto;
	object-fit: contain;
}

.knxb-offer-popup__logo--visual {
	display: none;
	position: absolute;
	top: 18px;
	left: 0;
	right: 0;
	z-index: 3;
}

.knxb-offer-popup__logo--visual img {
	filter: brightness(0) invert(1);
	max-height: 36px;
}

.knxb-offer-popup__logo--body {
	margin: 0 0 14px;
}

.knxb-offer-popup__tag {
	position: relative;
	z-index: 2;
	width: min(220px, 70%);
	aspect-ratio: 0.78;
	background: radial-gradient(circle at 35% 20%, #ff3b3b 0%, #e10600 42%, #b00400 100%);
	border-radius: 18px;
	border: 3px solid #f0d36a;
	box-shadow:
		0 0 0 3px rgba(225, 6, 0, 0.35),
		0 0 28px rgba(225, 6, 0, 0.55),
		0 18px 40px rgba(0, 0, 0, 0.45);
	transform: rotate(-14deg);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 28px 12px 18px;
	color: #fff;
	text-align: center;
}

.knxb-offer-popup__tag-hole {
	position: absolute;
	top: 12px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #0a1a12;
	box-shadow: inset 0 0 0 3px #f0d36a;
}

.knxb-offer-popup__tag-black {
	font-size: clamp(1.1rem, 2.2vw, 1.35rem);
	font-weight: 800;
	letter-spacing: 0.08em;
	line-height: 1;
}

.knxb-offer-popup__tag-friday {
	font-size: clamp(1.55rem, 3vw, 2rem);
	font-weight: 900;
	letter-spacing: 0.02em;
	line-height: 1.05;
	margin-top: 2px;
	text-shadow: 0 0 12px rgba(255, 255, 255, 0.35);
}

.knxb-offer-popup__tag-sale {
	margin-top: 12px;
	min-width: 78%;
	padding: 5px 10px 6px;
	background: linear-gradient(180deg, #f6e27a 0%, #c9a227 100%);
	color: #1a1204;
	font-size: 0.78rem;
	font-weight: 900;
	letter-spacing: 0.14em;
	border-radius: 4px;
	box-shadow: 0 2px 0 rgba(0, 0, 0, 0.18);
}

.knxb-offer-popup__wave {
	position: absolute;
	top: 0;
	right: -1px;
	bottom: 0;
	width: 34px;
	height: 100%;
	z-index: 3;
	display: block;
}

.knxb-offer-popup__body {
	position: relative;
	z-index: 2;
	padding: 36px 40px 34px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	background: #fff;
	overflow: auto;
}

.knxb-offer-popup__timer--desktop {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 18px;
}

.knxb-offer-popup__timer--mobile {
	display: none;
}

.knxb-offer-popup__timer-icon {
	display: inline-flex;
	color: #e10600;
	flex: 0 0 auto;
}

.knxb-offer-popup__units {
	display: flex;
	gap: 8px;
}

.knxb-offer-popup__unit {
	min-width: 54px;
	padding: 7px 8px 6px;
	border-radius: 10px;
	background: #ffe4e6;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.knxb-offer-popup__unit strong {
	font-size: 1.15rem;
	font-weight: 800;
	line-height: 1.1;
	color: #e10600;
	font-variant-numeric: tabular-nums;
}

.knxb-offer-popup__unit span {
	font-size: 0.58rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	color: #e10600;
	opacity: 0.75;
	margin-top: 2px;
}

.knxb-offer-popup__title {
	margin: 0 0 10px;
	font-size: clamp(1.25rem, 2.1vw, 1.55rem);
	font-weight: 900;
	line-height: 1.2;
	letter-spacing: -0.02em;
	color: #1e293b;
	text-transform: uppercase;
}

.knxb-offer-popup__title span {
	color: #009640;
	display: inline;
}

.knxb-offer-popup__title::after {
	content: "";
	display: block;
	width: 42px;
	height: 3px;
	margin-top: 12px;
	background: #009640;
	border-radius: 2px;
}

.knxb-offer-popup__text {
	margin: 0 0 22px;
	font-size: 0.95rem;
	line-height: 1.55;
	color: #64748b;
}

.knxb-offer-popup__text--mobile {
	display: none;
}

.knxb-offer-popup__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	min-height: 52px;
	padding: 0 22px;
	border-radius: 12px;
	background: linear-gradient(180deg, #14b85a 0%, #009640 55%, #007b34 100%);
	color: #fff !important;
	text-decoration: none !important;
	font-weight: 800;
	font-size: 0.95rem;
	letter-spacing: 0.04em;
	box-shadow: 0 8px 22px rgba(0, 150, 64, 0.35);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.knxb-offer-popup__cta:hover {
	transform: translateY(-1px);
	box-shadow: 0 10px 26px rgba(0, 150, 64, 0.42);
	color: #fff !important;
}

.knxb-offer-popup__cta-icon {
	display: inline-flex;
	padding-right: 12px;
	border-right: 1px solid rgba(255, 255, 255, 0.35);
}

.knxb-offer-popup__cta-label {
	flex: 1 1 auto;
	text-align: center;
}

.knxb-offer-popup__cta-arrow {
	font-size: 1.15rem;
	line-height: 1;
}

body.knxb-offer-popup-open {
	overflow: hidden;
}

@media (max-width: 782px) {
	.knxb-offer-popup {
		padding: 10px;
		align-items: flex-end;
	}

	.knxb-offer-popup__dialog {
		width: min(420px, 100%);
		max-height: min(94vh, 720px);
		border-radius: 20px;
	}

	.knxb-offer-popup__grid {
		grid-template-columns: 1fr;
		min-height: 0;
	}

	.knxb-offer-popup__visual {
		min-height: 210px;
		padding: 52px 16px 36px;
	}

	.knxb-offer-popup__wave {
		display: none;
	}

	.knxb-offer-popup__visual::after {
		content: "";
		position: absolute;
		left: 0;
		right: 0;
		bottom: -1px;
		height: 28px;
		background:
			radial-gradient(120% 100% at 50% -20%, transparent 55%, #fff 56%);
		z-index: 3;
	}

	.knxb-offer-popup__logo--visual {
		display: flex;
	}

	.knxb-offer-popup__logo--body {
		display: none;
	}

	.knxb-offer-popup__tag {
		width: min(168px, 48%);
		transform: rotate(-10deg);
	}

	.knxb-offer-popup__body {
		padding: 8px 22px 24px;
	}

	.knxb-offer-popup__timer--desktop,
	.knxb-offer-popup__text--desktop {
		display: none;
	}

	.knxb-offer-popup__text--mobile {
		display: block;
		color: #1e293b;
		font-size: 0.9rem;
		margin-bottom: 14px;
	}

	.knxb-offer-popup__title {
		font-size: 1.2rem;
		text-align: center;
	}

	.knxb-offer-popup__title span {
		color: #e10600;
		display: block;
	}

	.knxb-offer-popup__title::after {
		margin-left: auto;
		margin-right: auto;
	}

	.knxb-offer-popup__timer--mobile {
		display: flex;
		align-items: center;
		gap: 8px;
		margin: 0 0 16px;
		padding: 10px 12px;
		border-radius: 12px;
		background: linear-gradient(90deg, #e10600 0%, #c40500 100%);
		color: #fff;
		box-shadow: 0 6px 18px rgba(225, 6, 0, 0.28);
	}

	.knxb-offer-popup__timer--mobile .knxb-offer-popup__timer-icon {
		color: #fff;
	}

	.knxb-offer-popup__units--bar {
		flex: 1 1 auto;
		display: grid;
		grid-template-columns: repeat(4, 1fr);
		gap: 0;
	}

	.knxb-offer-popup__units--bar .knxb-offer-popup__unit {
		min-width: 0;
		padding: 0 4px;
		background: transparent;
		border-radius: 0;
		border-left: 1px solid rgba(255, 255, 255, 0.28);
	}

	.knxb-offer-popup__units--bar .knxb-offer-popup__unit:first-child {
		border-left: 0;
	}

	.knxb-offer-popup__units--bar .knxb-offer-popup__unit strong,
	.knxb-offer-popup__units--bar .knxb-offer-popup__unit span {
		color: #fff;
		opacity: 1;
	}

	.knxb-offer-popup__units--bar .knxb-offer-popup__unit strong {
		font-size: 1.05rem;
	}

	.knxb-offer-popup__units--bar .knxb-offer-popup__unit span {
		font-size: 0.52rem;
		letter-spacing: 0.02em;
		opacity: 0.9;
	}

	.knxb-offer-popup__cta {
		width: 100%;
	}

	.knxb-offer-popup__cta-icon {
		display: none;
	}

	.knxb-offer-popup__close {
		background: rgba(255, 255, 255, 0.18);
		border-color: rgba(255, 255, 255, 0.35);
		color: #fff;
		top: 10px;
		right: 10px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.knxb-offer-popup__dialog {
		animation: none;
	}

	.knxb-offer-popup__rain {
		display: none !important;
	}
}
