
@import url(spinner.css);

.lite-image {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  min-height: 30px;
}

.lite-image .loading-layer,
.lite-image .image-layer {
  transition-duration: 300ms;
  transition-property: opacity;
  will-change: opacity;
}

/* error layer */

.lite-image .error-layer {
  display: none;
}

.lite-image .error-layer.is-active {
  position: absolute;
  left: 0;
  right: 40px;
  top: 0;
  height: 100%;
  background-color: hsla(0,0%,0%,0.1);
  display: block;
  background-image: url('../images/broken.png');
  background-repeat: no-repeat;
}


.lite-image .image-reloader {
  height: 22px;
  width: 22px;
  line-height: 22px;

  position: absolute;
  right: -40px;
  bottom: 0;

  background: hsl(14, 100%, 63%);
  border-radius: 50%;
  color: #fff;

  font-size: 14px;
  text-align: center;

  cursor: pointer;
}

.lite-image .image-reloader:hover {
  background: hsl(14, 100%, 73%);
}

/* loading layer */

.lite-image .loading-layer {
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  opacity: 0;
  background: hsla(0, 0%, 0%, 0.14);
  min-height: 30px;
  min-width: 30px;

  display: flex;
  justify-content: center;
  align-items: center;
}

.lite-image .loading-layer.is-active {
  opacity: 0.4;
}

/* image layer */

.lite-image .image-layer {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  z-index: -1;
}

.lite-image .image-layer.is-active {
  opacity: 1;
  z-index: inherit;
}
