/*
 * Full-screen PDF.js flip-book reader — replaces the old ISSUU.com embed for the
 * Infofolder. Own single-page turn effect built with a plain two-sided CSS 3D flip
 * (front/back <canvas> faces rotated via transform, no external page-flip library),
 * consistent with this plugin's established preference for dependency-free effects
 * (see ac-start-hero.css's hexagon background replacing particles.js).
 */

.ac-pdf-reader {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	flex-direction: column;
	background: rgba( 10, 10, 10, 0.94 );
}

.ac-pdf-reader[hidden] {
	display: none;
}

.ac-pdf-reader-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 16px 24px;
	color: #fff;
	font-family: 'Montserrat', sans-serif;
	flex-shrink: 0;
}

.ac-pdf-reader-title {
	font-weight: 700;
	font-size: 1rem;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ac-pdf-reader-page-info {
	font-size: 0.9rem;
	color: rgba( 255, 255, 255, 0.7 );
	font-variant-numeric: tabular-nums;
	flex-shrink: 0;
}

.ac-pdf-reader-close {
	flex-shrink: 0;
	width: 36px;
	height: 36px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: rgba( 255, 255, 255, 0.1 ) !important;
	color: #fff !important;
	border: none !important;
	border-radius: 50%;
	cursor: pointer;
	transition: background-color 0.2s;
}

.ac-pdf-reader-close:hover,
.ac-pdf-reader-close:focus {
	background: rgba( 255, 255, 255, 0.22 ) !important;
}

.ac-pdf-reader-close svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
}

.ac-pdf-reader-stage {
	flex: 1;
	min-height: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	padding: 10px 20px 30px;
}

.ac-pdf-reader-nav {
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: rgba( 255, 255, 255, 0.1 ) !important;
	color: #fff !important;
	border: none !important;
	border-radius: 50%;
	cursor: pointer;
	transition: background-color 0.2s, opacity 0.2s;
}

.ac-pdf-reader-nav:hover,
.ac-pdf-reader-nav:focus {
	background: rgba( 255, 255, 255, 0.22 ) !important;
}

.ac-pdf-reader-nav:disabled {
	opacity: 0.3;
	cursor: default;
}

.ac-pdf-reader-nav svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
}

.ac-pdf-reader-book {
	position: relative;
	max-width: 90vw;
	max-height: 100%;
	background: #fff;
	box-shadow: 0 20px 60px rgba( 0, 0, 0, 0.5 );
	perspective: 2400px;
}

.ac-pdf-reader-loading {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 240px;
	min-height: 320px;
	color: #888;
	font-family: 'Amiko', sans-serif;
	font-size: 0.95rem;
}

.ac-pdf-reader-book.is-loaded .ac-pdf-reader-loading {
	display: none;
}

.ac-pdf-reader-canvas {
	display: block;
	max-width: 90vw;
	max-height: 82vh;
}

/* Base (resting) page — always shows the currently active page. */
.ac-pdf-reader-canvas-base {
	position: relative;
}

/* The animated flip layer: two opposite canvas faces rotated in 3D. Hidden except
   during an active page turn. */
.ac-pdf-reader-flip {
	position: absolute;
	inset: 0;
	transform-style: preserve-3d;
	transform-origin: left center;
	pointer-events: none;
}

.ac-pdf-reader-flip[hidden] {
	display: none;
}

.ac-pdf-reader-flip.ac-flip-animate {
	transition: transform 0.7s cubic-bezier( 0.45, 0.05, 0.55, 0.95 );
}

.ac-pdf-reader-flip-face {
	position: absolute;
	inset: 0;
	backface-visibility: hidden;
}

.ac-pdf-reader-flip-face canvas {
	display: block;
	width: 100%;
	height: 100%;
}

.ac-pdf-reader-flip-back {
	transform: rotateY( 180deg );
}

.ac-pdf-reader-flip.ac-flip-origin-right {
	transform-origin: right center;
}

.ac-pdf-reader-flip.ac-flip-to-next {
	transform: rotateY( -180deg );
}

.ac-pdf-reader-flip.ac-flip-to-prev {
	transform: rotateY( 180deg );
}

@media ( prefers-reduced-motion: reduce ) {
	.ac-pdf-reader-flip.ac-flip-animate {
		transition-duration: 0.01ms;
	}
}

@media ( max-width: 640px ) {
	.ac-pdf-reader-nav {
		width: 36px;
		height: 36px;
	}

	.ac-pdf-reader-title {
		max-width: 45vw;
	}
}
