.lpfb,
.lpfb * {
	box-sizing: border-box;
}

.lpfb {
	--lpfb-accent: #ffffff;
	--lpfb-background: #222429;
	--lpfb-border: rgba(255, 255, 255, 0.16);
	--lpfb-height: 72vh;
	position: relative;
	width: 100%;
	min-width: 0;
	overflow: hidden;
	border: 1px solid var(--lpfb-border);
	border-radius: 10px;
	background: var(--lpfb-background);
	color: #f6f7f7;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 15px;
	line-height: 1.4;
}

.lpfb:focus-visible {
	outline: 3px solid #72aee6;
	outline-offset: 3px;
}

.lpfb__stage {
	position: relative;
	isolation: isolate;
	width: 100%;
	background:
		radial-gradient(circle at 50% 22%, rgba(255, 255, 255, 0.08), transparent 42%),
		var(--lpfb-background);
}

.lpfb__pages {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: clamp(10px, 1.7vw, 24px);
	width: 100%;
	height: var(--lpfb-height);
	min-height: 320px;
	max-height: 900px;
	padding: clamp(14px, 2.5vw, 32px);
	overflow: hidden;
	touch-action: pan-y;
	user-select: none;
	direction: ltr;
}

.lpfb__page {
	position: relative;
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	max-width: 100%;
	max-height: 100%;
	overflow: hidden;
	background: #ffffff;
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.38), 0 2px 7px rgba(0, 0, 0, 0.32);
	line-height: 0;
}

.lpfb__spacer {
	width: 0;
	height: 1px;
	flex: 0 0 0;
	pointer-events: none;
}

.lpfb__page:first-child:not(:only-child) {
	box-shadow: -7px 10px 26px rgba(0, 0, 0, 0.32), 2px 0 3px rgba(0, 0, 0, 0.22);
}

.lpfb__page:last-child:not(:only-child) {
	box-shadow: 7px 10px 26px rgba(0, 0, 0, 0.32), -2px 0 3px rgba(0, 0, 0, 0.22);
}

.lpfb__page::before {
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(100deg, #eeeeee 8%, #ffffff 18%, #eeeeee 33%);
	background-size: 220% 100%;
	content: "";
	animation: lpfb-loading-sheen 1.5s linear infinite;
}

.lpfb__page--rendered::before {
	display: none;
}

.lpfb__page canvas {
	display: block;
	max-width: 100%;
	max-height: 100%;
	background: #ffffff;
}

.lpfb--zoomed .lpfb__pages {
	align-items: flex-start;
	justify-content: flex-start;
	overflow: auto;
	touch-action: pan-x pan-y;
	overscroll-behavior: contain;
	cursor: grab;
}

.lpfb--zoomed .lpfb__pages--dragging {
	cursor: grabbing;
}

.lpfb--zoomed .lpfb__page,
.lpfb--zoomed .lpfb__page canvas {
	max-width: none;
	max-height: none;
}

.lpfb--zoomed .lpfb__page {
	flex: 0 0 auto;
}

.lpfb__message {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 3;
	display: flex;
	max-width: calc(100% - 40px);
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	transform: translate(-50%, -50%);
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 7px;
	background: rgba(15, 16, 19, 0.9);
	box-shadow: 0 5px 20px rgba(0, 0, 0, 0.25);
	color: #ffffff;
	text-align: center;
}

.lpfb__message[hidden] {
	display: none;
}

.lpfb__spinner {
	width: 17px;
	height: 17px;
	flex: 0 0 17px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: lpfb-spinner 0.75s linear infinite;
}

.lpfb__message--error {
	border-color: #d63638;
	background: #3b1718;
}

.lpfb__message--error .lpfb__spinner,
.lpfb__message--password .lpfb__spinner {
	display: none;
}

.lpfb__password-form {
	display: grid;
	grid-template-columns: minmax(140px, 230px) auto;
	gap: 10px;
	width: min(440px, 100%);
}

.lpfb__password-form label {
	grid-column: 1 / -1;
	line-height: 1.35;
}

.lpfb__password-form input {
	width: 100%;
	min-height: 38px;
	padding: 6px 9px;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	background: #ffffff;
	color: #1d2327;
	font: inherit;
}

.lpfb__password-form button {
	min-height: 38px;
	padding: 6px 13px;
	border: 1px solid #ffffff;
	border-radius: 4px;
	background: #ffffff;
	color: #1d2327;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
}

.lpfb__toolbar {
	display: flex;
	min-height: 54px;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 8px 10px;
	border-top: 1px solid var(--lpfb-border);
	background: #17181b;
}

.lpfb__button {
	display: inline-flex;
	width: 38px;
	height: 38px;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.27);
	border-radius: 5px;
	background: transparent;
	color: #ffffff;
	font: inherit;
	cursor: pointer;
}

