/* Keep visible popup banners centered in the viewport while the page scrolls. */
.yd-popup-list { position: fixed; }

@media (min-width: 640px) {
  .yd-popup-list {
    top: 215px;
    left: 0;
    right: 0;
    width: min(1100px, calc(100vw - 24px));
    margin-inline: auto;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-content: normal;
    padding-inline: 0;
    max-height: calc(100vh - 230px);
    overflow-y: auto;
    overflow-x: hidden;
  }

  .yd-popup-item { width: 100%; }
  .yd-popup-item img { height: 450px; }
}

@media (max-width: 639px) {
  .yd-popup-list {
    top: 145px;
    max-height: none;
    overflow: visible;
  }
}
