.twct-flyer-lightbox-open {
	overflow: hidden;
	overscroll-behavior: none;
}

body.twct-flyer-lightbox-open {
	position: fixed;
	inset-inline: 0;
	top: var(--twct-flyer-scroll-offset, 0);
	width: 100%;
}

.twct-flyer-dialog {
	box-sizing: border-box;
	position: fixed;
	inset: 0;
	width: 100vw;
	max-width: none;
	height: 100vh;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: #141414;
	color: #fefefe;
	overflow: hidden;
	overscroll-behavior: contain;
}

@supports (height: 100dvh) {
	.twct-flyer-dialog {
		width: 100dvw;
		height: 100dvh;
	}
}

.twct-flyer-dialog::backdrop {
	background: rgb(20 20 20 / 0%);
	transition: background-color 260ms ease-out;
}

.twct-flyer-dialog.is-open::backdrop {
	background: rgb(20 20 20 / 92%);
}

.twct-flyer-dialog__frame {
	display: grid;
	grid-template-rows: auto minmax(0, 1fr);
	gap: clamp(0.5rem, 1.5vh, 1rem);
	justify-items: end;
	width: 100%;
	height: 100%;
	box-sizing: border-box;
	padding:
		max(0.75rem, env(safe-area-inset-top))
		max(0.75rem, env(safe-area-inset-right))
		max(0.75rem, env(safe-area-inset-bottom))
		max(0.75rem, env(safe-area-inset-left));
	pointer-events: none;
}

.twct-flyer-dialog__close {
	z-index: 1;
	min-height: 2.75rem;
	padding: 0.5rem 0.875rem;
	border: 2px solid #fefefe;
	border-radius: 0;
	background: #fefefe;
	color: #141414;
	font: 700 1rem/1 "Source Sans 3", "Segoe UI", Arial, sans-serif;
	cursor: pointer;
	pointer-events: auto;
	opacity: 0;
	transform: translateY(-0.5rem);
	transition:
		opacity 180ms ease-out 90ms,
		transform 180ms ease-out 90ms;
}

.twct-flyer-dialog.is-open .twct-flyer-dialog__close {
	opacity: 1;
	transform: translateY(0);
}

.twct-flyer-dialog__close:focus-visible {
	outline: 3px solid #0a8138;
	outline-offset: 3px;
}

.twct-flyer-dialog__image {
	display: block;
	width: auto;
	max-width: 100%;
	height: 100%;
	max-height: 100%;
	margin-inline: auto;
	place-self: center;
	object-fit: contain;
	pointer-events: auto;
	opacity: 0.45;
	transform:
		translate3d(
			var(--twct-flyer-start-x, 0),
			var(--twct-flyer-start-y, 0),
			0
		)
		scale(var(--twct-flyer-start-scale, 0.12));
	transition:
		transform 260ms cubic-bezier(0.22, 1, 0.36, 1),
		opacity 180ms ease-out;
	will-change: transform, opacity;
}

.twct-flyer-dialog.is-open .twct-flyer-dialog__image {
	opacity: 1;
	transform: translate3d(0, 0, 0) scale(1);
}

@media (prefers-reduced-motion: reduce) {
	.twct-flyer-dialog::backdrop,
	.twct-flyer-dialog__close,
	.twct-flyer-dialog__image {
		transition: none;
	}
}
