/* The viewer (src/viewer.js): the canvas, the region and drift overlays. */
/* ---- viewer ------------------------------------------------------------------------------------------ */
.viewer {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: var(--canvas);
}
.viewer canvas {
  display: block;
  touch-action: none;
}
/* an edit's region over the image: the rest dimmed, an outline, handles while it is edited; fades in and out */
.area-overlay {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--t-fade);
}
/* what Undo drift corrects (viewer.js: drift), faded in while the pointer is on its row */
.drift-overlay {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--t-fade);
}
.drift-overlay.on {
  opacity: 1;
}
.drift-halo {
  stroke: var(--area-shade);
  stroke-width: 4;
  stroke-linecap: round;
}
.drift-arrow {
  stroke: var(--white);
  stroke-width: 1.5;
  stroke-linecap: round;
}
.drift-head {
  fill: var(--white);
  stroke: var(--area-shade);
  stroke-width: 1;
  paint-order: stroke;
}
.drift-dot {
  fill: var(--white);
}
.drift-scale {
  fill: var(--white);
  font-size: var(--fs-tiny);
  font-weight: var(--fw-text);
  paint-order: stroke;
  stroke: var(--area-shade);
  stroke-width: 3px;
}
.area-overlay.on {
  opacity: 1;
}
.area-shade {
  fill: var(--area-shade);
}
.area-line {
  fill: none;
  stroke: var(--white);
  stroke-width: 1.5;
}
.area-box {
  fill: none;
  stroke: var(--area-box);
  stroke-width: 1;
  stroke-dasharray: 5 4;
}
.area-handle {
  fill: var(--white);
  stroke: var(--black);
  stroke-width: 1;
}
.viewer-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--label);
}
.viewer-frame {
  position: absolute;
  border: 1.5px dashed var(--dash);
  border-radius: 2px;
  pointer-events: none;
  transition:
    width var(--t-state) var(--ease),
    height var(--t-state) var(--ease),
    left var(--t-state) var(--ease),
    top var(--t-state) var(--ease);
}
