.modal {
  align-items: center;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  left: 0;
  padding: var(--space-medium);
  position: fixed;
  right: 0;
  top: 0;
  visibility: hidden;
  z-index: -1;
}

.modal__background {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(var(--rgb-white), 0.9);
  bottom: 0;
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
}

.modal__container {
  margin: auto;
  max-height: 100%;
  overflow: initial;
}

.modal__content {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-inline: auto;
  position: relative;
  width: min(100%, 40em);
}

.modal__content--swap {
  display: none;
}

.modal__content--swapped {
  display: flex;
}

.modal__close {
  align-items: center;
  border-radius: 100%;
  color: var(--color-black);
  cursor: pointer;
  display: flex;
  height: 1.6em;
  justify-content: center;
  position: fixed;
  right: 1em;
  top: 1em;
  width: 1.6em;
  z-index: 1;
}

.modal__close span {
  display: none;
}

.modal__close svg {
  display: flex;
  height: 0.5em;
  width: 0.5em;
}



@media(hover: hover) {

  .modal__close {
    transition: background var(--transition);
  }

  .modal__close:focus,
  .modal__close:hover {
    background: rgba(var(--rgb-grey), 0.1);
  }

}



@media(min-width: 64em) {

  .modal {
    padding-inline: var(--space-large);
  }

}



html.modal-active {
  overflow: hidden;
}

html.modal-active .modal {
  visibility: visible;
  z-index: 1000;
}
