html.jw-navbar-bootstrap-classic[data-theme="forgejo-auto"] {

  /* Be more specific than Bootstraps scaffolding.css, which sets font-size
   * to 10px and messes up all 1rem heights in Forgejo */
  font-size: 14px;

  /* Remove space between janware and forgejo menu bars */
  nav#navbar.jw-navbar {
    margin-bottom: 0;
    display: block; /* override forgejo's flex */
    background: black;
  }

  /* Move repository pane a little to the right */
  div.full div.page-content div.flex-container {
    padding-right: 0;
    padding-left: 0;
  }
}

html.mod-navbar-shoelace {

  #jw-bt-wrap.container {
    display: flex;
    flex-direction: column;
    padding-left: 5px;
    padding-right: 5px;
    height: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  #jw-bt-wrap .full.height .page-content .ui.container {
    width: 100%;
    max-width: 100%;
    padding: 0;
  }

  header#body-header > nav.navbar-shoelace {
    margin-bottom: 0;
  }

  @media(max-width: 1199px) {
    #jw-bt-wrap.container {
      padding-left: 5px;
      padding-right: 5px;
    }

    .page-content .ui.container {
      padding-left: 0px;
      padding-right: 0px;
    }
  }

  @media(max-width: 767px) {
    #jw-bt-wrap.container {
      margin-left: 0;
      margin-right: 0;
    }
  }
}

html.mod-navbar-c2g-sidebar-menu > body {

  flex-direction: row; /* With the nav sidebar, flex-direction column places Forgejo below the sidebar */
  height: unset;       /* Otherwise, with 100% as requested by index.css, the sidebar's "position: sticky" won't work */

  div.full.height {
    min-width: 0;          /* Don't overflow the body's flexbox RHS item area */
    padding-bottom: unset; /* Don't be 80 px higher than the sidebar */
  }

  #sidebar {
    z-index: 100;          /* Stay above the heatmap */
  }

  @media(max-width: 1200px) {
    #dashboard-repo-list .menu.tabs-with-labels {
      flex-direction: column; /* Don't overflow the body's flexbox RHS item area */
    }
  }
}
