/* Leitor de jornal (O Estafeta). As cores vêm da paleta do tema (com valores de reserva). */

/* Sem JavaScript, só o botão de baixar o PDF aparece. */
.fcr-leitor:not(.js) .fcr-leitor__palco,
.fcr-leitor:not(.js) .fcr-leitor__indicador,
.fcr-leitor:not(.js) .fcr-leitor__botao:not(.fcr-leitor__botao--principal) {
	display: none;
}

.fcr-leitor {
	--fcr-l-tinta: var(--wp--preset--color--tinta, #212121);
	--fcr-l-cinza: var(--wp--preset--color--cinza, #5f5f5f);
	--fcr-l-claro: var(--wp--preset--color--cinza-claro, #e9e9e6);
	--fcr-l-branco: var(--wp--preset--color--branco, #fff);
	margin-block: 2rem;
	background: var(--fcr-l-branco);
	border: 1px solid var(--fcr-l-claro);
}

.fcr-leitor__barra {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem 1rem;
	padding: 0.6rem 0.75rem;
	border-bottom: 1px solid var(--fcr-l-claro);
}

.fcr-leitor__grupo {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem;
}

.fcr-leitor__botao {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	min-width: 2.75rem;
	min-height: 2.75rem;
	padding: 0 0.8rem;
	font: inherit;
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--fcr-l-tinta);
	background: var(--fcr-l-branco);
	border: 2px solid var(--fcr-l-tinta);
	border-radius: 2px;
	cursor: pointer;
	text-decoration: none;
}

.fcr-leitor__botao:hover:not(:disabled) {
	background: var(--fcr-l-claro);
}

.fcr-leitor__botao:disabled {
	opacity: 0.35;
	cursor: default;
}

.fcr-leitor__botao--principal {
	color: var(--fcr-l-branco);
	background: var(--fcr-l-tinta);
}

.fcr-leitor__botao--principal:hover:not(:disabled) {
	color: var(--fcr-l-branco);
	background: var(--fcr-l-cinza);
}

.fcr-leitor__botao:focus-visible,
.fcr-leitor__palco:focus-visible {
	outline: 3px solid #1a5fb4;
	outline-offset: 2px;
}

.fcr-leitor__botao svg {
	width: 1.25rem;
	height: 1.25rem;
	flex: none;
}

.fcr-leitor__rotulo {
	/* Texto dos botões: some em telas pequenas, onde só o ícone aparece (o nome continua para leitores de tela). */
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

@media (min-width: 640px) {
	.fcr-leitor__botao--texto .fcr-leitor__rotulo {
		position: static;
		width: auto;
		height: auto;
		overflow: visible;
		clip: auto;
	}
}

.fcr-leitor__indicador {
	min-width: 11rem;
	text-align: center;
	font-weight: 600;
	font-size: 0.9375rem;
	color: var(--fcr-l-tinta);
}

.fcr-leitor__palco {
	position: relative;
	display: flex;
	overflow: auto;
	min-height: 60vh;
	padding: 12px;
	background: var(--fcr-l-claro);
	touch-action: pan-y pinch-zoom;
	overscroll-behavior: contain;
}

.fcr-leitor__palco.is-arrastando {
	cursor: grabbing;
	user-select: none;
}

.fcr-leitor.is-ampliado .fcr-leitor__palco {
	cursor: grab;
	max-height: 85vh;
}

.fcr-leitor__folhas {
	display: flex;
	justify-content: center;
	align-items: flex-start;
	gap: 4px;
	margin: 0 auto;
	opacity: 1;
	transform: none;
	transition: opacity 0.22s ease, transform 0.22s ease;
}

.fcr-leitor__folhas.is-troca {
	opacity: 0;
	transform: translateX(calc(var(--dir, 1) * 28px));
	transition: none;
}

.fcr-leitor__folha {
	display: block;
	flex: none;
	background: var(--fcr-l-branco);
	box-shadow: 0 6px 18px rgb(0 0 0 / 0.18);
}

.fcr-leitor.is-carregando .fcr-leitor__palco {
	cursor: progress;
}

.fcr-leitor__estado {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 1rem;
	text-align: center;
	font-weight: 600;
	color: var(--fcr-l-tinta);
	pointer-events: none;
}

.fcr-leitor__estado[hidden] {
	display: none;
}

.fcr-leitor__estado.is-erro {
	pointer-events: auto;
}

.fcr-leitor__texto {
	/* Texto das páginas visíveis, só para leitores de tela. */
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: pre-wrap;
}

/* Tela cheia */
.fcr-leitor.is-tela-cheia {
	display: flex;
	flex-direction: column;
	margin: 0;
	border: 0;
	background: var(--fcr-l-branco);
}

.fcr-leitor.is-tela-cheia .fcr-leitor__palco {
	flex: 1 1 auto;
	max-height: none;
	min-height: 0;
}

@media (prefers-reduced-motion: reduce) {
	.fcr-leitor__folhas {
		transition: none;
	}
}

@media print {
	.fcr-leitor {
		display: none;
	}
}
