/**
 * Video entries in the app screenshot gallery, plus the lightbox that replaces the
 * theme's own one for galleries containing video. See includes/hapk-gallery-video.php.
 */

/* ------------------------------------------------------------ carousel item */

/* Matches `#slideimages .px-carousel-item img` so video and image strips line up. */
#slideimages .px-carousel-item video.hapk-gallery-video {
	max-height: 260px;
	cursor: pointer;
	display: block;
	width: auto;
	height: auto;
	background: #000;
}

#slideimages .px-carousel-item.hapk-vid-item {
	position: relative;
}

/* Shown while the clip is paused (off screen, or autoplay refused). */
.hapk-vid-badge {
	position: absolute;
	right: 8px;
	bottom: 8px;
	width: 28px;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: rgba(0, 0, 0, .55);
	color: #fff;
	font-size: 11px;
	pointer-events: none;
}

/* ----------------------------------------------------------------- lightbox */

.hapk-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	background: rgba(0, 0, 0, .9);
	display: flex;
	align-items: center;
	justify-content: center;
}

.hapk-lb-stage {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 48px 56px;
	box-sizing: border-box;
}

.hapk-lb-stage img,
.hapk-lb-stage video {
	max-width: 100%;
	max-height: 100%;
	display: block;
	margin: auto;
}

.hapk-lb-close,
.hapk-lb-prev,
.hapk-lb-next {
	position: absolute;
	background: none;
	border: 0;
	color: rgba(255, 255, 255, .7);
	cursor: pointer;
	padding: 10px;
	line-height: 1;
	transition: color .15s;
}

.hapk-lb-close:hover,
.hapk-lb-prev:hover,
.hapk-lb-next:hover {
	color: #fff;
}

.hapk-lb-close {
	top: 6px;
	right: 10px;
	font-size: 34px;
}

.hapk-lb-prev,
.hapk-lb-next {
	top: 50%;
	transform: translateY(-50%);
	font-size: 34px;
	text-shadow: 0 0 3px #000;
}

.hapk-lb-prev { left: 6px }
.hapk-lb-next { right: 6px }

.hapk-lb-prev[disabled],
.hapk-lb-next[disabled] {
	color: rgba(255, 255, 255, .25);
	cursor: default;
}

.hapk-lb-caption {
	position: absolute;
	bottom: 10px;
	left: 0;
	right: 0;
	text-align: center;
	color: #fff;
	font-size: 13px;
	pointer-events: none;
}

@media (max-width: 640px) {
	.hapk-lb-stage {
		padding: 44px 12px;
	}

	.hapk-lb-prev,
	.hapk-lb-next {
		font-size: 26px;
	}
}
