.rpp-scroll-locked { overflow: hidden !important; }

.rpp-popup-root,
.rpp-popup-root * { box-sizing: border-box; }

.rpp-popup-root {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--rpp-text);
  font-family: inherit;
}

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

.rpp-overlay {
  position: absolute;
  inset: 0;
  background: rgba(var(--rpp-overlay), var(--rpp-overlay-opacity));
  opacity: 0;
  transition: opacity .25s ease;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.rpp-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(var(--rpp-width), calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow: hidden auto;
  border-radius: var(--rpp-radius);
  background: var(--rpp-bg);
  color: var(--rpp-text);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .3);
  opacity: 0;
  outline: none;
  transition: opacity .25s ease, transform .28s cubic-bezier(.2, .8, .2, 1);
}

.rpp-has-image.rpp-image-left,
.rpp-has-image.rpp-image-right { grid-template-columns: minmax(0, 43%) minmax(0, 57%); }
.rpp-has-image.rpp-image-right { grid-template-columns: minmax(0, 57%) minmax(0, 43%); }
.rpp-image-right .rpp-image-wrap { order: 2; }
.rpp-image-top { grid-template-columns: 1fr; }
.rpp-image-top .rpp-image-wrap { min-height: 260px; max-height: 42vh; }

.rpp-image-wrap { min-height: 100%; background: #eef0f3; }
.rpp-image-wrap img { display: block; width: 100%; height: 100%; min-height: 340px; object-fit: cover; }
.rpp-image-top .rpp-image-wrap img { min-height: 260px; max-height: 42vh; }

.rpp-dialog.rpp-image-only {
  display: block;
  width: fit-content;
  max-width: min(var(--rpp-width), calc(100vw - 48px));
  overflow: hidden;
  background: transparent;
  line-height: 0;
}
.rpp-image-only .rpp-image-wrap { display: flex; justify-content: center; min-height: 0; background: transparent; }
.rpp-image-only .rpp-image-wrap img {
  width: auto;
  max-width: 100%;
  height: auto;
  min-height: 0;
  max-height: calc(100vh - 48px);
  object-fit: contain;
}

.rpp-content { align-self: center; padding: clamp(32px, 5vw, 58px); }
.rpp-content h2 { margin: 0 0 16px; padding: 0; color: inherit; font: inherit; font-size: clamp(26px, 3.2vw, 42px); font-weight: 750; line-height: 1.12; letter-spacing: -.025em; }
.rpp-copy { font-size: 17px; line-height: 1.65; opacity: .82; }
.rpp-copy > :first-child { margin-top: 0; }
.rpp-copy > :last-child { margin-bottom: 0; }
.rpp-cta { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; margin-top: 26px; padding: 12px 24px; border-radius: 999px; background: var(--rpp-button); color: var(--rpp-button-text) !important; font-size: 16px; font-weight: 700; line-height: 1.2; text-decoration: none !important; transition: transform .2s ease, filter .2s ease; }
.rpp-cta:hover { color: var(--rpp-button-text) !important; filter: brightness(.92); transform: translateY(-1px); }
.rpp-cta:focus-visible, .rpp-close:focus-visible { outline: 3px solid var(--rpp-button); outline-offset: 3px; }

.rpp-close { position: absolute; z-index: 3; top: 14px; right: 14px; display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .9); color: #111827; box-shadow: 0 5px 18px rgba(0, 0, 0, .14); cursor: pointer; font: 300 30px/1 Arial, sans-serif; transition: transform .2s ease, background .2s ease; }
.rpp-close:hover { background: #fff; transform: rotate(5deg) scale(1.04); }

.rpp-animation-zoom .rpp-dialog { transform: scale(.92); }
.rpp-animation-slide .rpp-dialog { transform: translateY(35px); }
.rpp-animation-fade .rpp-dialog { transform: none; }
.rpp-popup-root.is-visible .rpp-overlay,
.rpp-popup-root.is-visible .rpp-dialog { opacity: 1; }
.rpp-popup-root.is-visible .rpp-dialog { transform: none; }

@media (max-width: 767px) {
  .rpp-popup-root { padding: 16px; }
  .rpp-dialog { width: var(--rpp-mobile-width); max-height: calc(100dvh - 32px); }
  .rpp-dialog.rpp-image-only { width: fit-content; max-width: var(--rpp-mobile-width); }
  .rpp-has-image.rpp-image-left,
  .rpp-has-image.rpp-image-right { grid-template-columns: 1fr; }
  .rpp-image-right .rpp-image-wrap { order: 0; }
  .rpp-image-wrap,
  .rpp-image-top .rpp-image-wrap { min-height: 180px; max-height: 34vh; }
  .rpp-image-wrap img,
  .rpp-image-top .rpp-image-wrap img { min-height: 180px; max-height: 34vh; }
  .rpp-image-only .rpp-image-wrap { min-height: 0; max-height: none; }
  .rpp-image-only .rpp-image-wrap img { min-height: 0; max-height: calc(100dvh - 32px); }
  .rpp-content { padding: 28px 25px 30px; }
  .rpp-content h2 { margin-bottom: 12px; font-size: clamp(23px, 7vw, 32px); }
  .rpp-copy { font-size: 15px; line-height: 1.55; }
  .rpp-cta { width: 100%; margin-top: 21px; }
  .rpp-close { top: 10px; right: 10px; width: 36px; height: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  .rpp-overlay, .rpp-dialog, .rpp-cta, .rpp-close { transition: none !important; }
}
