.modal {
  text-align: left;
  width: min(50em, 100%);
  max-height: 100vh;
  padding: 0;
  margin: auto !important;
  border: none;
  box-shadow: 0 0 100px #0003;

  &[open] {
    animation: showModal 0.3s;
    animation-fill-mode: both;
  }
}

@keyframes showModal {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-content {
  max-height: 100vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal-close {
  --color-icons: white;

  position: absolute;
  top: 0;
  right: 0;
  color: white;
  background: var(--color-primary);
  border: none;
  padding: 1rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;

  & svg {
    display: block;
    width: 2rem;
    height: 2rem;
  }

  &:hover {
    background: color-mix(in srgb, var(--color-primary), black 10%);
  }
}
