/* document annotation layer */
.doc-content { position: relative; }
.annotation-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}
.annotation-layer.active {
  pointer-events: auto;
  cursor: crosshair;
}
.annotation-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  user-select: none;
}
.doc-content.annotation-mode {
  user-select: none;
  -webkit-user-select: none;
}
.annotation-toolbar {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 150;
  background: #1f2329;
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(15, 18, 23, .32);
  padding: 7px 9px;
  max-width: calc(100vw - 24px);
}
.annotation-tool-row {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
  padding: 1px;
}
.annotation-tool,
.annotation-action {
  border: 0;
  background: transparent;
  color: #c9ced6;
  min-width: 28px;
  height: 28px;
  padding: 0 7px;
  border-radius: 6px;
  font-size: 12px;
  display: inline-grid;
  place-items: center;
  flex: none;
}
.annotation-tool:hover,
.annotation-action:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.annotation-tool.active { background: #3370ff; color: #fff; }
.annotation-sep { width: 1px; height: 18px; background: rgba(255, 255, 255, .16); margin: 0 3px; flex: none; }
.annotation-colors { display: flex; align-items: center; gap: 4px; flex: none; }
.annotation-color {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: var(--swatch);
  padding: 0;
}
.annotation-color.active { border-color: #fff; box-shadow: 0 0 0 1px var(--swatch); }
.annotation-width-wrap { display: flex; align-items: center; flex: none; }
.annotation-width { width: 64px; accent-color: #3370ff; }
.annotation-count { font-size: 11px; color: #8f97a3; padding: 0 3px; flex: none; }
.annotation-close { margin-left: 2px; color: #fff; }
.btn.active { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
@media (max-width: 720px) {
  .annotation-toolbar {
    left: 10px;
    right: 10px;
    transform: none;
    bottom: 12px;
    padding: 6px;
  }
  .annotation-tool-row { gap: 3px; }
  .annotation-width { width: 46px; }
}
