/* The opt-in viewport-fill app shell.
 *
 * A page sets body class "app-shell-fill" to become a fixed viewport-height flex column: the
 * chrome (impersonation banner, navbar, breadcrumb) takes its natural height and the content
 * region (#parentelement) fills the rest and scrolls. No per-page pixel offsets, robust to
 * chrome changes. Pages that don't opt in keep normal window scrolling, so the scroll-to-top
 * button and friends are unaffected.
 *
 * This lived in a <style> block inside base.html, which is how base.html grew past the length
 * this repo's guard allows. A stylesheet is where stylesheet rules belong: it caches, it is
 * greppable next to the other css, and base.html goes back to being markup.
 */
@media (min-width: 992px) { /* allow-length: Bootstrap's `lg` breakpoint, moved here verbatim with the rules it already guarded. Media queries are evaluated before custom properties resolve, so var() cannot be used in one and this number has no token form to reference. */
  body.app-shell-fill {
    height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  body.app-shell-fill > #parentelement {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
  }

  body.app-shell-fill #parentelement > .main-content {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  /* Where the chrome stops and the scrolling region starts. */
  body.app-shell-fill > #breadcrumbs {
    border-bottom: var(--bs-border-width) solid var(--bs-border-color);
  }
}
