@import '~moda-themes';

.ResponsiveImage {
  $self: &;

  display: inline-block;
  vertical-align: bottom;
  width: 100%;

  &--loading {
    img {
      opacity: 0;
    }
  }

  &--ready {
    img {
      opacity: 1;
      transition: opacity 250ms;
    }
  }

  &--error {
    img {
      display: none;
    }
  }

  &__missing {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
  }

  &__wrapper {
    position: relative;
    width: 100%;
    height: 0;
    overflow: hidden;
  }

  &__image {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1;
    top: 0;
    left: 0;
  }
}
