.modal {
  /* Underlay covers entire screen. */
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 1000;

  /* Animate when opening */
  /* animation-name: fadeIn; */
  animation-duration: 150ms;
  animation-timing-function: ease;
}

.modal > .modal-underlay {
  /* underlay takes up the entire viewport. This is only
	required if you want to click to dismiss the popup */
  position: absolute;
  z-index: -1;
  top: 0px;
  bottom: 0px;
  left: 0px;
  right: 0px;
}

.modal > .modal-content {
  /* Animate when opening */
  /* animation-name: zoomIn; */
  animation-duration: 150ms;
  animation-timing-function: ease;
  padding: 2rem 1rem;
  min-width: 750px;
}

.modal.closing {
  /* Animate when closing */
  /* animation-name: fadeOut; */
  animation-duration: 150ms;
  animation-timing-function: ease;
}

.modal.closing > .modal-content {
  /* Animate when closing */
  animation-name: zoomOut;
  animation-duration: 150ms;
  animation-timing-function: ease;
}

.modal-content button {
  margin-top: 1.5rem;
}

.modal-icon {
  font-size: 2rem;
  float: right;
  margin-left: 2rem;
  cursor: pointer;
  padding: 0;
  margin-bottom: 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  background-color: var(--pico-background-color-inverse);
}

.modal-icon-left {
  font-size: 1.5rem;
  float: left;
  margin-right: 2rem;
}

.modal-footer {
  display: flex;
  gap: 1rem;
  padding-left: 1rem;
  padding-right: 1rem;
}

dialog.modal > article.modal-content > footer #submit-btn,
dialog.modal > article.modal-content > footer #cancel-btn {
  min-width: 8rem;
  max-width: 8rem;
}

dialog.modal > article.modal-content {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

dialog button.submit-btn,
dialog button.cancel-btn,
dialog button.edit-btn,
dialog button.delete-btn {
  margin: 0rem auto;
}

.modal-body label[for="active"] {
  margin-bottom: 1rem;
}

/***** Animations ******/
@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

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

@keyframes zoomIn {
  0% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes zoomOut {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(0.9);
  }
}
