/* Annotation overlay inside each page */
.page-overlay{
  position: absolute; inset: 0;
  pointer-events: none;
}
.page-overlay > *{ pointer-events: auto; }

/* Text boxes */
.ann-text{
  position: absolute;
  min-width: 24px; min-height: 20px;
  padding: 4px 6px;
  border: 1px dashed transparent;
  background: transparent;
  outline: none;
  white-space: pre-wrap;
  word-wrap: break-word;
  cursor: text;
  line-height: 1.35;
  color: #14181f;
  font-family: "Inter", Helvetica, Arial, sans-serif;
}
.ann-text:hover{ border-color: rgba(26,86,219,.4); }
.ann-text:focus, .ann-text.is-editing{ border-color: var(--c-primary); background: rgba(255,255,255,.9); }
.ann-text.is-selected{ border-color: var(--c-primary); background: rgba(232,239,255,.5); }

/* Ink strokes */
.ann-ink{ position:absolute; inset:0; pointer-events:none; }
.ann-ink.is-selected{ pointer-events:auto; }

/* Highlight / Underline / Strike rectangles */
.ann-mark{ position:absolute; border-radius:1px; }
.ann-mark--highlight{ background: rgba(255,225,0,.42); mix-blend-mode: multiply; }
.ann-mark--underline{ border-bottom: 2.5px solid var(--c-primary); }
.ann-mark--strike{ border-top: 2.5px solid var(--c-primary); }
.ann-mark.is-selected{ outline:1px solid var(--c-primary); }

/* Shapes */
.ann-shape{ position:absolute; }
.ann-shape.is-selected{ outline:1px dashed var(--c-primary); }

/* Images */
.ann-image{ position:absolute; }
.ann-image img{ display:block; width:100%; height:100%; object-fit:contain; pointer-events:none; }
.ann-image.is-selected{ outline:1px dashed var(--c-primary); }

/* Handles (resize) */
.ann-handle{
  position:absolute; width:10px; height:10px;
  background:#fff; border:1.5px solid var(--c-primary);
  border-radius: 2px;
}
.ann-handle[data-h="nw"]{ left:-5px; top:-5px; cursor:nwse-resize; }
.ann-handle[data-h="ne"]{ right:-5px; top:-5px; cursor:nesw-resize; }
.ann-handle[data-h="sw"]{ left:-5px; bottom:-5px; cursor:nesw-resize; }
.ann-handle[data-h="se"]{ right:-5px; bottom:-5px; cursor:nwse-resize; }

/* Comment pin */
.ann-comment{
  position:absolute; width:24px; height:24px;
  background: var(--c-warn); color:#fff;
  border-radius: 50% 50% 50% 4px;
  display:flex; align-items:center; justify-content:center;
  font-size: 12px; font-weight:700; cursor:pointer;
  box-shadow: var(--sh-2);
}

/* Checkbox */
.ann-checkbox{
  position:absolute; width:18px; height:18px;
  border: 1.5px solid #14181f;
  background:#fff; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
}
.ann-checkbox.is-checked::after{
  content:""; width:10px; height:10px; background:#14181f;
}

/* Link badge */
.ann-link{
  position:absolute; border: 1.5px dashed var(--c-primary);
  background: rgba(26,86,219,.08);
  border-radius:2px; cursor:pointer;
}

/* Drawing preview */
.draw-preview{ position:absolute; inset:0; pointer-events:none; }

/* Crosshair cursors */
.tool-draw .pdf-page,
.tool-highlight .pdf-page,
.tool-underline .pdf-page,
.tool-strike .pdf-page,
.tool-shape .pdf-page,
.tool-arrow .pdf-page{ cursor: crosshair; }
.tool-text .pdf-page{ cursor: text; }
.tool-hand .pdf-page{ cursor: grab; }
.tool-hand.is-dragging .pdf-page{ cursor: grabbing; }
.tool-eraser .pdf-page{ cursor: not-allowed; }

/* Fit-to-width / fit-page states */
.canvas-scroll[data-fit="width"] .pdf-page{ max-width: 100%; }