/* ThinkByte PDF Reader — compact, responsive and theme-friendly. */
.tbpr-reader {
  --tbpr-ink: #26333b;
  --tbpr-muted: #64717b;
  --tbpr-accent: #298d78;
  --tbpr-border: #dee5e8;
  --tbpr-reader-width: 860px;
  box-sizing: border-box;
  width: 100%;
  max-width: min(var(--tbpr-reader-width), 100%);
  margin-top: 1.25rem;
  margin-bottom: 1.5rem;
  color: var(--tbpr-ink);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.4;
  isolation: isolate;
}
.tbpr-reader *, .tbpr-reader *::before, .tbpr-reader *::after { box-sizing: border-box; }
.tbpr-align-left { margin-left: 0; margin-right: auto; }
.tbpr-align-center { margin-left: auto; margin-right: auto; }
.tbpr-align-right { margin-left: auto; margin-right: 0; }
.tbpr-reader [hidden] { display: none !important; }
.tbpr-reader:focus-visible { outline: 3px solid #46a8cd; outline-offset: 4px; border-radius: 8px; }
.tbpr-stage {
  position: relative;
  overflow: hidden;
  min-height: 240px;
  border: 1px solid var(--tbpr-border);
  background: #f2f4f6;
  border-radius: 11px 11px 0 0;
  color: var(--tbpr-ink);
}
.tbpr-scroll {
  overflow: auto;
  max-height: 79vh;
  min-height: 238px;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  text-align: center;
}
.tbpr-page {
  position: relative;
  display: block;
  width: fit-content;
  margin: 0 auto;
  line-height: 0;
  background: #fff;
  box-shadow: 0 5px 15px rgb(21 37 47 / 9%);
}
.tbpr-canvas { display: block; max-width: none; width: 100%; height: auto; background: #fff; }
.tbpr-stage-note {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  font-size: 15px;
  color: var(--tbpr-muted);
  background: rgb(246 248 249 / 94%);
}
.tbpr-stage.tbpr-error .tbpr-stage-note { color: #942e36; }
.tbpr-arrow {
  appearance: none;
  display: flex;
  position: absolute;
  top: 50%;
  z-index: 3;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 56px;
  transform: translateY(-50%);
  padding: 0;
  border: 1px solid rgb(35 55 69 / 12%);
  border-radius: 12px;
  background: rgb(255 255 255 / 96%);
  box-shadow: 0 3px 16px rgb(20 29 40 / 15%);
  color: #273a46;
  cursor: pointer;
  transition: background .15s ease, box-shadow .15s ease;
}
.tbpr-arrow:hover { background: #fff; box-shadow: 0 4px 19px rgb(20 29 40 / 22%); }
.tbpr-prev { left: 9px; }
.tbpr-next { right: 9px; }
.tbpr-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 12px;
  min-height: 59px;
  border: 1px solid var(--tbpr-border);
  border-top: 0;
  border-radius: 0 0 11px 11px;
  background: #fff;
  color: var(--tbpr-ink);
}
.tbpr-page-count {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: .4em;
  min-width: 75px;
  font-variant-numeric: tabular-nums;
  color: var(--tbpr-muted);
}
.tbpr-current { font-size: 16px; font-weight: 700; color: var(--tbpr-ink); }
.tbpr-toolbar-space { flex: 1 1 12px; }
.tbpr-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 36px;
  min-height: 36px;
  padding: 6px;
  appearance: none;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #f3f6f7;
  font-family: inherit;
  font-weight: 600;
  font-size: 21px;
  line-height: 1;
  color: var(--tbpr-ink);
  cursor: pointer;
}
.tbpr-tool:hover:not(:disabled) { background: #e6eded; }
.tbpr-tool:disabled { opacity: .4; cursor: default; }
.tbpr-tool[aria-pressed='true'] { background: #d6eee6; color: #16674f; border-color: #84bea8; }
.tbpr-zoom-label { min-width: 46px; text-align: center; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--tbpr-muted); }
.tbpr-separator { width: 1px; height: 25px; margin: 0 4px; background: var(--tbpr-border); }
.tbpr-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--tbpr-accent);
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 600;
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
}
.tbpr-download:hover { background: #207b68; color: #fff !important; }
.tbpr-download:visited { color: #fff !important; }
.tbpr-reader button:focus-visible, .tbpr-reader a:focus-visible { outline: 3px solid #399dca; outline-offset: 2px; }
.tbpr-message { margin: 6px 0 0; color: var(--tbpr-muted); font-size: 12px; }
.tbpr-message:empty { display: none; }
.tbpr-lens {
  display: block;
  position: absolute;
  z-index: 2;
  width: 174px;
  height: 174px;
  max-width: none;
  border: 4px solid rgb(255 255 255 / 94%);
  border-radius: 50%;
  box-shadow: 0 3px 25px rgb(0 0 0 / 35%);
  pointer-events: none;
  background: #fff;
}
.tbpr-magnifying .tbpr-page { cursor: crosshair; touch-action: none; }
.tbpr-setup-warning { border-left: 3px solid #db8d44; padding: 12px; background: #fff8ee; font-size: 14px; }
@media(max-width: 560px) {
  .tbpr-toolbar { padding: 9px 8px; gap: 4px; }
  .tbpr-arrow { width: 35px; height: 48px; border-radius: 9px; }
  .tbpr-prev { left: 4px; }
  .tbpr-next { right: 4px; }
  .tbpr-tool { min-width: 33px; min-height: 34px; }
  .tbpr-download { padding-inline: 9px; }
  .tbpr-download span { display: none; }
  .tbpr-separator { margin: 0 1px; }
}
@media(prefers-reduced-motion: reduce) {
  .tbpr-reader * { transition: none !important; }
}
