html.dlp-popup-open { overflow: hidden; }

.dlp-popup {
  position: fixed;
  width: min(960px, calc(100% - 40px));
  max-width: none;
  max-height: calc(100dvh - 40px);
  padding: 0;
  border: 0;
  border-radius: 20px;
  color: var(--dlp-green);
  background: #fff;
  overscroll-behavior: contain;
}

.dlp-popup:not(.dlp-popup--image) { width: min(520px, calc(100% - 40px)); }
.dlp-popup::backdrop { background: rgb(0 0 0 / 50%); }
.dlp-popup__card { position: relative; }
.dlp-popup__image { min-width: 0; }
.dlp-popup__image picture { display: block; height: 100%; }

.dlp-popup__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dlp-popup__content {
  display: flex;
  min-width: 0;
  padding: 56px;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 24px;
  font: 400 16px/22px var(--dlp-body);
}

.dlp-popup__content .eyebrow { margin-bottom: 8px; font-size: 15px; line-height: 20px; color: inherit; }
.dlp-popup__content h2 { font-size: 38px; }

.dlp-popup__close {
  position: absolute;
  inset: 7px 8px auto auto;
  z-index: 1;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: inherit;
  font: 400 28px/1 var(--dlp-body);
}

@media (min-width: 641px) {
  .dlp-popup--image .dlp-popup__card {
    display: grid;
    grid-template-columns: minmax(0, 440fr) minmax(0, 520fr);
    min-height: min(520px, calc(100dvh - 40px));
  }
  .dlp-popup__image { position: relative; }
  .dlp-popup__image img { position: absolute; inset: 0; }
  .dlp-popup__content { padding: clamp(32px, 5vw, 56px); }
}

@media (max-width: 640px) {
  .dlp-popup, .dlp-popup:not(.dlp-popup--image) { width: min(350px, calc(100% - 40px)); }
  .dlp-popup__image { height: 220px; }
  .dlp-popup__content { padding: 28px 24px; gap: 16px; }
  .dlp-popup__content h2 { font-size: 28px; }
  .dlp-popup--image .dlp-popup__close { color: #fff; text-shadow: 0 1px 4px #000; }
}

.dlp-popup__heading:focus-visible { outline: none; }
