.ocs-article-popup {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  width: min(40rem, calc(100% - 2rem));
  max-height: calc(100% - 2rem);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 1rem;
  background: #fff;
  color: #182230;
  box-shadow: 0 18px 60px rgb(0 0 0 / 28%);
  text-align: center;
}

.ocs-article-popup::backdrop {
  background: rgb(15 23 42 / 65%);
}

.ocs-article-popup__image {
  display: block;
  width: 100%;
  max-height: 42vh;
  object-fit: contain;
  background: #f3f5f7;
}

.ocs-article-popup__body {
  padding: 1.75rem clamp(1rem, 5vw, 2.5rem);
}

.ocs-article-popup__body h2 {
  margin: 0 0 1rem;
  padding-inline: 1.25rem;
  font-size: clamp(1.15rem, 3vw, 1.6rem);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.ocs-article-popup__link {
  display: inline-block;
  padding: .65rem 1.2rem;
  border-radius: .5rem;
  background: #861b38;
  color: #fff;
  font-weight: 600;
}

.ocs-article-popup__link:hover,
.ocs-article-popup__link:focus {
  background: #64132a;
  color: #fff;
}

.ocs-article-popup__close {
  position: absolute;
  top: .5rem;
  right: .5rem;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  background: #fff;
  color: #182230;
  font-size: 1.65rem;
  line-height: 1;
}

.ocs-article-popup :focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 3px;
}

/* OCS popup image at 80% of viewport */
.ocs-article-popup:has(> .ocs-article-popup__image) {
  width: 80vw;
  max-width: 80vw;
  max-height: 96vh;
  max-height: 96dvh;
}

.ocs-article-popup > .ocs-article-popup__image {
  width: 100%;
  height: 80vh;
  height: 80dvh;
  max-height: none;
  object-fit: contain;
  object-position: center;
}
