/* PDF viewer (templates/public/_pdf_viewer.html). Library palette: navy surfaces, cyan accent. */
.pdfv { display: grid; overflow: hidden; border: 1px solid rgba(var(--t-c-ffffff), 0.08); border-radius: 1.25rem; background: rgb(var(--t-c-0a1328)); color: rgb(var(--t-c-dbe4ee)); }
.pdfv__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; padding: .6rem .75rem; border-bottom: 1px solid rgba(var(--t-c-ffffff), 0.08); background: rgb(var(--t-c-0d1832)); }
.pdfv__group { display: flex; align-items: center; gap: .35rem; }
.pdfv__btn { display: grid; width: 2.4rem; height: 2.4rem; place-items: center; border: 1px solid rgba(var(--t-c-ffffff), 0.1); border-radius: .7rem; background: rgba(var(--t-c-ffffff), 0.03); color: rgb(var(--t-c-dbe4ee)); cursor: pointer; }
.pdfv__btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pdfv__btn:hover:not(:disabled) { border-color: rgba(var(--t-c-22d3ee), 0.5); color: rgb(var(--t-c-ffffff)); }
.pdfv__btn:disabled { opacity: .4; cursor: default; }
.pdfv__btn[aria-pressed="true"] { border-color: rgb(var(--t-c-22d3ee)); background: rgba(var(--t-c-22d3ee), 0.12); color: rgb(var(--t-c-a5f3fc)); }
.pdfv__btn:focus-visible, .pdfv__pageno input:focus-visible, .pdfv__stage:focus-visible, .pdfv__thumb:focus-visible { outline: 2px solid rgb(var(--t-c-22d3ee)); outline-offset: 2px; }
.pdfv__pageno input { width: 3.4rem; height: 2.4rem; border: 1px solid rgba(var(--t-c-ffffff), 0.12); border-radius: .7rem; background: rgb(var(--t-c-050b1c)); color: rgb(var(--t-c-ffffff)); font: inherit; font-weight: 800; text-align: center; -moz-appearance: textfield; }
.pdfv__pageno input::-webkit-inner-spin-button, .pdfv__pageno input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.pdfv__count, .pdfv__zoom { min-width: 3.2rem; color: rgb(var(--t-c-a9b8c8)); font-size: .82rem; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
.pdfv__body { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 0; }
.pdfv.has-thumbs .pdfv__body { grid-template-columns: 132px minmax(0, 1fr); }
.pdfv__thumbs { display: grid; align-content: start; gap: .6rem; max-height: 78vh; padding: .75rem; overflow-y: auto; border-inline-end: 1px solid rgba(var(--t-c-ffffff), 0.08); background: rgb(var(--t-c-08112a)); }
.pdfv__thumb { display: grid; justify-items: center; gap: .25rem; padding: .35rem; border: 1px solid transparent; border-radius: .6rem; background: transparent; color: rgb(var(--t-c-94a3b8)); font-size: .72rem; font-weight: 800; cursor: pointer; }
.pdfv__thumb canvas { width: 96px; min-height: 120px; border-radius: .3rem; background: rgb(var(--t-c-1e293b)); }
.pdfv__thumb[aria-current="true"] { border-color: rgb(var(--t-c-22d3ee)); color: rgb(var(--t-c-a5f3fc)); }
.pdfv__stage { position: relative; display: grid; justify-items: center; align-content: start; min-height: 60vh; max-height: 78vh; padding: 12px; overflow: auto; background: rgb(var(--t-c-050b1c)); }
.pdfv__canvas { max-width: none; border-radius: .4rem; background: rgb(var(--t-c-ffffff)); box-shadow: 0 10px 30px rgba(var(--t-c-000000), 0.35); }
.pdfv__canvas[hidden] { display: none; }
.pdfv__skeleton { display: grid; gap: 14px; width: min(100%, 640px); padding: 40px 32px; border-radius: .4rem; background: rgb(var(--t-c-e7ecf2)); }
.pdfv__skeleton[hidden] { display: none; }
.pdfv__skeleton span { height: 14px; border-radius: 7px; background: linear-gradient(90deg, rgb(var(--t-c-d5dde7)), rgb(var(--t-c-eef2f7)), rgb(var(--t-c-d5dde7))); background-size: 200% 100%; animation: pdfv-shine 1.4s ease-in-out infinite; }
.pdfv__skeleton span:nth-child(2) { width: 80%; } .pdfv__skeleton span:nth-child(3) { width: 60%; }
.pdfv__error { align-self: center; margin: 3rem 1rem; color: rgb(var(--t-c-fecaca)); font-weight: 700; text-align: center; }
.pdfv.is-fullscreen { border-radius: 0; }
.pdfv.is-fullscreen .pdfv__stage, .pdfv.is-fullscreen .pdfv__thumbs { max-height: none; height: calc(100vh - 62px); }
@keyframes pdfv-shine { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (max-width: 640px) {
  .pdfv.has-thumbs .pdfv__body { grid-template-columns: 96px minmax(0, 1fr); }
  .pdfv__thumb canvas { width: 72px; min-height: 90px; }
  .pdfv__stage { min-height: 50vh; }
}
@media (prefers-reduced-motion: reduce) { .pdfv__skeleton span { animation: none; } }
