$zIndex: 10;

.ola-modal-background{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0,0,0,0.6);
  z-index: $zIndex;
  transition: all 0.1s ease-in;
  visibility: visible;
  opacity: 1;

  @include media (desktop) {
    visibility: hidden;
    opacity: 0;
  }

  &.ola-modal-hide{
    transition: all 0.1s ease-in;
    visibility: hidden;
    opacity: 0;
  }
}

/* Modal close */
.ola-modal-close {
  border: none;
  padding: 0;
  margin: 0;
  position: absolute;
  right: 0;
  top: 0;
  color: white;
  cursor: pointer;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  background: #000;
  border-radius: 100%;
  cursor: pointer;
  box-shadow: $small-box-shadow;
  background: #333;
  color: white;
  line-height: 1;
}

/**
 * Overlay
 */
.ola-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0,0,0,0.8);
  z-index: 9999;
  transition: all 0.1s ease-in;
  animation: fadeIn 0.2s linear;
  visibility: visible;
  opacity: 1;

  display: flex;
  flex-direction: column;
  justify-content: center;
}
  $spacing: 60px + 16px;
  .ola-modal-body {
    // margin: $spacing 0;
  }

  /**
   * Image
   */
  .ola-modal-content-image {
    text-align: center;
    display: inline-block;
    margin: $spacing 0;
    box-shadow: $small-box-shadow;

    img {
      max-width: 100%;
      vertical-align: top;
      max-height: calc(100vh - $spacing * 2);
      min-width: auto;
    }
  }

  /**
   * Inline content
   */
  // .ola-modal-inline {
  //   text-align: center;
  //   .ola-modal-content {
  //     display: inline;
  //   }
  // }

  /**
   * Full modal
   */
  .ola-modal-full {
    position: absolute;
    top: 20px;
    right: 20px;
    bottom: 20px;
    left: 20px;
    background: white;
    display: flex;

    .ola-modal-body {
      padding: 0;
      margin: 0;
      flex: 1;
    }
  }

/**
 * Overlay
 */
.ola-content-overlay {
  background: rgba(0,0,0,0.8);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: $modal-overlay-zindex;
  opacity: 0;
  visibility: hidden; /* Because of this, when the page loads initially, the overlay remains active for 0.2s */
  transition: all 0.2s ease-in;

  &.ola-content-overlay-active {
    visibility: visible;
    opacity: 1;
  }
}

  .ola-content-overlay-absolute {
    position: absolute;
  }


/**
 * Embed modal
 */
.ola-embed-frame-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  -webkit-overflow-scrolling: touch;
  overflow: scroll;
}

.ola-embed-frame {
  width: 100%;
  height: 100%;
  -webkit-overflow-scrolling: touch;
  overflow: scroll;
}

/* For backward compatibilty (previously was in use)*/
.ola-embed-frame-active {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

