/* Responsive images (docs/imagens.md). The blur placeholder is the background of the <img> itself. */
.dl-img {
  background-size: cover;
  background-position: center;
}

/* Loaded: the placeholder goes away (memory, and no blur behind semi-transparent edges). */
/* width/height attributes reserve the space (aspect ratio); a CSS that sets only one side must not stretch
   the image. :where() keeps this at zero specificity: any rule of the project wins. */
:where(img.dl-img) {
  height: auto;
}

.dl-img--loaded {
  background-image: none !important;
}

/* <picture> must not become a box of its own: the class of the project stays on the <img>. */
.dl-picture {
  display: contents;
}

/* fade=True: the placeholder is the background of the wrapper and the image fades in over it. Only with JS. */
.dl-img-wrap {
  display: inline-block;
  max-width: 100%;
  background-size: cover;
  background-position: center;
  line-height: 0;
}

.dl-img[data-dl-fade] {
  transition: opacity 0.25s ease;
}

.dl-js .dl-img[data-dl-fade]:not(.dl-img--loaded) {
  opacity: 0;
}

/* image_column() of the admin list. */
.dl-thumb {
  object-fit: cover;
  border-radius: 0.375rem;
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .dl-img[data-dl-fade] {
    transition: none;
  }
}
