/* Treffers PDF Viewer – v1.0.0 */
.tpdf {
	--tpdf-accent: #d0021b;
	--tpdf-ink: #111;
	--tpdf-muted: #6b6b6b;
	--tpdf-line: #e6e6e6;
	--tpdf-stage: #1a1a1a;
	position: relative;
	width: 100%;
	color: var(--tpdf-ink);
	font-family: inherit;
}

/* Header */
.tpdf__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 18px;
}
.tpdf__eyebrow {
	display: inline-block;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--tpdf-accent);
	margin-bottom: 6px;
}
.tpdf__title {
	margin: 0;
	font-size: clamp(22px, 3vw, 32px);
	line-height: 1.15;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .02em;
}
.tpdf__sub {
	margin: 6px 0 0;
	color: var(--tpdf-muted);
	font-size: 15px;
}
.tpdf__actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

/* Buttons */
.tpdf__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	border: 1px solid var(--tpdf-line);
	border-radius: 4px;
	background: #fff;
	color: var(--tpdf-ink);
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	text-decoration: none;
	line-height: 1;
	cursor: pointer;
	transition: background .2s, color .2s, border-color .2s;
}
.tpdf__btn:hover,
.tpdf__btn:focus-visible {
	border-color: var(--tpdf-ink);
	color: var(--tpdf-ink);
}
.tpdf__btn--primary {
	background: var(--tpdf-accent);
	border-color: var(--tpdf-accent);
	color: #fff;
}
.tpdf__btn--primary:hover,
.tpdf__btn--primary:focus-visible {
	background: #a80016;
	border-color: #a80016;
	color: #fff;
}

/* Stage */
.tpdf__stage {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 420px;
	padding: 28px 64px;
	border-radius: 6px;
	background: var(--tpdf-stage);
	background-image: radial-gradient(circle at 50% 0%, rgba(255,255,255,.06), transparent 60%);
	overflow: hidden;
	outline: none;
}
.tpdf__stage:focus-visible {
	box-shadow: 0 0 0 3px var(--tpdf-accent);
}
.tpdf__pages {
	display: flex;
	justify-content: center;
	align-items: center;
	width: 100%;
	opacity: 0;
	transition: opacity .3s ease;
}
.tpdf.is-ready .tpdf__pages {
	opacity: 1;
}
.tpdf__page {
	display: block;
	background: #fff;
	box-shadow: 0 10px 30px rgba(0,0,0,.45);
	animation: tpdf-in .3s ease;
}
.tpdf__pages.is-spread .tpdf__page:first-child {
	box-shadow: -6px 10px 30px rgba(0,0,0,.45), inset -14px 0 18px -14px rgba(0,0,0,.35);
}
.tpdf__pages.is-spread .tpdf__page:last-child {
	box-shadow: 6px 10px 30px rgba(0,0,0,.45);
}
@keyframes tpdf-in {
	from { opacity: .4; }
	to   { opacity: 1; }
}

/* Arrows */
.tpdf__nav {
	position: absolute;
	top: 50%;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin-top: -22px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255,255,255,.12);
	color: #fff;
	cursor: pointer;
	transition: background .2s, opacity .2s;
}
.tpdf__nav--prev { left: 12px; }
.tpdf__nav--next { right: 12px; }
.tpdf__nav:hover:not(:disabled),
.tpdf__nav:focus-visible {
	background: var(--tpdf-accent);
}
.tpdf__nav:disabled {
	opacity: .25;
	cursor: default;
}

/* Bottom bar */
.tpdf__bar {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-top: 12px;
	font-size: 13px;
	color: var(--tpdf-muted);
}
.tpdf__count {
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}
.tpdf__progress {
	flex: 1;
	height: 3px;
	border-radius: 2px;
	background: var(--tpdf-line);
	overflow: hidden;
}
.tpdf__progress span {
	display: block;
	width: 0;
	height: 100%;
	background: var(--tpdf-accent);
	transition: width .3s ease;
}

/* Loader & error */
.tpdf__loader,
.tpdf__error {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	color: #fff;
	font-size: 14px;
}
.tpdf.is-ready .tpdf__loader,
.tpdf.is-error .tpdf__loader {
	display: none;
}
.tpdf__spinner {
	width: 34px;
	height: 34px;
	border: 3px solid rgba(255,255,255,.2);
	border-top-color: var(--tpdf-accent);
	border-radius: 50%;
	animation: tpdf-spin .8s linear infinite;
}
@keyframes tpdf-spin {
	to { transform: rotate(360deg); }
}
.tpdf__error {
	display: none;
	text-align: center;
	padding: 20px;
}
.tpdf__error p { margin: 0; }
.tpdf.is-error .tpdf__error { display: flex; }
.tpdf.is-error .tpdf__nav,
.tpdf.is-error .tpdf__bar { display: none; }

/* Fullscreen */
.tpdf.is-fs {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	flex-direction: column;
	padding: 16px 20px;
	background: #fff;
}
.tpdf.is-fs .tpdf__head { margin-bottom: 12px; }
.tpdf.is-fs .tpdf__stage {
	flex: 1;
	min-height: 0;
	border-radius: 0;
}
html.tpdf-lock,
html.tpdf-lock body {
	overflow: hidden;
}

.tpdf__noscript {
	margin: 0;
	padding: 16px;
}

/* Mobile */
@media (max-width: 767px) {
	.tpdf__head { align-items: flex-start; }
	.tpdf__actions { width: 100%; }
	.tpdf__actions .tpdf__btn { flex: 1; justify-content: center; }
	.tpdf__stage {
		min-height: 300px;
		padding: 16px 12px 56px;
	}
	.tpdf__nav {
		top: auto;
		bottom: 8px;
		margin-top: 0;
		width: 40px;
		height: 40px;
	}
	.tpdf__nav--prev { left: calc(50% - 48px); }
	.tpdf__nav--next { right: calc(50% - 48px); }
}

@media (prefers-reduced-motion: reduce) {
	.tpdf__pages,
	.tpdf__page,
	.tpdf__progress span { transition: none; animation: none; }
}
