.popup-builder-dialog {
  position: fixed;
  inset: 0;
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: #25283a;
  box-shadow: none;
}

.popup-builder-dialog::backdrop {
  background: rgb(12 17 32 / 64%);
}

html:has(.popup-builder-dialog[open]) {
  overflow: hidden;
}

.popup-builder-dialog--image {
  width: fit-content;
  overflow: visible;
}

.popup-builder-dialog--code {
  width: 100%;
  height: 100%;
  height: 100dvh;
  margin: 0;
  overflow: hidden;
}

.popup-builder-dialog--code:not([open]) {
  display: block;
  opacity: 0;
  pointer-events: none;
}

.popup-builder-close {
  position: absolute;
  top: .5rem;
  left: .5rem;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: .5rem;
  background: #f2f2f6;
  color: inherit;
  font: 1.5rem/1 system-ui, sans-serif;
  cursor: pointer;
}

.popup-builder-close:hover {
  background: #e6e7ef;
}

.popup-builder-image {
  display: block;
  width: auto;
  height: auto;
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  max-width: calc(100vw - 2rem);
}

.popup-builder-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
