/**
 * RTW Lightbox
 * https://www.restontechwiz.com/
 */

/* ------------------------------------------------------------------
 * Thumbnails that open the lightbox
 * ------------------------------------------------------------------ */
.rtw-lightbox-link,
.rtw-lightbox-link img {
	cursor: zoom-in;
}

/* Hide Divi/Monarch on-image social sharing icons on images that link
 * to a full-size image. The JS class covers everything; the attribute
 * selectors act as a no-JS / pre-JS fallback. */
.rtw-lightbox-link .et_social_media,
.rtw-lightbox-link .et_social_icons_container,
a[href$=".jpg" i] .et_social_media,
a[href$=".jpeg" i] .et_social_media,
a[href$=".png" i] .et_social_media,
a[href$=".gif" i] .et_social_media,
a[href$=".webp" i] .et_social_media,
a[href$=".avif" i] .et_social_media {
	display: none !important;
}

/* ------------------------------------------------------------------
 * Overlay
 * ------------------------------------------------------------------ */
.rtw-lightbox-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 4vh 4vw;
	background: rgba(12, 12, 16, 0.92);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.28s ease, visibility 0.28s ease;
	cursor: zoom-out;
}

.rtw-lightbox-overlay.rtw-lightbox-open {
	opacity: 1;
	visibility: visible;
}

.rtw-lightbox-no-scroll,
.rtw-lightbox-no-scroll body {
	overflow: hidden;
}

/* ------------------------------------------------------------------
 * Image
 * ------------------------------------------------------------------ */
.rtw-lightbox-figure {
	margin: 0;
	line-height: 0;
	transform: scale(0.94);
	transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.25, 1);
}

.rtw-lightbox-open .rtw-lightbox-figure {
	transform: scale(1);
}

.rtw-lightbox-img {
	max-width: min(92vw, 1500px);
	max-height: 88vh;
	width: auto;
	height: auto;
	border-radius: 10px;
	box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
	cursor: default;
}

.rtw-lightbox-loading .rtw-lightbox-img {
	opacity: 0;
}

/* ------------------------------------------------------------------
 * Loading spinner
 * ------------------------------------------------------------------ */
.rtw-lightbox-spinner {
	display: none;
	position: absolute;
	width: 44px;
	height: 44px;
	border: 3px solid rgba(255, 255, 255, 0.25);
	border-top-color: #fff;
	border-radius: 50%;
	animation: rtw-lightbox-spin 0.8s linear infinite;
}

.rtw-lightbox-loading .rtw-lightbox-spinner {
	display: block;
}

@keyframes rtw-lightbox-spin {
	to {
		transform: rotate(360deg);
	}
}

/* ------------------------------------------------------------------
 * Close button
 * ------------------------------------------------------------------ */
.rtw-lightbox-close {
	position: absolute;
	top: max(18px, env(safe-area-inset-top, 18px));
	right: max(18px, env(safe-area-inset-right, 18px));
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	line-height: 1;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.2s ease;
}

.rtw-lightbox-close:hover {
	background: rgba(255, 255, 255, 0.25);
	color: #fff;
	transform: rotate(90deg);
}

.rtw-lightbox-close:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}
