.tonioni-pdf-flipbook {
	--tpff-control-background: #ffffff;
	--tpff-control-color: #1d2327;
	--tpff-control-border: #c3c4c7;
	--tpff-control-hover: #f0f0f1;
	--tpff-focus: #72aee6;
	box-sizing: border-box;
	width: 100%;
	margin-block: 1.5rem;
	background-color: transparent;
}

.tonioni-pdf-flipbook *,
.tonioni-pdf-flipbook *::before,
.tonioni-pdf-flipbook *::after {
	box-sizing: border-box;
}

.tonioni-pdf-flipbook__viewport {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: clamp(12px, 2.5vw, 32px);
	overflow: hidden;
	background-color: inherit;
	border-radius: 4px;
}

.tonioni-pdf-flipbook__stage {
	position: relative;
	width: 100%;
	max-width: 1100px;
	aspect-ratio: var(--tpff-spread-ratio);
	perspective: 2600px;
	-webkit-perspective: 2600px;
	touch-action: pan-y pinch-zoom;
	cursor: default;
	outline: 0;
}

.tonioni-pdf-flipbook__stage.is-cursor-previous {
	cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='14' fill='%231d2327' fill-opacity='.9'/%3E%3Cpath d='M18.5 9.5 12 16l6.5 6.5M12.5 16H23' fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") 16 16, w-resize;
}

.tonioni-pdf-flipbook__stage.is-cursor-next {
	cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='14' fill='%231d2327' fill-opacity='.9'/%3E%3Cpath d='m13.5 9.5 6.5 6.5-6.5 6.5M9 16h10.5' fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") 16 16, e-resize;
}

@supports not (aspect-ratio: 1 / 1) {
	.tonioni-pdf-flipbook__stage {
		height: 0;
		padding-top: var(--tpff-spread-padding);
	}
}

.tonioni-pdf-flipbook__stage:focus-visible {
	outline: 3px solid var(--tpff-focus);
	outline-offset: 4px;
}

.tonioni-pdf-flipbook__static {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	inset: 0;
	display: flex;
	width: 100%;
	height: 100%;
}

.tonioni-pdf-flipbook__panel,
.tonioni-pdf-flipbook__face {
	position: relative;
	width: 50%;
	height: 100%;
	overflow: hidden;
	background: #fff;
}

.tonioni-pdf-flipbook__panel--left {
	box-shadow: -10px 10px 24px rgba(0, 0, 0, 0.26), inset -10px 0 18px -16px rgba(0, 0, 0, 0.75);
}

.tonioni-pdf-flipbook__panel--right {
	box-shadow: 10px 10px 24px rgba(0, 0, 0, 0.26), inset 10px 0 18px -16px rgba(0, 0, 0, 0.75);
}

.tonioni-pdf-flipbook__panel.is-blank,
.tonioni-pdf-flipbook__face.is-blank {
	background: rgba(255, 255, 255, 0.06);
	box-shadow: none;
}

.tonioni-pdf-flipbook__image {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: contain;
	background: #fff;
	-webkit-user-drag: none;
	user-select: none;
}

.tonioni-pdf-flipbook__flipper {
	position: absolute;
	z-index: 5;
	top: 0;
	left: 50%;
	display: none;
	width: 50%;
	height: 100%;
	transform-origin: left center;
	transform-style: preserve-3d;
	-webkit-transform-style: preserve-3d;
	pointer-events: none;
}

.tonioni-pdf-flipbook__face {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	inset: 0;
	width: 100%;
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
	box-shadow: 8px 8px 24px rgba(0, 0, 0, 0.3);
}

.tonioni-pdf-flipbook__face--back {
	transform: rotateY(180deg);
}

.tonioni-pdf-flipbook.is-turning-next .tonioni-pdf-flipbook__flipper,
.tonioni-pdf-flipbook.is-turning-previous .tonioni-pdf-flipbook__flipper,
.tonioni-pdf-flipbook.is-single-turning-next .tonioni-pdf-flipbook__flipper,
.tonioni-pdf-flipbook.is-single-turning-previous .tonioni-pdf-flipbook__flipper {
	display: block;
}

.tonioni-pdf-flipbook.is-turning-next .tonioni-pdf-flipbook__flipper {
	animation: tonioni-pdf-flipbook-turn-next 680ms cubic-bezier(0.42, 0, 0.2, 1) both;
}

.tonioni-pdf-flipbook.is-turning-previous .tonioni-pdf-flipbook__flipper {
	animation: tonioni-pdf-flipbook-turn-previous 680ms cubic-bezier(0.42, 0, 0.2, 1) both;
}

@keyframes tonioni-pdf-flipbook-turn-next {
	0% {
		transform: rotateY(0deg);
	}
	45% {
		box-shadow: -18px 10px 30px rgba(0, 0, 0, 0.22);
	}
	100% {
		transform: rotateY(-180deg);
	}
}

@keyframes tonioni-pdf-flipbook-turn-previous {
	0% {
		transform: rotateY(-180deg);
	}
	55% {
		box-shadow: 18px 10px 30px rgba(0, 0, 0, 0.22);
	}
	100% {
		transform: rotateY(0deg);
	}
}

.tonioni-pdf-flipbook__controls {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0;
	min-height: 52px;
	padding-top: 10px;
}

