dialog.apm-popup::backdrop {
  animation-name: enterDialogBackground;
  animation-duration: 0.25s;
  animation-timing-function: linear;
  animation-direction: forwards;
  background-color: rgba(0, 0, 0, 0.7);
}

dialog.apm-popup {
  animation-name: enterDialog;
  animation-duration: 0.5s;
  animation-timing-function: ease;
  animation-direction: forwards;
  border: none;
  border-radius: 0.75rem;
  max-height: 90vh;
  max-width: 730px;
  padding: 0;
  overflow-y: auto;
  position: relative;
  width: calc(100% - 2.5rem);
}

@media (max-width: 599px) {
  .apm-popup__image.has-separate-images .apm-popup__image--desktop {
    display: none;
  }
}
@media (min-width: 600px) {
  .apm-popup__image.has-separate-images .apm-popup__image--mobile {
    display: none;
  }
}

.apm-popup__content-area {
  padding: clamp(1.5rem, 4vw, 3rem);
  padding-bottom: clamp(2rem, 4vw, 3.5rem);
  text-align: center;
}
.apm-popup__content-area > *:first-child {
  margin-top: 0;
}
.apm-popup__content-area > *:last-child {
  margin-bottom: 0;
}
.apm-popup__content-area h2 {
  margin-bottom: 1.5rem;
}
.apm-popup__content-area h2 + * {
  margin-top: 0 !important;
}

.apm-popup__close-button {
  height: 0px;
  position: sticky;
  top: 0;
  right: 0;
  width: 100%;
}
.apm-popup__close-button button {
  align-items: center;
  background: none;
  border: 1px solid transparent;
  border-radius: 6rem;
  cursor: pointer;
  display: flex;
  height: 49px;
  justify-content: center;
  outline-offset: 0.25rem;
  padding: 0;
  position: absolute;
  right: 1rem;
  top: 1rem;
  transition: background-color 0.25s ease;
  width: 49px;
}
.apm-popup__close-button button:hover circle {
  opacity: 0.9;
}
.apm-popup__close-button svg {
  display: block;
  height: auto;
  width: 100%;
}
@media (max-width: 599px) {
  .apm-popup__close-button button {
    height: 28px;
    width: 28px;
  }
}

@keyframes enterDialogBackground {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
@keyframes enterDialog {
  0% {
    opacity: 0;
    transform: translateX(-2rem);
  }
  100% {
    opacity: 1;
    transform: translateX(0rem);
  }
}
