/* ─── PDF Viewer (PDF.js) ─── */

.ht-pdf-viewer {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    margin: 0 -12px;
    height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
}

.ht-pdf-viewer__canvas-wrap {
  overflow: auto;
  flex: 1;
  display: flex;
  justify-content: center;
  touch-action: pan-x pan-y;
}

.ht-pdf-viewer__canvas-wrap canvas {
  display: block;
  max-width: 100%;
}

.ht-pdf-viewer__controls {
  position: sticky;
  top: 0;
  z-index: 3;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

.ht-pdf-viewer__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  border-radius: 50%;
  cursor: pointer;
  color: #333;
  transition: background 0.15s;
  text-decoration: none;
  flex-shrink: 0;
}

.ht-pdf-viewer__btn:hover,
.ht-pdf-viewer__btn:active {
  background: rgba(0, 0, 0, 0.07);
}

.ht-pdf-viewer__btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.ht-pdf-viewer__btn--download {
  margin-left: auto;
  color: inherit;
}

.ht-pdf-viewer__pages {
  font-size: 0.85rem;
  color: #555;
  min-width: 56px;
  text-align: center;
}

.ht-pdf-viewer__loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
