/*
 * Viewport-safe scrolling for the shows plugin's genuinely nested popups.
 * The child combinator intentionally excludes broadcast dialogs whose overlay
 * and content elements are siblings rather than parent and child.
 */
.popup__overlay > .popup__content {
  box-sizing: border-box;
  max-height: calc(100vh - 24px);
  max-height: calc(
    100dvh - max(12px, env(safe-area-inset-top)) -
      max(12px, env(safe-area-inset-bottom))
  );
  margin-top: max(12px, env(safe-area-inset-top));
  margin-bottom: max(12px, env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

@media screen and (max-width: 800px) {
  .popup__overlay > .popup__content {
    width: 100%;
    min-width: 0;
    height: auto;
  }
}
