/* ================================= Lightbox ============================= */

.bb-lightbox {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(8, 18, 40, .92);
	opacity: 0;
	visibility: hidden;
	transition: opacity .25s var(--bb-ease), visibility .25s;
}

.bb-lightbox.is-open {
	opacity: 1;
	visibility: visible;
}

.bb-lightbox__stage {
	position: relative;
	width: 100%;
	max-width: 1000px;
	max-height: 86vh;
	display: flex;
	align-items: center;
	justify-content: center;
	transform: scale(.96);
	transition: transform .25s var(--bb-ease);
}

.bb-lightbox.is-open .bb-lightbox__stage {
	transform: scale(1);
}

.bb-lightbox__stage img {
	max-width: 100%;
	max-height: 86vh;
	border-radius: var(--bb-radius);
	object-fit: contain;
}

.bb-lightbox__frame {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	border-radius: var(--bb-radius);
	overflow: hidden;
	background: #000;
}

.bb-lightbox__frame iframe,
.bb-lightbox__frame video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.bb-lightbox__btn {
	position: absolute;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .12);
	color: #fff;
	transition: background-color .2s var(--bb-ease);
}

.bb-lightbox__btn:hover {
	background: var(--bb-saffron);
}

.bb-lightbox__btn .bb-icon {
	width: 17px;
	height: 17px;
}

.bb-lightbox__close {
	top: 18px;
	right: 18px;
	position: fixed;
}

.bb-lightbox__prev {
	left: 18px;
	top: 50%;
	transform: translateY(-50%);
	position: fixed;
}

.bb-lightbox__prev .bb-icon {
	transform: rotate(180deg);
}

.bb-lightbox__next {
	right: 18px;
	top: 50%;
	transform: translateY(-50%);
	position: fixed;
}

.bb-lightbox__counter {
	position: fixed;
	left: 50%;
	bottom: 20px;
	transform: translateX(-50%);
	color: rgba(255, 255, 255, .7);
	font-size: 13px;
	letter-spacing: .04em;
}

body.bb-lightbox-open {
	overflow: hidden;
}

@media (max-width: 767px) {
	.bb-lightbox {
		padding: 14px;
	}

	.bb-lightbox__btn {
		width: 38px;
		height: 38px;
	}

	.bb-lightbox__prev,
	.bb-lightbox__next {
		top: auto;
		bottom: 16px;
		transform: none;
	}

	.bb-lightbox__counter {
		bottom: 26px;
	}
}
