.pfr-wrapper {
	max-width: 100%;
	margin: 24px auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.pfr-container {
	position: relative;
	width: 100%;
	display: flex;
	justify-content: center;
	min-height: 200px;
}

.pfr-book {
	visibility: hidden;
}

.pfr-book.pfr-ready {
	visibility: visible;
}

.pfr-book .stf__parent {
	margin: 0 auto;
}

/* Sombra suave para dar sensação de "livro físico" */
.pfr-book .stf__block {
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

/* Cada página do computador, no modo HTML da biblioteca (loadFromHTML):
   um <img> de verdade preenchendo a página, sem passar por canvas. */
.pfr-page {
	width: 100%;
	height: 100%;
	overflow: hidden;
	background: #fff;
}

.pfr-page img {
	display: block;
	width: 100%;
	height: 100%;
	-webkit-user-select: none;
	user-select: none;
}

/* Visualizador simples de celular: uma página por vez, sem efeito de
   virar página, priorizando nitidez e leveza no navegador do celular. */
.pfr-book.pfr-mobile {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
}

.pfr-page-img {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	border-radius: 4px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
	-webkit-user-select: none;
	user-select: none;
	touch-action: pan-y;
}

.pfr-book.pfr-mobile-fullscreen {
	height: 100% !important;
}

.pfr-wrapper:fullscreen .pfr-page-img {
	max-height: 92vh;
}

.pfr-loading {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	color: #555;
	background: #f5f5f5;
	border-radius: 6px;
	min-height: 200px;
}

.pfr-spinner {
	width: 36px;
	height: 36px;
	border: 4px solid #ddd;
	border-top-color: #444;
	border-radius: 50%;
	animation: pfr-spin 0.9s linear infinite;
}

@keyframes pfr-spin {
	to {
		transform: rotate(360deg);
	}
}

.pfr-loading-text {
	font-size: 14px;
	margin: 0;
}

.pfr-error {
	color: #b00020;
	font-size: 14px;
	padding: 0 16px;
	text-align: center;
}

.pfr-toolbar {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 14px;
	padding: 6px 14px;
	background: #2b2b2b;
	border-radius: 30px;
}

.pfr-btn {
	background: transparent;
	border: none;
	color: #fff;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	padding: 8px 10px;
	border-radius: 50%;
	transition: background 0.15s ease;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.pfr-btn:hover {
	background: rgba(255, 255, 255, 0.15);
}

.pfr-page-indicator {
	color: #fff;
	font-size: 13px;
	min-width: 60px;
	text-align: center;
}

.pfr-wrapper:fullscreen {
	background: #1a1a1a;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.pfr-wrapper:fullscreen .pfr-container {
	max-height: 92vh;
}
