@import "../Tokens/tokens.scss";
@import "../../common/scss/helpers";

.preview-content {
  display: flex;
  width: 100vw;
  z-index: 102;
  background: #fff;
  box-shadow: 0 20px 13px 0 rgba(0, 0, 0, 0.04);
  height: 100vh;

  @media (max-width: 1000px) {
    display: block;
    width: 100%;
    height: calc(100vh - 75px);
    max-width: 100%;
    overflow-y: auto;
  }
}

.preview-body {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  z-index: 2000;

  .preview-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 80px;
    line-height: 1em;

    span {
        animation-name: blink;
        animation-duration: 1.4s;
        animation-iteration-count: infinite;
        animation-fill-mode: both;
    }

    span:nth-child(2) {
        animation-delay: .2s;
    }

    span:nth-child(3) {
        animation-delay: .4s;
    }
  }

  .preview-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    line-height: 1em;
  }
}

@keyframes blink {
  0% {
    opacity: .2;
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: .2;
  }
}
