.activity-stream {
  &.modal-open {
    overflow: hidden;
  }
}

.modalOverlayOuter {
  background: var(--newtab-overlay-color);
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: none;
  z-index: 1100;

  &.active {
    display: block;
  }
}

.modalOverlayInner {
  width: 960px;
  position: fixed;
  top: 20%;
  left: calc(50% - 480px); // halfway across minus half the width of the modal
  max-height: calc(100% - 100px);
  background: $white;
  box-shadow: 0 1px 15px 0 $black-30;
  border-radius: 4px;
  display: none;
  z-index: 1101;


  // modal takes over entire screen
  @media(max-width: 960px) {
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    box-shadow: none;
    border-radius: 0;
  }

  // if modal is short enough, add a vertical scroll bar
  @media(max-width: 850px) and (max-height: 730px) {
    overflow-y: scroll;
  }

  // if modal is narrow enough, add a vertical scroll bar
  @media(max-width: 650px) and (max-height: 600px) {
    overflow-y: scroll;
  }

  &.active {
    display: block;
  }

  h2 {
    color: $grey-60;
    text-align: center;
    font-weight: 200;
    margin-top: 30px;
    font-size: 28px;
    line-height: 37px;
    letter-spacing: -0.13px;

    @media(max-width: 960px) {
      margin-top: 100px;
    }

    @media(max-width: 850px) {
      margin-top: 30px;
    }
  }

  .footer {
    border-top: 1px solid $grey-30;
    border-radius: 4px;
    height: 70px;
    width: 100%;
    position: absolute;
    bottom: 0;
    text-align: center;
    background-color: $white;

    // if modal is short enough, footer becomes sticky
    @media(max-width: 850px) and (max-height: 730px) {
      position: sticky;
    }

    // if modal is narrow enough, footer becomes sticky
    @media(max-width: 650px) and (max-height: 600px) {
      position: sticky;
    }

    .modalButton {
      margin-top: 20px;
      min-width: 150px;
      height: 30px;
      padding: 4px 30px 6px;
      font-size: 15px;

      &:focus,
      &.active,
      &:hover {
        box-shadow: 0 0 0 5px $grey-30;
        transition: box-shadow 150ms;
      }
    }
  }
}
