/* App Background */

#appOverlay {
  box-sizing: border-box;
  /* display: none; */
  /* Hidden by default */
  position: fixed;
  /* Stay in place */
  z-index: 9999999999;
  /* Sit on top */
  padding-top: 0;
  /* Location of the box */
  left: 0;
  top: 0;
  width: 100%;
  /* Full width */
  height: 100%;
  /* Full height */
  overflow: auto;
  /* Enable scroll if needed */
  background-color: rgb(0, 0, 0);
  /* Fallback color */
  background-color: rgba(0, 0, 0, 0.4);
  /* Black w/ opacity */
}

/* App Content */

#appContainer {
  height: 100vh;
  width: 90%;
  color: white;
  z-index: 99999999999;
  top: 0;
  left: 0;
  position: fixed;
  background-color: #fff;
  margin: auto;
  padding: 0;
  border: 0;
  box-shadow: 0 0.25rem 0.5rem 0 rgba(0, 0, 0, 0.2),
    0 0.375rem 1.25rem 0 rgba(0, 0, 0, 0.19);
  -webkit-animation-name: openModalDesktop;
  -webkit-animation-duration: 0.4s;
  animation-name: openModalDesktop;
  animation-duration: 0.4s;
}

/* Close button */
#appClose {
  display: none;
  position: fixed;
  right: 32px;
  top: 32px;
  width: 47px;
  height: 45px;
  opacity: 0.8;
  background: white;
  z-index: 9999;
  border-radius: 100%;
  border: 2px solid black;
  padding: 5px;
}
#appClose:hover {
  opacity: 1;
  cursor: pointer;
}
#appClose:before,
#appClose:after {
  position: absolute;
  left: 21px;
  content: " ";
  height: 32px;
  width: 2px;
  background-color: #000;
}
#appClose:before {
  transform: rotate(45deg);
}
#appClose:after {
  transform: rotate(-45deg);
}

/* App Iframe */

/*  iframe Safari IOS sucks
*   https: //github.com/PierBover/ios-iframe-fix
*/
/* #appWrapper {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 10%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
} */
#appWrapper {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 10%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#appIframe {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 3;
  margin: 0;
  border: 0;
}
#appIframeTest {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 4;
  margin: 0;
  border: 0;
}

/* Add Animation */

@-webkit-keyframes openModalDesktop {
  from {
    left: -90vw;
    opacity: 0;
  }

  to {
    left: 0;
    opacity: 1;
  }
}

@keyframes openModalDesktop {
  from {
    left: -90vw;
    opacity: 0;
  }

  to {
    left: 0;
    opacity: 1;
  }
}

@-webkit-keyframes openModalMobile {
  from {
    left: -100vw;
    opacity: 0;
  }

  to {
    left: 0;
    opacity: 1;
  }
}

@keyframes openModalMobile {
  from {
    left: -100vw;
    opacity: 0;
  }

  to {
    left: 0;
    opacity: 1;
  }
}

/* Portrait and Landscape */
@media only screen and (min-device-width: 375px) and (max-device-width: 667px) and (-webkit-min-device-pixel-ratio: 2) {
  #appWrapper {
    width: 100vw;
    right: 0;
  }

  #appContainer {
    height: 100vh;
    width: 100vw;
    color: white;
    top: 0;
    left: 0;
    position: absolute;
    background-color: #fff;
    margin: auto;
    padding: 0;
    border: 0;
    box-shadow: 0 0.25rem 0.5rem 0 rgba(0, 0, 0, 0.2),
      0 0.375rem 1.25rem 0 rgba(0, 0, 0, 0.19);
    -webkit-animation-name: openModalMobile;
    -webkit-animation-duration: 0.4s;
    animation-name: openModalMobile;
    animation-duration: 0.4s;
  }
}
/*
#iframeLoader {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background-color: rgba(221, 0, 255, 0.8);
  z-index: 1000;
} */

#iframeLoader {
  background-color: rgba(255, 255, 255, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1000;
}

#iframeLoader::before {
  content: "";
  display: block;
  position: sticky;
  top: 0;
  bottom: 50%;
  height: 50px;
  width: 50px;
  left: 0;
  transform: 0;
  z-index: 2000;
  -webkit-mask-image: url(../../../img/loading.svg);
  mask-image: url(../../../img/loading.svg);
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  background-color: var(--main-brand-color);
}

.loading-filter {
  filter: invert(51%) sepia(33%) saturate(6586%) hue-rotate(117deg)
    brightness(100%) contrast(101%);
}

/* Modal Iframe */
.modal-dialog.modal-fakeiframe {
  max-width: 100%;
}

.modal-dialog.modal-fakeiframe #AppDialog_Content {
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}
.modal-dialog .modal-header .close {
  border-radius: 100%;
  border: 1px solid #d2d2d2;
  margin: 0;
  padding: 0;
  height: 2rem;
  width: 2rem;
  font-weight: 400;
  display: block;
}
.modal-dialog.modal-fakeiframe {
  overflow-y: auto;
  overflow-x: hidden;
  height: 100vh;
  width: 90%;
  color: white;
  z-index: 99999999999;
  top: 0;
  left: 0;
  position: fixed;
  background-color: #fff;
  margin: auto;
  padding: 0;
  border: 0;
  box-shadow: 0 0.25rem 0.5rem 0 rgba(0, 0, 0, 0.2),
    0 0.375rem 1.25rem 0 rgba(0, 0, 0, 0.19);
  -webkit-animation-name: openModalDesktop;
  -webkit-animation-duration: 0.4s;
  animation-name: openModalDesktop;
  animation-duration: 0.4s;
}
.modal-dialog.modal-fakeiframe .modal-content {
  top: 0;
  left: 0;
  bottom: 0;
  right: 10%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  position: relative;
  border-radius: 0;
  box-shadow: none;
  color: var(--main-body-color);
}
