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

.bfz-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	background: rgba(15, 23, 42, 0.45);
	backdrop-filter: blur(6px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	animation: bfzFade .22s ease;
}

@keyframes bfzFade {
	from { opacity: 0; }
	to { opacity: 1; }
}

.bfz-modal {
	--bfz-accent: #0fb6dc;
	--bfz-accent2: #0a9ec2;
	width: min(420px, 100%);
	background: #fff;
	color: #1e293b;
	overflow: hidden;
	position: relative;
	box-shadow: 0 28px 70px rgba(15, 23, 42, 0.25);
	animation: bfzPop .3s cubic-bezier(.2,.8,.2,1);
	font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

@keyframes bfzPop {
	from { opacity: 0; transform: translateY(14px) scale(.97); }
	to { opacity: 1; transform: none; }
}

.bfz-close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 32px;
	height: 32px;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.95);
	color: #64748b;
	cursor: pointer;
	font-size: 20px;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
	z-index: 3;
	padding: 0;
}

.bfz-close:hover { color: #0f172a; background: #fff; }

.bfz-hero {
	padding: 28px 28px 22px;
	background: linear-gradient(
		180deg,
		color-mix(in srgb, var(--bfz-accent) 14%, #ffffff) 0%,
		color-mix(in srgb, var(--bfz-accent2) 22%, #ffffff) 100%
	);
	text-align: center;
}

.bfz-hero-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 18px;
	padding-right: 36px;
}

.bfz-brand {
	font-size: 12px;
	font-weight: 800;
	letter-spacing: .08em;
	color: var(--bfz-accent2);
	display: inline-flex;
	align-items: center;
	max-width: 55%;
}

.bfz-brand-logo {
	display: block;
	height: 28px;
	width: auto;
	max-width: 140px;
	object-fit: contain;
}

.bfz-badge {
	display: inline-block;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: .04em;
	text-transform: uppercase;
	padding: 6px 10px;
	border-radius: 999px;
	background: #fff;
	color: var(--bfz-accent2);
	box-shadow: 0 2px 8px rgba(15, 182, 220, 0.15);
	white-space: nowrap;
}

.bfz-percent {
	margin: 0;
	font-size: clamp(64px, 16vw, 84px);
	line-height: .95;
	font-weight: 800;
	letter-spacing: -0.04em;
	color: var(--bfz-accent);
}

.bfz-title {
	margin: 10px 0 0;
	font-size: 22px;
	font-weight: 750;
	letter-spacing: -0.02em;
	color: #0f172a;
	line-height: 1.25;
}

.bfz-sub {
	margin: 10px 0 0;
	font-size: 14px;
	line-height: 1.5;
	color: #64748b;
}

.bfz-body {
	padding: 22px 28px 26px;
	display: flex;
	flex-direction: column;
	gap: 14px;
	background: #fff;
}

.bfz-code-box {
	border: 1.5px dashed color-mix(in srgb, var(--bfz-accent) 45%, #cbd5e1);
	border-radius: 14px;
	padding: 16px 14px;
	text-align: center;
	background:
		repeating-linear-gradient(
			-45deg,
			#f8fafc,
			#f8fafc 8px,
			#f1f5f9 8px,
			#f1f5f9 16px
		);
}

.bfz-code-label {
	display: block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #94a3b8;
	margin-bottom: 8px;
}

.bfz-code {
	display: block;
	font-size: 28px;
	font-weight: 800;
	letter-spacing: .12em;
	color: #0f172a;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.bfz-copy {
	appearance: none;
	border: 0;
	border-radius: 12px;
	padding: 14px 16px;
	font-size: 15px;
	font-weight: 700;
	color: #fff;
	cursor: pointer;
	background: var(--bfz-accent);
	box-shadow: 0 10px 22px color-mix(in srgb, var(--bfz-accent) 35%, transparent);
	transition: .15s ease;
	width: 100%;
}

.bfz-copy:hover { filter: brightness(1.05); }
.bfz-copy.is-done { background: #0a9ec2; }

.bfz-foot {
	margin: 0;
	text-align: center;
	font-size: 12px;
	line-height: 1.45;
	color: #94a3b8;
}

.bfz-shop {
	display: block;
	text-align: center;
	font-size: 13px;
	font-weight: 650;
	color: var(--bfz-accent2);
	text-decoration: none;
}

.bfz-shop:hover { text-decoration: underline; color: var(--bfz-accent); }

@media (max-width: 720px) {
	.bfz-overlay {
		align-items: flex-end;
		padding: 0;
	}
	.bfz-modal {
		width: 100%;
		border-radius: 22px 22px 0 0 !important;
		max-height: 92vh;
		overflow: auto;
		animation: bfzSheet .28s ease;
	}
	.bfz-close {
		top: 10px;
		right: 10px;
		background: rgba(255,255,255,.95);
	}
	@keyframes bfzSheet {
		from { transform: translateY(36px); }
		to { transform: none; }
	}
}
