.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1001;
}
.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal .modal-inner{
  background: #fff;
  padding: 2rem;
  border-radius: 10px;
  min-width: 300px;
  opacity: 0;
  transform: scale(0.9);
  animation: anim-modal 0.4s forwards;
}
@keyframes anim-modal {
  to {
    opacity: 1;
    transform: scale(1);
  }
}