/* pdf-viewer.js (window.DelphosPdf) — the PDF reader used where the browser has
   no built-in one (the Android app, phone browsers). Fills its host. */
.dpdf { position: relative; width: 100%; height: 100%; min-height: 240px; display: flex; flex-direction: column; background: #525659; overflow: hidden; }
body.light_mode .dpdf { background: #e8e8ea; }
.dpdf-scroll { flex: 1; min-height: 0; overflow: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-x pan-y; outline: none; }
.dpdf-pages { margin: 0 auto; padding: 12px 0 84px; display: flex; flex-direction: column; align-items: center; gap: 10px; will-change: transform; }
.dpdf-page { position: relative; flex: none; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); contain: strict; }
.dpdf-page canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.dpdf-page:not(.is-ready)::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #f3f3f3 0%, #fafafa 50%, #f3f3f3 100%); }
.dpdf-bar {
    position: absolute; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
    display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 999px;
    background: rgba(24, 24, 27, .92); color: #fff; box-shadow: 0 6px 20px rgba(0, 0, 0, .3); z-index: 2;
}
.dpdf-bar[hidden] { display: none; }
.dpdf-btn { width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: inherit; display: grid; place-items: center; cursor: pointer; }
.dpdf-btn:active { background: rgba(255, 255, 255, .14); }
.dpdf-btn .material-symbols-rounded { font-size: 22px; }
.dpdf-count { min-width: 64px; text-align: center; font: 600 13px/1 system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.dpdf-state { position: absolute; inset: 0; display: grid; place-items: center; }
.dpdf-state[hidden] { display: none; }
.dpdf-spin { width: 30px; height: 30px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .25); border-top-color: #fff; animation: dpdf-spin .8s linear infinite; }
body.light_mode .dpdf-spin { border-color: rgba(0, 0, 0, .12); border-top-color: #555; }
@keyframes dpdf-spin { to { transform: rotate(360deg); } }
.dpdf-fail { max-width: 300px; padding: 24px; text-align: center; color: #f4f4f5; font: 400 14px/1.5 system-ui, sans-serif; }
body.light_mode .dpdf-fail { color: #27272a; }
.dpdf-fail > .material-symbols-rounded { font-size: 44px; opacity: .7; }
.dpdf-dl { margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--accent, #3b7bf6); color: #fff; font: 600 14px system-ui, sans-serif; cursor: pointer; }
/* Hosts */
.wq-stage.is-pdf > .dpdf { position: absolute; inset: 0; height: auto; }
.wq-stage.is-pdf { position: relative; }
.dc-panel-body > .dpdf { position: absolute; inset: 0; height: auto; }
