/*!
 * Lightbox UI based on ViewImage.js 2.0.2 by Tokinx.
 * ViewImage is distributed under the MIT License.
 * https://github.com/Tokinx/ViewImage
 */

.xxbxk-lightbox-trigger {
	cursor: zoom-in;
}

.xxbxk-live-photo {
	box-sizing: border-box;
	width: 100%;
	max-width: var(--wp--style--global--content-size, 100%) !important;
	margin: var(--wp--preset--spacing--50, 1.5rem) auto;
}

.xxbxk-live-photo__trigger {
	position: relative;
	display: block;
	width: var(--xxbxk-live-photo-width, 300px);
	max-width: 100%;
	padding: 0;
	overflow: hidden;
	line-height: 0;
	color: inherit;
	background: #111;
	border: 0;
	border-radius: 8px;
	cursor: zoom-in;
}

.xxbxk-live-photo__trigger img {
	display: block;
	width: 100%;
	height: auto;
	margin: 0;
	object-fit: cover;
	transition: transform 240ms cubic-bezier(.2, .7, .2, 1), opacity 180ms ease;
}

.xxbxk-live-photo__trigger--fixed-ratio img {
	height: 100%;
}

.xxbxk-live-photo__trigger:hover img {
	transform: scale(1.015);
	opacity: .94;
}

.xxbxk-live-photo__trigger:focus-visible {
	outline: 3px solid currentColor;
	outline-offset: 4px;
}

.xxbxk-live-photo__badge {
	position: absolute;
	top: 14px;
	left: 14px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 9px;
	color: #fff;
	font: 600 11px/1 system-ui, sans-serif;
	letter-spacing: .08em;
	background: rgba(15, 17, 19, .62);
	border: 1px solid rgba(255, 255, 255, .32);
	border-radius: 999px;
	backdrop-filter: blur(12px);
}

.xxbxk-live-photo__badge-icon {
	width: 11px;
	height: 11px;
	border: 2px solid currentColor;
	border-radius: 50%;
}

.xxbxk-live-photo figcaption {
	width: var(--xxbxk-live-photo-width, 300px);
	max-width: 100%;
	margin-top: .5rem;
	text-align: center;
}

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

.view-image,
.view-image * {
	box-sizing: border-box;
}

.view-image {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: flex;
	flex-direction: column;
	padding: 1rem;
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	animation: view-image-in 300ms;
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
}

.view-image__out {
	animation: view-image-out 300ms;
}

.view-image:focus {
	outline: none;
}

@keyframes view-image-in {
	0% { opacity: 0; }
}

@keyframes view-image-out {
	100% { opacity: 0; }
}

.view-image-container {
	display: flex;
	flex: 1;
	align-items: center;
	justify-content: center;
	height: 0;
}

.view-image-lead {
	display: contents;
}

.view-image-lead img {
	position: relative;
	z-index: 1;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	border-radius: 3px;
}

.view-image-lead__in img,
.view-image-lead__in .view-image-live-player,
.view-image-lead__in .view-image-error {
	animation: view-image-lead-in 300ms;
}

.view-image-lead__out img,
.view-image-lead__out .view-image-live-player,
.view-image-lead__out .view-image-error {
	animation: view-image-lead-out 300ms forwards;
}

@keyframes view-image-lead-in {
	0% {
		opacity: 0;
		transform: translateY(-20px);
	}
}

@keyframes view-image-lead-out {
	100% {
		opacity: 0;
		transform: translateY(20px);
	}
}

.view-image-lead__out ~ .view-image-loading {
	display: block;
}

.view-image-loading {
	position: absolute;
	inset: 50%;
	z-index: 1;
	display: none;
	width: 8rem;
	height: 2rem;
	margin: -1rem -4rem;
	overflow: hidden;
	color: #aab2bd;
	text-align: center;
}

.view-image-loading::after {
	position: absolute;
	inset: 50% 0;
	width: 100%;
	height: 3px;
	content: "";
	background: rgba(255, 255, 255, .5);
	transform: translateX(-100%) translateY(-50%);
	animation: view-image-loading 800ms -100ms ease-in-out infinite;
}

@keyframes view-image-loading {
	0% { transform: translateX(-100%); }
	100% { transform: translateX(100%); }
}

.view-image-close__full {
	position: absolute;
	inset: 0;
	z-index: 0;
	margin: 0;
	background-color: rgba(48, 55, 66, .3);
	cursor: zoom-out;
}

.view-image-tools {
	position: absolute;
	right: 1rem;
	bottom: 5%;
	left: 1rem;
	z-index: 1;
	display: flex;
	align-content: center;
	justify-content: space-between;
	max-width: 600px;
	margin: 0 auto constant(safe-area-inset-bottom);
	margin: 0 auto env(safe-area-inset-bottom);
	padding: 10px;
	color: #fff;
	background: rgba(0, 0, 0, .1);
	border-radius: 5px;
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
}

.view-image-tools__count {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	font-size: 14px;
	font-variant-numeric: tabular-nums;
}

.view-image-tools__count b {
	font-weight: 700;
}

.view-image-tools__flip,
.view-image-tools__actions {
	display: flex;
	align-items: center;
	gap: 10px;
}

.view-image .view-image-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	margin: 0;
	padding: 0;
	color: #fff;
	background-color: rgba(255, 255, 255, .2);
	border: 0;
	border-radius: 3px;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
}

.view-image .view-image-btn:hover {
	background-color: rgba(255, 255, 255, .5);
}

.view-image .view-image-btn:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.view-image .view-image-btn:disabled {
	opacity: .35;
	cursor: default;
}

.view-image .view-image-btn[hidden] {
	display: none !important;
}

.view-image-close:not(.view-image-close__full) {
	margin-right: 10px !important;
	margin-left: 10px !important;
}

.view-image-live-player {
	position: relative;
	z-index: 1;
	flex: none;
	max-width: 100%;
	max-height: 100%;
	overflow: hidden;
	background: rgba(0, 0, 0, .15);
	background-position: center;
	background-repeat: no-repeat;
	background-size: contain;
	border-radius: 3px;
}

.view-image-error {
	position: relative;
	z-index: 1;
	padding: 10px 14px;
	color: #fff;
	font-size: 13px;
	background: rgba(0, 0, 0, .45);
	border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
	.view-image,
	.view-image__out,
	.view-image-lead__in img,
	.view-image-lead__out img,
	.view-image-lead__in .view-image-live-player,
	.view-image-lead__out .view-image-live-player,
	.xxbxk-live-photo__trigger img {
		animation: none;
		transition: none;
	}
}
