[x-cloak] { display: none !important; }

.page-wrapper {
  position: relative;
  display: inline-block;
  line-height: 0;
  user-select: none;
}

/* PDF.js text layer — visual only, never interactive */
.text-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}
.text-layer > span {
  color: transparent;
  position: absolute;
  white-space: pre;
  transform-origin: 0% 0%;
}

.annot-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;   /* highlights opt in individually */
}
/* Crosshair cursor over page in edit mode */
#pages-wrap.editing .page-wrapper { cursor: crosshair; }

/* Rubber-band selection rect */
.drag-rect {
  position: absolute;
  border: 1.5px dashed #3b82f6;
  background: rgba(59,130,246,0.07);
  pointer-events: none;
  z-index: 30;
}

.annot-highlight {
  position: absolute;
  border-radius: 2px;
  cursor: pointer;
  pointer-events: auto;
}
.annot-highlight::after {
  content: attr(data-label);
  position: absolute;
  top: -1.6em;
  left: 0;
  font-size: 10px;
  line-height: 1.4;
  font-family: system-ui, sans-serif;
  padding: 1px 5px;
  border-radius: 3px;
  white-space: nowrap;
  color: white;
  background: var(--label-color);
  display: none;
  pointer-events: none;
  z-index: 20;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.annot-highlight:hover::after { display: block; }
.annot-highlight:hover { filter: brightness(0.88); }

/* Page number badge */
.page-badge {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: #9ca3af;
  white-space: nowrap;
}
