/* BN Lightbox — cover + dialog. Colors follow the BN palette
   (blue #004C97, yellow #FEDD00). Buttons force past theme button styles. */

.bn-lb { margin: 0 0 1.5em; }

.bn-lb .bn-lb-cover {
	position: relative;
	display: block;
	width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 10px;
	background: #e1eeff;
	box-shadow: none;
	overflow: hidden;
	cursor: pointer;
	line-height: 0;
}

.bn-lb .bn-lb-cover .bn-lb-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .35s ease;
}

.bn-lb .bn-lb-cover:hover .bn-lb-img,
.bn-lb .bn-lb-cover:focus-visible .bn-lb-img {
	transform: scale(1.03);
}

.bn-lb .bn-lb-cover:focus-visible {
	outline: 3px solid #FEDD00;
	outline-offset: 3px;
}

.bn-lb.bn-lb-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 10px;
}

.bn-lb-badge {
	position: absolute;
	left: 12px;
	bottom: 12px;
	padding: 6px 12px;
	border-radius: 999px;
	background: #FEDD00;
	color: #333;
	font-family: inherit;
	font-weight: 700;
	font-size: 16px;
	line-height: 1.2;
	letter-spacing: .01em;
}

.bn-lb-play {
	position: absolute;
	top: 50%;
	left: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	margin: -36px 0 0 -36px;
	border-radius: 50%;
	background: rgba(0, 76, 151, .9);
}

.bn-lb-play svg { width: 34px; height: 34px; margin-left: 4px; fill: #fff; }

/* ---------- Dialog ---------- */

.bn-lb-open { overflow: hidden; }

.bn-lb-dialog {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 56px 64px 8px;
}

.bn-lb-dialog[hidden] { display: none; }

.bn-lb-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 38, 77, .93); /* BN blue #004C97 at half brightness */
}

.bn-lb-stage {
	position: relative;
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 0;
}

.bn-lb-stage .bn-lb-media { animation: bn-lb-in .28s ease both; }

@keyframes bn-lb-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

.bn-lb-stage img.bn-lb-media {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	border-radius: 4px;
}

.bn-lb-stage .bn-lb-frame {
	width: min(100%, 1100px);
	aspect-ratio: 16 / 9;
	max-height: 100%;
	border: 0;
	border-radius: 4px;
	background: #000;
}

.bn-lb-foot {
	position: relative;
	display: flex;
	flex: 0 0 auto;
	align-items: baseline;
	justify-content: space-between;
	gap: 24px;
	width: min(100%, 1100px);
	min-height: 48px;
	padding: 12px 0;
	color: #fff;
	font-size: 16px;
	line-height: 1.4;
}

.bn-lb-foot { pointer-events: none; }
.bn-lb-foot p { margin: 0; color: inherit; }
.bn-lb-count { margin-left: auto; opacity: .75; white-space: nowrap; }

.bn-lb-dialog .bn-lb-btn,
.bn-lb-dialog .bn-lb-btn:hover,
.bn-lb-dialog .bn-lb-btn:focus,
.bn-lb-dialog .bn-lb-btn:active {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .12);
	box-shadow: none;
	color: #fff;
	cursor: pointer;
	transition: background .15s ease;
}

.bn-lb-dialog .bn-lb-btn:hover { background: rgba(255, 255, 255, .28); }
.bn-lb-dialog .bn-lb-btn:focus-visible { outline: 3px solid #FEDD00; outline-offset: 2px; }
.bn-lb-dialog .bn-lb-btn[hidden] { display: none; }

.bn-lb-btn svg {
	width: 24px;
	height: 24px;
	fill: none;
	stroke: #fff;
	stroke-width: 2.5;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.bn-lb-close { top: 8px; right: 12px; }
.bn-lb-dialog .bn-lb-prev { left: 8px; top: calc(50% - 24px); }
.bn-lb-dialog .bn-lb-next { right: 8px; top: calc(50% - 24px); }

@media (max-width: 700px) {
	.bn-lb-dialog { padding: 56px 8px 8px; }
	/* Arrows sit over the bottom corners on phones; swipe also works. */
	.bn-lb-dialog .bn-lb-prev, .bn-lb-dialog .bn-lb-next { top: auto; bottom: 8px; }
	.bn-lb-dialog .bn-lb-prev { left: 8px; }
	.bn-lb-dialog .bn-lb-next { right: 8px; }
	.bn-lb-foot { padding-bottom: 60px; flex-direction: column; gap: 4px; }
	.bn-lb-count { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
	.bn-lb-stage .bn-lb-media { animation: none; }
	.bn-lb .bn-lb-cover .bn-lb-img { transition: none; }
}
