/* PDF viewer */
.viewer { position: relative; display: flex; flex-direction: column; padding: 18px; min-height: 520px; min-width: 0; }
.viewer-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.viewer-title { display: flex; flex-direction: column; min-width: 0; }
.viewer-title .label { margin-bottom: 2px; }
.viewer-title .muted { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-tools { display: flex; align-items: center; gap: 6px; }
.sep { width: 1px; height: 22px; background: var(--line); margin: 0 6px; }

.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line); background: var(--glass-2); color: #fff; font-size: 1.15rem; line-height: 1;
  transition: border-color .25s, background .25s;
}
.icon-btn:hover:not(:disabled) { border-color: var(--line-2); background: rgba(255,255,255,.12); }
.icon-btn:disabled { opacity: .3; cursor: not-allowed; }
.icon-btn[hidden] { display: none; }

.pager { display: inline-flex; align-items: center; gap: 8px; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gray); }
.pager input {
  width: 62px; padding: 6px 8px; text-align: center; border-radius: 10px; border: 1px solid var(--line);
  background: rgba(255,255,255,.05); color: #fff; outline: none; -moz-appearance: textfield;
}
.pager input::-webkit-outer-spin-button, .pager input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pager input:focus { border-color: var(--line-2); }

.viewer-note { margin: 0 0 12px; font-size: .78rem; line-height: 1.5; color: var(--gray); }

.viewer-stage {
  position: relative; flex: 1; min-height: 0; overflow: auto; border-radius: 14px; border: 1px solid var(--line);
  background: rgba(0,0,0,.35); scrollbar-width: thin; scrollbar-color: var(--gray-dark) transparent;
  display: flex; justify-content: center; align-items: flex-start; padding: 14px;
}
.viewer-stage .empty { margin: auto; }
#v-canvas {
  display: block; background: #fff; border-radius: 4px; box-shadow: 0 20px 60px rgba(0,0,0,.6);
  max-width: none; transition: opacity .25s;
}
#v-canvas.is-loading { opacity: .35; }
#v-canvas.flash { animation: flash 1.4s var(--ease); }
@keyframes flash { 0% { box-shadow: 0 0 0 3px #fff, 0 0 60px rgba(255,255,255,.7); } 100% { box-shadow: 0 20px 60px rgba(0,0,0,.6); } }

.cite-toast {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); padding: 8px 18px; border-radius: 999px;
  background: #fff; color: #000; font-size: .66rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase;
  box-shadow: 0 10px 40px rgba(0,0,0,.5); animation: pop .5s var(--ease); pointer-events: none;
}
.cite-toast[hidden] { display: none; }
