/* Loader */
.lg-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  background: white;
  opacity: 0;
  pointer-events: none;
  z-index: 999;

  &.is-visible {
    opacity: 1;
    pointer-events: all;
  }
}

/* Lottie */
.lg-loader--lottie {
  background: none;

  svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    opacity: 0;
  }
}

/* Fade */
.lg-loader--fade {
  transition: opacity 0.3s linear;
}

/* Slide */
.lg-loader--slide,
.lg-loader--slide-to-bottom,
.lg-loader--slide-to-left,
.lg-loader--slide-to-top,
.lg-loader--slide-to-right {
  opacity: 1;
}

.lg-loader--slide-to-left,
.lg-loader--slide-to-right {
  transform: scaleX(0);
  transition: transform 0.5s ease(out-cubic);

  &.is-visible {
    transform: scaleX(1);
    transition-timing-function: ease(in-cubic);
  }
}

.lg-loader--slide-to-left {
  transform-origin: 0 50%;

  &.is-visible {
    transform-origin: 100% 50%;
  }
}

.lg-loader--slide-to-right {
  transform-origin: 100% 50%;

  &.is-visible {
    transform-origin: 0 50%;
  }
}

.lg-loader--slide-to-bottom,
.lg-loader--slide-to-top {
  transform: scaleY(0);
  transition: transform 0.5s ease(out-cubic);

  &.is-visible {
    transform: scaleY(1);
    transition-timing-function: ease(in-cubic);
  }
}

.lg-loader--slide-to-bottom {
  transform-origin: 50% 100%;

  &.is-visible {
    transform-origin: 50% 0;
  }
}

.lg-loader--slide-to-top {
  transform-origin: 50% 0;

  &.is-visible {
    transform-origin: 50% 100%;
  }
}
