/* PDF Flipbook — styles */

/* ── Wrapper ──────────────────────────────────────────────────────────── */
.pdf-flipbook-wrapper {
	position: relative;
	width: 100%;
	max-width: 1400px;
	margin: 0 auto 24px;
	background: #1a1a2e;
	border-radius: 6px;
	overflow: hidden;
	box-shadow: 0 4px 24px rgba( 0, 0, 0, 0.4 );
}

.pdf-flipbook-wrapper:focus {
	outline: none;
}

.pdf-flipbook-wrapper:focus-visible {
	outline: 2px solid #6c8ebf;
	outline-offset: 3px;
}

/* ── Loading indicator ────────────────────────────────────────────────── */
.pdf-flipbook-loading {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 320px;
	gap: 16px;
	color: #c8cdd8;
	font-size: 14px;
	padding: 24px;
}

@media ( min-width: 600px ) {
	.pdf-flipbook-loading {
		min-height: 420px;
	}
}

.pdf-flipbook-spinner {
	display: block;
	width: 48px;
	height: 48px;
	border: 4px solid rgba( 255, 255, 255, 0.12 );
	border-top-color: #6c8ebf;
	border-radius: 50%;
	animation: pdf-flipbook-spin 0.75s linear infinite;
	flex-shrink: 0;
}

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

/* ── Progress bar ─────────────────────────────────────────────────────── */
.pdf-flipbook-progress {
	width: 200px;
	max-width: 80%;
	height: 4px;
	appearance: none;
	-webkit-appearance: none;
	border: none;
	border-radius: 2px;
	background: rgba( 255, 255, 255, 0.12 );
	overflow: hidden;
}

.pdf-flipbook-progress::-webkit-progress-bar {
	background: rgba( 255, 255, 255, 0.12 );
	border-radius: 2px;
}

.pdf-flipbook-progress::-webkit-progress-value {
	background: #6c8ebf;
	border-radius: 2px;
	transition: width 0.2s ease;
}

.pdf-flipbook-progress::-moz-progress-bar {
	background: #6c8ebf;
	border-radius: 2px;
}

@media ( prefers-reduced-motion: reduce ) {
	.pdf-flipbook-spinner {
		animation: none;
		border-top-color: #6c8ebf;
		opacity: 0.6;
	}

	.pdf-flipbook-progress::-webkit-progress-value {
		transition: none;
	}
}

/* ── Stage ────────────────────────────────────────────────────────────── */
.pdf-flipbook-stage {
	width: 100%;
	position: relative;
}

/* ── Controls — floating pill, pinned to the bottom-centre of the book ── */
.pdf-flipbook-controls {
	position: absolute;
	bottom: 20px;
	left: 50%;
	transform: translateX( -50% );
	z-index: 10;

	display: inline-flex;
	align-items: center;
	gap: 2px;

	padding: 5px 8px;
	background: rgba( 8, 8, 20, 0.72 );
	backdrop-filter: blur( 12px );
	-webkit-backdrop-filter: blur( 12px );
	border: 1px solid rgba( 255, 255, 255, 0.1 );
	border-radius: 999px;
	box-shadow:
		0 2px 8px rgba( 0, 0, 0, 0.45 ),
		inset 0 1px 0 rgba( 255, 255, 255, 0.06 );

	white-space: nowrap;
}

/* ── Prev / Next buttons ──────────────────────────────────────────────── */
.pdf-flipbook-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	background: transparent;
	border: none;
	border-radius: 50%;
	color: rgba( 255, 255, 255, 0.85 );
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	flex-shrink: 0;
	transition: background 0.15s, color 0.15s;
	/* Minimum 44×44 px touch target (WCAG 2.5.5) */
	min-width: 44px;
	min-height: 44px;
}

.pdf-flipbook-btn:hover {
	background: rgba( 255, 255, 255, 0.12 );
	color: #fff;
}

.pdf-flipbook-btn:active {
	background: rgba( 255, 255, 255, 0.2 );
}

.pdf-flipbook-btn:focus-visible {
	outline: 2px solid #6c8ebf;
	outline-offset: 2px;
}

@media ( prefers-reduced-motion: reduce ) {
	.pdf-flipbook-btn {
		transition: none;
	}
}

/* ── Page counter ─────────────────────────────────────────────────────── */
.pdf-flipbook-page-info {
	padding: 0 12px;
	margin: 0 2px;
	border-left: 1px solid rgba( 255, 255, 255, 0.14 );
	border-right: 1px solid rgba( 255, 255, 255, 0.14 );
	min-width: 56px;
	text-align: center;
	color: rgba( 255, 255, 255, 0.75 );
	font-size: 12px;
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.05em;
	line-height: 34px;
	user-select: none;
}

/* ── Error state ──────────────────────────────────────────────────────── */
.pdf-flipbook-error {
	padding: 24px;
	text-align: center;
	color: #ff7675;
	font-size: 14px;
}

/* ── No-JS fallback ───────────────────────────────────────────────────── */
.pdf-flipbook-noscript {
	padding: 16px;
	text-align: center;
	font-size: 14px;
}

.pdf-flipbook-noscript a {
	color: #6c8ebf;
	text-decoration: underline;
}
