/* Shared upload/reference thumbnail removal controls, including editor frames. */
:root :is(.reference-thumb > button, .react-canvas-reference > button, .web-edit-clear, .matting-remove, .prompt-ai-reference-remove, .generator-rh-reference-remove, .input-thumb-remove) {
  top: 4px;
  right: 4px;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
  max-width: 22px;
  max-height: 22px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #383f34;
  background: #fff;
  box-shadow: 0 1px 5px #0002;
  transform: none;
  line-height: 1;
  transition: color .14s ease, background-color .14s ease;
}

:root :is(.reference-thumb > button, .react-canvas-reference > button, .web-edit-clear, .matting-remove, .prompt-ai-reference-remove, .generator-rh-reference-remove, .input-thumb-remove):not(:disabled):is(:hover, :focus-visible) {
  color: #fff;
  background: #171a16;
  transform: none;
}

:root :is(.reference-thumb > button, .react-canvas-reference > button, .web-edit-clear, .matting-remove, .prompt-ai-reference-remove, .generator-rh-reference-remove, .input-thumb-remove):focus-visible {
  outline: 2px solid #9ca3af;
  outline-offset: 2px;
}

:root :is(.reference-thumb > button, .react-canvas-reference > button, .web-edit-clear, .matting-remove, .prompt-ai-reference-remove, .generator-rh-reference-remove, .input-thumb-remove):disabled {
  color: #383f34;
  background: #fff;
}

/* Even icon dimensions avoid half-pixel insets inside the 22px control. */
:root :is(.reference-thumb > button, .react-canvas-reference > button, .web-edit-clear, .matting-remove, .prompt-ai-reference-remove, .generator-rh-reference-remove, .input-thumb-remove, .single-image-input-remove, .video-remove-reference) :is(svg, i) {
  display: block;
  position: static;
  width: 14px !important;
  height: 14px !important;
  margin: 0;
  padding: 0;
  flex: none;
  align-self: center;
  justify-self: center;
  transform: none;
  color: inherit;
  pointer-events: none;
}
