/*
 * Desktop QR popup for the store badges (BP 68, inc/qr-popup.php).
 * Oct 2026 design system: white 12px card over an Abyss scrim, Oswald
 * display headline, cyan rule, clipped Ocean button (.bp-btn, brand.css).
 * Two columns from 860px, stacked below. Dark modules on white so a phone
 * camera reads the code on any page background.
 */

.bp-qr {
	position: fixed;
	inset: 0;
	z-index: 70;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 24px;
	font-family: "DIN Next LT Pro", Arial, Helvetica, sans-serif;
	color: #14232c;
}

.bp-qr.is-open {
	display: flex;
}

.bp-qr-scrim {
	position: absolute;
	inset: 0;
	background: rgba(2, 19, 27, 0.8);
}

.bp-qr-card {
	position: relative;
	display: grid;
	grid-template-columns: 300px minmax(0, 1fr);
	gap: 36px;
	width: 100%;
	max-width: 820px;
	max-height: calc(100vh - 48px);
	overflow: auto;
	padding: 40px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 24px 64px rgba(2, 19, 27, 0.4), 0 2px 8px rgba(2, 19, 27, 0.2);
	outline: none;
}

@media (prefers-reduced-motion: no-preference) {
	.bp-qr.is-open .bp-qr-card {
		animation: bp-qr-in 180ms cubic-bezier(0.22, 1, 0.36, 1);
	}

	@keyframes bp-qr-in {
		from {
			opacity: 0;
			transform: translateY(8px);
		}

		to {
			opacity: 1;
			transform: none;
		}
	}
}

.bp-qr-x {
	position: absolute;
	top: 12px;
	right: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 6px;
	background: none;
	color: #46565f;
	cursor: pointer;
}

.bp-qr-x:hover {
	background: #f2f6f8;
	color: #14232c;
}

.bp-qr-x:focus-visible,
.bp-qr-link:focus-visible {
	outline: 2px solid var(--bp-ocean, #0076a9);
	outline-offset: 2px;
}

/* ----- Left: the code ----- */

.bp-qr-code {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.bp-qr-svg {
	width: 260px;
	height: 260px;
	border: 1px solid #e3e8eb;
	border-radius: 8px;
	background: #fff;
}

.bp-qr-svg.is-failed {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	font-size: 14px;
	color: #46565f;
	text-align: center;
}

.bp-qr-svg.is-failed::after {
	content: "The code could not be drawn. Use the link instead.";
}

.bp-qr-svg svg {
	display: block;
	width: 100%;
	height: 100%;
}

.bp-qr-hint {
	margin: 14px 0 0;
	font-size: 14px;
	line-height: 1.4;
	color: #46565f;
	text-align: center;
}

/* ----- Right: the copy ----- */

.bp-qr-copy {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	padding-right: 24px;
}

.bp-qr-title {
	margin: 0;
	font-family: var(--bp-display, "Oswald", "DIN Next LT Pro", Arial, sans-serif);
	font-weight: 700;
	font-size: 32px;
	line-height: 1.05;
	letter-spacing: 0;
	text-transform: uppercase;
	color: #14232c;
}

.bp-qr-copy .bp-rule {
	margin-top: 14px;
}

.bp-qr-list {
	margin: 18px 0 0;
	padding: 0;
	list-style: none;
}

.bp-qr-list li {
	position: relative;
	padding-left: 18px;
	font-size: 16px;
	line-height: 1.5;
}

.bp-qr-list li + li {
	margin-top: 8px;
}

.bp-qr-list li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 9px;
	width: 7px;
	height: 7px;
	background: var(--bp-cyan, #27bbfa);
}

.bp-qr-link {
	margin-top: 28px;
}

/* ----- Narrow desktop windows: stack the columns ----- */

@media (max-width: 859px) {
	.bp-qr {
		padding: 16px;
	}

	.bp-qr-card {
		grid-template-columns: 1fr;
		gap: 28px;
		padding: 48px 28px 32px;
		max-height: calc(100vh - 32px);
	}

	.bp-qr-copy {
		align-items: center;
		text-align: center;
		padding-right: 0;
	}

	.bp-qr-copy .bp-rule {
		margin-left: auto;
		margin-right: auto;
	}

	.bp-qr-list li {
		padding-left: 0;
	}

	.bp-qr-list li::before {
		display: none;
	}

	.bp-qr-title {
		font-size: 28px;
	}
}

/* ----- Page behind: no scroll, no layout shift ----- */

html.bp-qr-open {
	overflow: hidden;
	padding-right: var(--bp-qr-sbw, 0px);
}

html.bp-qr-open .bp-nav {
	padding-right: var(--bp-qr-sbw, 0px);
}
