.measurement-only.hidden { display: none; }

html.measurements-enabled .measurement-legacy {
  display: none !important;
}

html.measurements-enabled .toolbar-group-title.measurement-only.hidden {
  display: inline !important;
}

html.measurements-enabled button.measurement-only.hidden {
  display: inline-flex !important;
}

html.measurements-enabled canvas.measurement-only.hidden {
  display: block !important;
}

.measurement-tool-button,
.measurement-action-button {
  width: 34px;
  min-width: 34px;
  height: 34px;
  color: #eaf6ff;
  font-size: 22px;
  line-height: 1;
}

.measurement-action-button { color: var(--muted); }

.measurement-tool-button.active {
  border-color: #46b3ec;
  background: #17394b;
  color: #8ed8ff;
  box-shadow: inset 0 0 0 1px rgba(70, 179, 236, 0.42);
}

.pan-tool-button.active {
  border-color: #46b3ec;
  background: #17394b;
  color: #8ed8ff;
  box-shadow: inset 0 0 0 1px rgba(70, 179, 236, 0.42);
}

.pan-tool-icon {
  display: block;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ruler-icon {
  position: relative;
  display: block;
  width: 22px;
  height: 12px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
  transform: rotate(-24deg);
}

.ruler-icon::before {
  content: "";
  position: absolute;
  inset: 2px 3px auto;
  height: 4px;
  background: repeating-linear-gradient(90deg, currentColor 0 1px, transparent 1px 4px);
}

.ruler-icon::after {
  content: "";
  position: absolute;
  inset: auto 3px 2px;
  height: 2px;
  background: repeating-linear-gradient(90deg, currentColor 0 1px, transparent 1px 6px);
}

.angle-icon {
  position: relative;
  display: block;
  width: 23px;
  height: 21px;
}

.angle-icon::before,
.angle-icon::after {
  content: "";
  position: absolute;
  left: 3px;
  bottom: 3px;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform-origin: 0 50%;
}

.angle-icon::before { transform: rotate(-58deg); }

.angle-icon-arc {
  position: absolute;
  left: 6px;
  bottom: 5px;
  width: 10px;
  height: 10px;
  border-top: 2px dashed currentColor;
  border-right: 2px dashed currentColor;
  border-radius: 0 10px 0 0;
  transform: rotate(-14deg);
  opacity: 0.9;
}

.eraser-icon {
  display: block;
  width: 18px;
  height: 12px;
  border: 1.5px solid currentColor;
  border-radius: 3px 3px 2px 2px;
  background: linear-gradient(90deg, currentColor 0 42%, transparent 42% 100%);
  transform: rotate(-34deg);
}

.reset-view-icon {
  display: block;
  font-size: 24px;
  line-height: 1;
}

.viewer-tooltip {
  position: fixed;
  z-index: 10000;
  width: max-content;
  max-width: 210px;
  padding: 7px 9px;
  border: 1px solid rgba(70, 179, 236, 0.58);
  border-radius: 5px;
  background: rgba(5, 10, 14, 0.97);
  color: #f5f7fb;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: 0;
  text-align: center;
  white-space: pre-line;
  pointer-events: none;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.42);
}

.viewer-tooltip[hidden] { display: none; }

.annotation-canvas {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.canvas-wrap.measurement-tool-active #viewerCanvas { cursor: crosshair; }
.canvas-wrap.pan-tool-active #viewerCanvas { cursor: grab; }
.canvas-wrap.pan-tool-active #viewerCanvas:active { cursor: grabbing; }
