/**
 * Discount coupon popup. Enqueued only when the popup is enabled.
 */

.ssb-popup {
	--ssb-popup-navy: #234969;
	--ssb-popup-navy-deep: #1a3654;
	--ssb-popup-coral: #e4573d;
	--ssb-popup-ink: #1a1a1a;
	--ssb-popup-muted: #5b6570;
	--ssb-popup-paper: #ffffff;
	--ssb-popup-ticket: #f4f7fa;
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px 16px;
	box-sizing: border-box;
}

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

.ssb-popup .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.ssb-popup.is-open {
	display: flex;
}

body.ssb-popup-open {
	overflow: hidden;
}

.ssb-popup__overlay {
	position: absolute;
	inset: 0;
	background: rgba(17, 24, 39, 0.55);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	opacity: 0;
	transition: opacity 0.28s ease;
}

.ssb-popup.is-open .ssb-popup__overlay {
	opacity: 1;
}

.ssb-popup__dialog {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 420px;
	padding: 0;
	overflow: hidden;
	background: var(--ssb-popup-paper);
	border-radius: 20px;
	box-shadow:
		0 24px 60px rgba(17, 24, 39, 0.28),
		0 2px 8px rgba(17, 24, 39, 0.08);
	text-align: center;
	box-sizing: border-box;
	color: var(--ssb-popup-ink);
	outline: none;
	opacity: 0;
	transform: translateY(12px) scale(0.96);
	transition: opacity 0.32s ease, transform 0.32s ease;
}

.ssb-popup.is-open .ssb-popup__dialog {
	opacity: 1;
	transform: translateY(0) scale(1);
}

.ssb-popup__close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.18);
	color: #fff;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.2s ease;
}

.ssb-popup__close:hover,
.ssb-popup__close:focus {
	background: rgba(255, 255, 255, 0.32);
	transform: scale(1.04);
}

.ssb-popup__close:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.ssb-popup__header {
	position: relative;
	overflow: hidden;
	padding: 36px 32px 28px;
	background: linear-gradient(145deg, var(--ssb-popup-navy) 0%, var(--ssb-popup-navy-deep) 55%, #16324c 100%);
	color: #fff;
}

.ssb-popup__header::before,
.ssb-popup__header::after {
	content: "";
	position: absolute;
	border-radius: 50%;
	pointer-events: none;
}

.ssb-popup__header::before {
	width: 160px;
	height: 160px;
	top: -72px;
	left: -48px;
	background: rgba(255, 255, 255, 0.08);
}

.ssb-popup__header::after {
	width: 110px;
	height: 110px;
	right: -28px;
	bottom: -48px;
	background: rgba(228, 87, 61, 0.28);
}

.ssb-popup__icon {
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	margin-bottom: 12px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.14);
	border: 1px solid rgba(255, 255, 255, 0.22);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
	color: #fff;
}

.ssb-popup__eyebrow {
	position: relative;
	z-index: 1;
	margin: 0;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.78);
}

.ssb-popup__body {
	padding: 28px 32px 32px;
}

.ssb-popup__headline {
	margin: 0 0 10px;
	font-size: 24px;
	line-height: 1.25;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--ssb-popup-navy);
}

.ssb-popup__description {
	margin: 0 0 22px;
	font-size: 15px;
	line-height: 1.55;
	color: var(--ssb-popup-muted);
}

.ssb-popup__description p {
	margin: 0 0 8px;
}

.ssb-popup__description p:last-child {
	margin-bottom: 0;
}

.ssb-popup__code {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 16px 28px 14px;
	border: 0;
	background-color: var(--ssb-popup-ticket);
	background-image:
		radial-gradient(circle at left center, var(--ssb-popup-paper) 10px, transparent 10.5px),
		radial-gradient(circle at right center, var(--ssb-popup-paper) 10px, transparent 10.5px);
	color: var(--ssb-popup-navy);
	box-shadow: inset 0 0 0 1px rgba(35, 73, 105, 0.12);
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ssb-popup__code::before {
	content: "";
	position: absolute;
	left: 18px;
	right: 18px;
	top: 0;
	bottom: 0;
	border-top: 1px dashed rgba(35, 73, 105, 0.28);
	border-bottom: 1px dashed rgba(35, 73, 105, 0.28);
	pointer-events: none;
}

.ssb-popup__code:hover,
.ssb-popup__code:focus {
	transform: translateY(-1px);
	box-shadow:
		inset 0 0 0 1px rgba(35, 73, 105, 0.2),
		0 8px 18px rgba(35, 73, 105, 0.1);
}

.ssb-popup__code:focus-visible {
	outline: 2px solid var(--ssb-popup-navy);
	outline-offset: 3px;
}

.ssb-popup__code-kicker {
	position: relative;
	z-index: 1;
	margin-bottom: 4px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ssb-popup-muted);
}

.ssb-popup__code-row {
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.ssb-popup__code-label {
	font-size: 20px;
	font-weight: 700;
	letter-spacing: 0.12em;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
	line-height: 1.2;
}

.ssb-popup__code-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--ssb-popup-navy);
}

.ssb-popup__icon-check {
	display: none;
}

.ssb-popup__code-hint {
	position: relative;
	z-index: 1;
	margin-top: 6px;
	font-size: 12px;
	font-weight: 500;
	color: var(--ssb-popup-muted);
}

.ssb-popup__code.is-copied {
	background-color: #edf8f0;
	background-image:
		radial-gradient(circle at left center, var(--ssb-popup-paper) 10px, transparent 10.5px),
		radial-gradient(circle at right center, var(--ssb-popup-paper) 10px, transparent 10.5px);
	box-shadow: inset 0 0 0 1px rgba(0, 163, 42, 0.28);
	color: #1e7a34;
}

.ssb-popup__code.is-copied .ssb-popup__icon-copy {
	display: none;
}

.ssb-popup__code.is-copied .ssb-popup__icon-check {
	display: block;
	color: #1e7a34;
}

.ssb-popup__code.is-copied .ssb-popup__code-hint {
	color: #1e7a34;
	font-weight: 600;
}

@media screen and (max-width: 480px) {
	.ssb-popup__header {
		padding: 32px 20px 24px;
	}

	.ssb-popup__body {
		padding: 24px 20px 24px;
	}

	.ssb-popup__headline {
		font-size: 21px;
	}

	.ssb-popup__code-label {
		font-size: 18px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ssb-popup__overlay,
	.ssb-popup__dialog,
	.ssb-popup__close,
	.ssb-popup__code {
		transition: none;
	}

	.ssb-popup__dialog {
		transform: none;
		opacity: 1;
	}

	.ssb-popup__code:hover,
	.ssb-popup__code:focus,
	.ssb-popup__close:hover,
	.ssb-popup__close:focus {
		transform: none;
	}
}
