.d-media-background-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: hidden;
  .field--type-entity-reference,
  .field--type-image {
    float: none;
    margin: 0;
  }
  div:not([data-contextual-id]) {
    height: 100%;
  }
  picture {
    display: block;
    height: 100%;
  }
  img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    font-family: 'object-fit: cover; object-position: center;';
    @include media-breakpoint-down(sm) {
      max-width: none;
      width: 100%;
      overflow: hidden;
    }
  }
  .video-embed {
    width: 100%;
    height: 100%;
    pointer-events: none;
    &--cover {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
    }
  }
}

.field--name-field-media-oembed-video {
  position: relative;
  svg {
    position: static;
    max-width: 100%;
    height: auto;
  }
  iframe {
    max-width: 100%;
    width: 100%;
    &.reactive-video {
      position: absolute;
      top: 0;
      left: 0;
    }
  }
}
