/* Keep settings navigation and the section heading in view while long lists scroll. */
@media (min-width: 821px) {
  .canvas:has(.desktop-navigation):has(.settings-preferences-page) {
    display: flex;
    flex-direction: column;
  }
  .canvas:has(.settings-preferences-page) > .desktop-navigation { flex: 0 0 auto; }
  .canvas:has(.desktop-navigation):has(.settings-preferences-page) > .app-frame {
    flex: 1 1 0;
    height: 0;
    max-height: none;
  }
  .canvas:has(.desktop-navigation) .content-body:has(> .settings-preferences-page) {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-bottom: 24px;
    scroll-padding-bottom: 0;
  }
  .settings-preferences-page {
    flex: 1 1 0;
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr);
    padding-bottom: 0;
  }
  .settings-preferences-columns { min-height: 0; align-items: stretch; }
  .settings-preferences-navigation {
    min-height: 0;
    max-height: 100%;
    align-self: start;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scrollbar-gutter: stable;
  }
  .settings-preferences-content {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
  }
  .settings-preferences-content-title { flex: 0 0 auto; }
  .settings-preferences-body, .settings-preferences-results {
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scrollbar-gutter: stable;
    scroll-padding-block: 12px;
    padding: 3px;
  }
  .settings-preferences-body { flex: 1 1 auto; }
  .settings-preferences-results { flex: 0 1 auto; }
  .settings-preferences-page :is(.settings-preferences-navigation, .settings-preferences-body, .settings-preferences-results) {
    scrollbar-width: thin;
    scrollbar-color: var(--adi-button-ink, #5e6e83) transparent;
  }
}