.tonioni-pdf-flipbook__controls > .tonioni-pdf-flipbook__button,
.tonioni-pdf-flipbook__controls > .tonioni-pdf-flipbook__status {
	margin-right: 4px;
	margin-left: 4px;
}

.tonioni-pdf-flipbook__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	min-width: 44px;
	min-height: 44px;
	margin: 0;
	padding: 0;
	color: var(--tpff-control-color);
	font: inherit;
	font-size: 30px;
	font-weight: 400;
	line-height: 1;
	background: var(--tpff-control-background);
	border: 1px solid var(--tpff-control-border);
	border-radius: 4px;
	box-shadow: none;
	cursor: pointer;
	appearance: none;
}

.tonioni-pdf-flipbook__button:hover:not(:disabled),
.tonioni-pdf-flipbook__button:focus-visible {
	color: var(--tpff-control-color);
	background: var(--tpff-control-hover);
	border-color: #8c8f94;
}

.tonioni-pdf-flipbook__button:focus-visible {
	outline: 3px solid var(--tpff-focus);
	outline-offset: 2px;
}

.tonioni-pdf-flipbook__button:disabled {
	opacity: 0.38;
	cursor: default;
}

.tonioni-pdf-flipbook__status {
	min-width: 94px;
	padding-inline: 8px;
	color: inherit;
	font-size: 14px;
	font-variant-numeric: tabular-nums;
	line-height: 1.25;
	text-align: center;
}

.tonioni-pdf-flipbook__status--visually-hidden {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

.tonioni-pdf-flipbook__fullscreen {
	margin-left: 12px;
	font-size: 21px;
}

.tonioni-pdf-flipbook__controls > .tonioni-pdf-flipbook__fullscreen {
	margin-left: 12px;
}

.tonioni-pdf-flipbook__fullscreen svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.tonioni-pdf-flipbook__fullscreen > .tonioni-pdf-flipbook__fullscreen-open {
	display: block;
}

.tonioni-pdf-flipbook__fullscreen > .tonioni-pdf-flipbook__fullscreen-close {
	display: none;
}

.tonioni-pdf-flipbook.is-fullscreen .tonioni-pdf-flipbook__fullscreen-open {
	display: none;
}

.tonioni-pdf-flipbook.is-fullscreen .tonioni-pdf-flipbook__fullscreen-close {
	display: block;
}

.tonioni-pdf-flipbook:fullscreen,
.tonioni-pdf-flipbook:-webkit-full-screen {
	display: flex;
	flex-direction: column;
	justify-content: center;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 14px;
	overflow: auto;
	color: #fff;
	background-color: inherit;
}

.tonioni-pdf-flipbook:fullscreen .tonioni-pdf-flipbook__viewport,
.tonioni-pdf-flipbook:-webkit-full-screen .tonioni-pdf-flipbook__viewport {
	flex: 1 1 auto;
	min-height: 0;
	padding: 8px;
}

.tonioni-pdf-flipbook:fullscreen .tonioni-pdf-flipbook__stage,
.tonioni-pdf-flipbook:-webkit-full-screen .tonioni-pdf-flipbook__stage {
	max-width: min(100%, 1400px);
}

.tonioni-pdf-flipbook__error {
	padding: 1rem;
	color: #8a2424;
	background: #fcf0f1;
	border-left: 4px solid #d63638;
}

@media (max-width: 782px) {
	.tonioni-pdf-flipbook__viewport {
		padding: 12px;
	}

	.tonioni-pdf-flipbook__stage {
		max-width: 700px;
		aspect-ratio: var(--tpff-page-ratio);
	}

	@supports not (aspect-ratio: 1 / 1) {
		.tonioni-pdf-flipbook__stage {
			padding-top: var(--tpff-page-padding);
		}
	}

	.tonioni-pdf-flipbook__panel--left {
		display: none;
	}

	.tonioni-pdf-flipbook__panel--right {
		width: 100%;
		box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
	}

	.tonioni-pdf-flipbook__flipper {
		left: 0;
		width: 100%;
	}

	.tonioni-pdf-flipbook.is-single-turning-next .tonioni-pdf-flipbook__flipper {
		transform-origin: left center;
		animation: tonioni-pdf-flipbook-single-next 620ms cubic-bezier(0.42, 0, 0.2, 1) both;
	}

	.tonioni-pdf-flipbook.is-single-turning-previous .tonioni-pdf-flipbook__flipper {
		transform-origin: right center;
		animation: tonioni-pdf-flipbook-single-previous 620ms cubic-bezier(0.42, 0, 0.2, 1) both;
	}

	.tonioni-pdf-flipbook__status {
		min-width: 78px;
	}

	.tonioni-pdf-flipbook__controls > .tonioni-pdf-flipbook__fullscreen {
		margin-left: 4px;
	}
}

@keyframes tonioni-pdf-flipbook-single-next {
	0% {
		transform: rotateY(0deg);
		opacity: 1;
	}
	100% {
		transform: rotateY(-105deg);
		opacity: 0;
	}
}

@keyframes tonioni-pdf-flipbook-single-previous {
	0% {
		transform: rotateY(0deg);
		opacity: 1;
	}
	100% {
		transform: rotateY(105deg);
		opacity: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tonioni-pdf-flipbook__flipper {
		animation-duration: 1ms !important;
	}
}

@media print {
	.tonioni-pdf-flipbook__controls {
		display: none;
	}

	.tonioni-pdf-flipbook__viewport {
		padding: 0;
		background: transparent;
	}
}
