.eipp-lock-scroll {
  overflow: hidden !important;
}

.eipp-popup[hidden] {
  display: none !important;
}

.eipp-popup {
  align-items: center;
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 2147483646;
}

.eipp-popup__backdrop {
  background: rgba(0, 0, 0, 0.72);
  inset: 0;
  opacity: 0;
  position: absolute;
  transition: opacity 180ms ease;
}

.eipp-popup__dialog {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.35);
  height: min(var(--eipp-max-height, 80vh), calc(100vh - 48px));
  max-width: var(--eipp-max-width, 760px);
  opacity: 0;
  overflow: visible;
  position: relative;
  transform: translateY(16px) scale(.98);
  transition: opacity 180ms ease, transform 180ms ease;
  width: 100%;
  z-index: 1;
}

.eipp-popup.is-visible .eipp-popup__backdrop,
.eipp-popup.is-visible .eipp-popup__dialog {
  opacity: 1;
}

.eipp-popup.is-visible .eipp-popup__dialog {
  transform: translateY(0) scale(1);
}

.eipp-popup__close {
  align-items: center;
  background: #111;
  border: 2px solid #fff;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  display: flex;
  font: 400 28px/1 Arial, sans-serif;
  height: 38px;
  justify-content: center;
  padding: 0 0 3px;
  position: absolute;
  right: -14px;
  top: -14px;
  width: 38px;
  z-index: 2;
}

.eipp-popup__close:focus-visible {
  outline: 3px solid #4da3ff;
  outline-offset: 2px;
}

.eipp-popup__frame {
  background: #fff;
  border: 0;
  border-radius: inherit;
  display: block;
  height: 100%;
  width: 100%;
}

@media (max-width: 767px) {
  .eipp-popup { padding: 16px; }
  .eipp-popup__dialog {
    height: min(var(--eipp-mobile-height, 85vh), calc(100vh - 32px));
    max-width: none;
    width: min(var(--eipp-mobile-width, 94vw), calc(100vw - 32px));
  }
  .eipp-popup__close { right: -8px; top: -8px; }
}

@media (prefers-reduced-motion: reduce) {
  .eipp-popup__backdrop,
  .eipp-popup__dialog { transition: none; }
}
