.elementor-popup-modal .dialog-message:has(.popup-form-host),
.pum .pum-container:has(> .pum-content.popup-form-host) {
  max-height: min(42rem, calc(100dvh - 2rem));
}

.pum .pum-container:has(> .pum-content.popup-form-host) {
  display: flex !important;
  flex-direction: column;
}

.elementor-popup-modal .dialog-message:has(.popup-form-host),
.pum-content.popup-form-host {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
}

.popup-form-loading {
  position: relative;
  min-height: 12rem;
}

.popup-form-loading iframe[src*="form.jotform.com/"] {
  visibility: hidden;
}

.popup-form-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.875rem;
  color: #2e475d;
  font:
    500 0.875rem/1.4 Inter,
    sans-serif;
  pointer-events: none;
}

.popup-form-loader::after {
  width: 9rem;
  height: 0.375rem;
  border-radius: 9999px;
  background:
    linear-gradient(90deg, transparent, #fff 50%, transparent) -4rem 0 / 4rem
      100% no-repeat,
    linear-gradient(90deg, #ea1d26, #ff6c03);
  animation: popup-form-shimmer 0.95s linear infinite;
  content: "";
}

@keyframes popup-form-shimmer {
  to {
    background-position:
      9rem 0,
      0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .popup-form-loader::after {
    animation: none;
  }
}
