/*! UG Lightbox v1.1.0 */
.ugl-zoomable { cursor: zoom-in; }
.ugl-zoomable:focus-visible { outline: 3px solid #4f9cf9; outline-offset: 3px; }

html.ugl-lock, html.ugl-lock body { overflow: hidden !important; }

.ugl-root {
	position: fixed; inset: 0; z-index: 2147483000;
	display: block; outline: none;
	-webkit-tap-highlight-color: transparent;
	font-family: inherit;
}
.ugl-root[hidden] { display: none !important; }

.ugl-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .88); }

.ugl-stage {
	position: absolute; inset: 0;
	display: flex; align-items: center; justify-content: center;
	padding: 64px 84px; box-sizing: border-box;
}
.ugl-figure {
	margin: 0 !important; padding: 0;
	display: flex; flex-direction: column; align-items: center;
	max-width: 100%; max-height: 100%;
	will-change: transform, opacity;
}
.ugl-root .ugl-img {
	display: block;
	width: auto !important; height: auto !important;
	max-width: 100% !important;
	max-height: calc(100vh - 170px);
	max-height: calc(100dvh - 170px);
	object-fit: contain;
	margin: 0; padding: 0; border: 0;
	border-radius: 4px;
	box-shadow: 0 24px 70px rgba(0, 0, 0, .45);
	user-select: none; -webkit-user-select: none; -webkit-user-drag: none;
	will-change: transform;
}
.ugl-caption {
	color: #fff; margin: 14px 0 0; padding: 0;
	font-size: 14px; line-height: 1.7; text-align: center;
	max-width: 820px; text-shadow: 0 1px 3px rgba(0, 0, 0, .5);
}
.ugl-caption:empty { display: none; }

.ugl-ui { position: absolute; inset: 0; pointer-events: none; }
.ugl-ui > * { pointer-events: auto; }

.ugl-root .ugl-btn {
	position: absolute;
	appearance: none; -webkit-appearance: none;
	display: flex; align-items: center; justify-content: center;
	width: 48px; height: 48px; min-width: 0; min-height: 0;
	margin: 0; padding: 0; border: 0; border-radius: 50%;
	background: rgba(255, 255, 255, .12);
	color: #fff; cursor: pointer; line-height: 1;
	box-shadow: none; text-shadow: none;
	-webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
	transition: background .2s, opacity .2s, transform .2s;
}
.ugl-root .ugl-btn:hover { background: rgba(255, 255, 255, .24); }
.ugl-root .ugl-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.ugl-root .ugl-btn:disabled { opacity: .25; cursor: default; }
.ugl-root .ugl-btn svg { display: block; }

.ugl-close { top: 16px; right: 16px; }
.ugl-prev { left: 18px; top: 50%; margin-top: -24px !important; }
.ugl-next { right: 18px; top: 50%; margin-top: -24px !important; }

.ugl-counter {
	position: absolute; top: 28px; left: 24px;
	color: rgba(255, 255, 255, .85);
	font-size: 14px; letter-spacing: .08em;
	font-variant-numeric: tabular-nums;
}
.ugl-single .ugl-prev, .ugl-single .ugl-next, .ugl-single .ugl-counter,
.ugl-no-counter .ugl-counter { display: none; }

.ugl-spinner {
	position: absolute; left: 50%; top: 50%;
	width: 40px; height: 40px; margin: -20px 0 0 -20px;
	border: 3px solid rgba(255, 255, 255, .25); border-top-color: #fff;
	border-radius: 50%; box-sizing: border-box;
	animation: ugl-spin .8s linear infinite;
	opacity: 0; transition: opacity .2s; pointer-events: none;
}
.ugl-loading .ugl-spinner { opacity: 1; }
@keyframes ugl-spin { to { transform: rotate(360deg); } }

@media (max-width: 640px) {
	.ugl-stage { padding: 60px 10px 84px; }
	.ugl-root .ugl-img { max-height: calc(100vh - 190px); max-height: calc(100dvh - 190px); }
	.ugl-prev, .ugl-next { top: auto; bottom: 18px; margin-top: 0 !important; }
	.ugl-prev { left: calc(50% - 64px); }
	.ugl-next { right: calc(50% - 64px); }
}
