@keyframes modal-in {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.modalChildren {
  cursor: pointer;
  display: inline;
}

.modalInner {
  display: none;
  position: relative;

  &.activeModal {
    display: block;
    z-index: 2;
    animation: modal-in 0.5s forwards;
  }

  .modalOverlay {
    background: var(--cookie-consent-overlay-color);
    opacity: var(--cookie-consent-overlay-opacity);
    position: fixed;
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
    z-index: map-get($z-index, below-content);
  }

  .modalContent {
    background: #000;
    color: grey;
    padding: 2rem;
    max-width: 40rem;
    border-radius: 1rem;
    position: fixed;
    top: 10rem;
    left: calc(50% - 20rem);
    z-index: map-get($z-index, modal);

    .closeIcon {
      position: absolute;
      top: 1rem;
      right: 1rem;
    }
  }

  .modalChildContainer {
    position: fixed;
    top: 0px;
    left: 0px;
    right: 0px;
    height: 100%;
    z-index: map-get($z-index, modal);
    box-shadow: 0px 8px 8px -4px rgba(27, 27, 28, 0.02), 0px 20px 24px -4px rgba(27, 27, 28, 0.05);
    
    @include min(tablet) {
      border-radius: 1.6rem;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
      height: auto;
      width: 63.4rem;
    }
  }
}

.modalContainer {
  display: none;
  position: relative;

  &.activeModal {
    display: block;
    z-index: 25;
    animation: modal-in 0.5s forwards;
  }
}
