/* Image attachments use the thumbnail as their only composer representation. */
.attachment-preview:has(.attachment-image-thumbnail):not([hidden]) + .attachment-list {
  display: none !important;
}

/* Match the familiar attachment UX: reveal removal only on hover or focus. */
.attachment-image-wrapper .attachment-image-remove {
  opacity: 0;
  pointer-events: none;
  transform: scale(.86);
  transition: opacity .14s ease, transform .14s ease;
}

.attachment-image-wrapper:hover .attachment-image-remove,
.attachment-image-wrapper:focus-within .attachment-image-remove {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

@media (hover: none), (pointer: coarse) {
  .attachment-image-wrapper .attachment-image-remove {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
  }
}
