/* Blur / pixelate tool (/tools/blur-image). Loaded only on that page, after tool.css. */

/* Room for the remove buttons, which sit just outside an area touching the image edge. */
.redact-frame {
  padding: 1.25rem;
}

/* Mouse and pen draw areas on the image; touch keeps scrolling (a tap adds an area). */
.redact-stage {
  cursor: crosshair;
}

.redact-area {
  position: absolute;
  border: 2px dashed #ffffff;
  outline: 1px solid rgb(0 0 0 / 0.7);
  background: rgb(255 255 255 / 0.08);
  cursor: move;
  touch-action: none;
}

.redact-area:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

.redact-area.is-dragging,
.redact-area:focus {
  border-style: solid;
}

.redact-area__remove {
  position: absolute;
  top: -14px;
  right: -14px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: var(--color-danger);
  color: #ffffff;
  cursor: pointer;
  z-index: 1;
}

.redact-area__remove .icon {
  width: 16px;
  height: 16px;
}

/* 44px touch target around the small button. */
.redact-area__remove::after {
  content: "";
  position: absolute;
  inset: -8px;
}

.redact-area__remove:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

/* The remove button sits on the top-right corner, so that handle moves out of its way. */
.redact-area .cropper__handle--ne {
  display: none;
}
