/**
 * Qube Lightbox — styles for assets/js/qube-lightbox.js.
 *
 * Styled to the Qube palette (yellow 002 accents on a near-black overlay) so the
 * lightbox reads as part of the site rather than as a bolted-on plugin.
 */

.qube-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.25s ease;
}

.qube-lightbox[hidden] {
	display: none;
}

.qube-lightbox.is-visible {
	opacity: 1;
}

.qube-lightbox__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.9);
}

/* Stop the page behind scrolling while the lightbox is open. */
html.qube-lightbox-open,
html.qube-lightbox-open body {
	overflow: hidden;
}

.qube-lightbox__figure {
	position: relative;
	z-index: 2;
	margin: 0;
	max-width: 90vw;
	max-height: 85vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 15px;
}

.qube-lightbox__image {
	display: block;
	max-width: 90vw;
	max-height: 75vh;
	width: auto;
	height: auto;
	object-fit: contain;
}

.qube-lightbox__caption {
	color: #fff;
	text-align: center;
	font-size: 0.95rem;
	margin: 0;
	max-width: 70ch;
}

.qube-lightbox__caption[hidden] {
	display: none;
}

.qube-lightbox__counter {
	position: absolute;
	z-index: 2;
	bottom: 25px;
	left: 50%;
	transform: translateX(-50%);
	margin: 0;
	color: var(--wp--preset--color--002, #ffd200);
	font-weight: 600;
	letter-spacing: 0.1em;
}

.qube-lightbox__counter[hidden] {
	display: none;
}

/* controls */
.qube-lightbox__close,
.qube-lightbox__nav {
	position: absolute;
	z-index: 3;
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
	color: #fff;
	line-height: 1;
	transition: color 0.2s ease;
}

.qube-lightbox__close:hover,
.qube-lightbox__nav:hover,
.qube-lightbox__close:focus-visible,
.qube-lightbox__nav:focus-visible {
	color: var(--wp--preset--color--002, #ffd200);
}

.qube-lightbox__close {
	top: 20px;
	right: 30px;
	font-size: 50px;
	width: 50px;
	height: 50px;
}

.qube-lightbox__nav {
	top: 50%;
	transform: translateY(-50%);
	font-size: 70px;
	width: 60px;
	height: 60px;
}

.qube-lightbox__nav--prev {
	left: 20px;
}

.qube-lightbox__nav--next {
	right: 20px;
}

.qube-lightbox__nav[hidden] {
	display: none;
}

/* --> tablet view & smaller */
@media only screen and (max-width: 992px) {
	.qube-lightbox__nav {
		font-size: 45px;
		width: 40px;
		height: 40px;
	}
	.qube-lightbox__nav--prev {
		left: 5px;
	}
	.qube-lightbox__nav--next {
		right: 5px;
	}
	.qube-lightbox__close {
		top: 10px;
		right: 15px;
	}
	.qube-lightbox__image {
		max-height: 65vh;
	}
}