.lpfb__button > span[aria-hidden="true"] {
	display: block;
	font-size: 30px;
	font-weight: 300;
	line-height: 1;
}

.lpfb[data-direction="rtl"] .lpfb__button > span[aria-hidden="true"] {
	transform: scaleX(-1);
}

.lpfb__button:hover:not(:disabled) {
	border-color: #ffffff;
	background: rgba(255, 255, 255, 0.1);
}

.lpfb__button:focus-visible,
.lpfb__zoom-reset:focus-visible,
.lpfb__download:focus-visible,
.lpfb__password-form input:focus-visible,
.lpfb__password-form button:focus-visible {
	outline: 3px solid #72aee6;
	outline-offset: 2px;
}

.lpfb__button:disabled {
	opacity: 0.35;
	cursor: default;
}

.lpfb__page-status {
	min-width: 145px;
	padding: 0 7px;
	color: #f0f0f1;
	font-variant-numeric: tabular-nums;
	text-align: center;
}

.lpfb__zoom-controls {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	margin-inline-start: 8px;
}

.lpfb__zoom-reset {
	min-width: 58px;
	height: 38px;
	padding: 0 7px;
	border: 1px solid rgba(255, 255, 255, 0.27);
	border-radius: 5px;
	background: transparent;
	color: #ffffff;
	font: inherit;
	font-size: 12px;
	font-variant-numeric: tabular-nums;
	cursor: pointer;
}

.lpfb__zoom-reset:hover:not(:disabled) {
	border-color: #ffffff;
	background: rgba(255, 255, 255, 0.1);
}

.lpfb__zoom-reset:disabled {
	opacity: 0.6;
	cursor: default;
}

.lpfb__download {
	margin-inline-start: auto;
	padding: 7px 11px;
	border: 1px solid rgba(255, 255, 255, 0.27);
	border-radius: 5px;
	color: #ffffff;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
}

.lpfb__download:hover {
	border-color: #ffffff;
	background: rgba(255, 255, 255, 0.1);
	color: #ffffff;
}

.lpfb__noscript {
	margin: 0;
	padding: 10px;
	text-align: center;
}

.lpfb__noscript a {
	color: #ffffff;
}

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

.lpfb--configuration-error {
	padding: 16px;
	border-color: #d63638;
	background: #fcf0f1;
	color: #8a2424;
}

.lpfb-editor-placeholder {
	display: flex;
	min-height: 210px;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 13px;
	padding: 28px;
	border: 1px solid #c3c4c7;
	border-radius: 8px;
	background: #f6f7f7;
	color: #1d2327;
	text-align: center;
}

.lpfb-editor-placeholder > .dashicons {
	width: 42px;
	height: 42px;
	font-size: 42px;
}

.lpfb-editor-placeholder__title {
	font-size: 17px;
}

.lpfb-editor-placeholder__actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

.lpfb-editor-placeholder .components-notice {
	width: min(520px, 100%);
	margin: 0;
	text-align: start;
}

@keyframes lpfb-spinner {
	to {
		transform: rotate(360deg);
	}
}

@keyframes lpfb-loading-sheen {
	to {
		background-position-x: -220%;
	}
}

@media (max-width: 720px) {
	.lpfb__pages {
		min-height: 280px;
		padding: 14px;
	}

	.lpfb__page-status {
		min-width: 105px;
		font-size: 13px;
	}

	.lpfb__download {
		padding-inline: 8px;
		font-size: 12px;
	}

	.lpfb__zoom-controls {
		margin-inline-start: 2px;
	}
}

@media (max-width: 480px) {
	.lpfb__toolbar {
		flex-wrap: wrap;
	}

	.lpfb__download {
		width: 100%;
		margin-inline-start: 0;
		text-align: center;
	}

	.lpfb__zoom-controls {
		margin-inline-start: 0;
	}

	.lpfb__password-form {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	.lpfb__spinner,
	.lpfb__page::before {
		animation: none;
	}
}
