/* Zeedustra PDF-lezer – colours follow the site tokens, with fallbacks. */
html.zdpl-open, html.zdpl-open body { overflow: hidden; }

.zdpl {
	position: fixed; inset: 0; z-index: 100000;
	display: flex; flex-direction: column;
	background: rgba(20, 24, 30, .94);
	color: #fff;
	font-family: inherit;
}
.zdpl[hidden] { display: none; }

.zdpl__bar {
	display: flex; align-items: center; justify-content: space-between; gap: 1.2rem;
	padding: 1rem 1.6rem; min-height: 6.4rem;
	background: var(--zd-ink, #1b2129);
	box-shadow: 0 1px 0 rgba(255, 255, 255, .08);
}
.zdpl__head { min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.zdpl__title { font-weight: 700; font-size: 1.7rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zdpl__count { font-size: 1.3rem; opacity: .7; font-variant-numeric: tabular-nums; }

.zdpl__tools { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; }
.zdpl__btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
	min-width: 4.2rem; height: 4.2rem; padding: 0 1rem;
	border: 0; border-radius: 99rem; cursor: pointer;
	background: rgba(255, 255, 255, .1); color: #fff;
	font: inherit; font-size: 1.45rem; font-weight: 600; text-decoration: none;
	transition: background .2s ease;
}
.zdpl__btn:hover, .zdpl__btn:focus-visible { background: rgba(255, 255, 255, .2); color: #fff; }
.zdpl__btn:focus-visible { outline: 3px solid var(--zd-primary, #bf4d28); outline-offset: 2px; }
.zdpl__btn:disabled { opacity: .35; cursor: default; }
.zdpl__btn svg { width: 2rem; height: 2rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.zdpl__btn--text { padding: 0 1.6rem; background: var(--zd-primary, #bf4d28); }
.zdpl__btn--text:hover, .zdpl__btn--text:focus-visible { background: var(--zd-primary-dark, #9c3c1d); }
.zdpl__btn--close { margin-left: .4rem; }

.zdpl__scroller { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.zdpl__pages { display: flex; flex-direction: column; align-items: center; gap: 1.6rem; padding: 2.4rem 3.2rem 6rem; min-width: min-content; }
.zdpl__page {
	background: #fff; border-radius: .4rem; flex-shrink: 0;
	box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .6);
	background-image: linear-gradient(90deg, #f3efe8 0, #fbf9f5 50%, #f3efe8 100%);
	background-size: 200% 100%; animation: zdpl-shimmer 1.4s linear infinite;
}
.zdpl__page:has(canvas) { animation: none; background: #fff; }
.zdpl__page canvas { display: block; width: 100%; height: auto; border-radius: .4rem; }

.zdpl__status { display: flex; align-items: center; justify-content: center; gap: 1rem; padding: 4rem 2rem; font-size: 1.6rem; text-align: center; }
.zdpl__status[hidden] { display: none; }
.zdpl__status a { color: #fff; text-decoration: underline; }
.zdpl__spinner { width: 2rem; height: 2rem; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .25); border-top-color: #fff; animation: zdpl-spin .8s linear infinite; }

@keyframes zdpl-spin { to { transform: rotate(360deg); } }
@keyframes zdpl-shimmer { to { background-position: -200% 0; } }

@media (max-width: 700px) {
	.zdpl__bar { padding: .8rem 1rem; gap: .8rem; }
	.zdpl__title { font-size: 1.5rem; }
	.zdpl__btn { min-width: 3.8rem; height: 3.8rem; padding: 0 .8rem; }
	.zdpl__btn--text span { display: none; }
	.zdpl__btn--text { padding: 0 .8rem; }
	.zdpl__pages { padding: 1.2rem .8rem 4rem; gap: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
	.zdpl__page, .zdpl__spinner { animation: none; }
}
