body.popup-open {
  overflow: hidden;
}

@keyframes popup-overlay-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes popup-fade-in {
  from {
    opacity: 0;
    transform: scale(.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.popup-overlay {
  animation-duration: 0.6s;
  animation-fill-mode: both;
  animation-name: popup-overlay-fade-in;
  animation-timing-function: ease-in;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.55);
  bottom: 0;
  height: 100%;
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 1000;
}

.popup-overlay:not([open]) {
  display: none;
}

.popup-wrapper {
  bottom: 0;
  display: none;
  left: 0;
  height: 100%;
  position: fixed;
  right: 0;
  top: 0;
  width: 100%;
  z-index: 1100;
}

.popup-wrapper[open] {
  display: block;
  overflow: scroll;
}

.popup {
  animation-duration: 0.4s;
  animation-fill-mode: both;
  animation-name: popup-fade-in;;
  box-shadow: 0 0 6vw rgba(0, 0, 0, 0.4);

  .image img {
    display: block;
    object-fit: cover;
    height: 100%;
  }

  label:has(> input) {
    margin-bottom: var(--margin-md);
  }

  input[type="email"],
  input[type="text"] {
    border: 1px solid white;
    margin-bottom: var(--margin-md);
    padding: var(--margin-sm);
    width: 100%;
  }

  .image {
    position: relative;
  }
}

.popup:not(.invert) {
  background-color: var(--colour-background);
}

.popup-close {
  cursor: pointer;
  font-size: 250%;
  line-height: 1em;
  position: absolute;
  right: 1.2vw;
  top: 1.2vw;
  z-index: 1200;
}
