@keyframes modalEnter {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.modal-blocker {
  position: fixed;
  z-index: 1000;

  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;

  background-color: rgba(0, 0, 0, 0.75);
  text-align: center;

  display: flex;
  align-items: center;
  justify-content: center;

  animation: modalEnter 500ms;
}

.modal-frame {
  margin-top: 6px;
  background: white;
  /* TODO: Make this change based on screen size */
  width: 400px;
  display: inline-block;
  text-align: left;

  display: flex;
  background: none;
  flex-direction: column;
}

.modal-title {
  border-radius: 16px 16px 0px 0px;
  border-bottom: solid 1px #ccc;
  padding: 8px;
  background-color: #fafafa;

  h5 {
    color: #333;
    font-weight: bold;
    font-size: 22px;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 4px;
  }
}

.modal-body {
  padding: 12px;
  max-height: 400px;
  overflow: auto;
  flex: 1;
  background-color: #fafafa;
}

.modal-footer {
  border-radius: 0px 0px 16px 16px;
  padding: 8px;
  background-color: #fafafa;

  border-top: solid 1px #ccc;
  display: flex;

  .button-parent {
    flex: 1;
    padding: 5px;
    border: none;
    button {
      background-color: #7fbf7b;
      width: 80%;
    }
  }
}

.modal-footer.two {
  .button-parent:nth-child(1) {
    button {
      background-color: #f7f7f7;
      color: #4c9c39;

      &:disabled {
        color: #aaa;
      }
    }
  }

  .button-parent:nth-child(2) {
    text-align: right;
    button {
      background-color: #7fbf7b;
      &:disabled {
        background-color: #aaa;
      }
    }
  }
}

/** Handle the case when there are three buttons in the footer. */
.modal-footer.three {
  .button-parent:nth-child(1) {
    button {
      background-color: #f7f7f7;
      color: #4c9c39;
      border: solid 1px #4c9c39;
      padding: 11px;

      &:disabled {
        background-color: #aaa;
      }
    }
  }

  .button-parent:nth-child(2) {
    text-align: center;
    button {
      background-color: #af8dc3;
      &:disabled {
        background-color: #aaa;
      }
    }
  }

  .button-parent:nth-child(3) {
    text-align: right;
    button {
      background-color: #7fbf7b;
      &:disabled {
        color: #aaa;
      }
    }
  }
}
