/** html and body must have 100% height **/
html,
body {
  height: 100%;
}
/** this must be set at the topmost container ONLY,
    and there must be EXACTLY one container in the page
    with this class **/
.layout-container {
  height: 100%;
  min-height: 100%;
  max-height: 100%;
}
/** border layout container. Must contain .row elements
    having .col-* cells inside, and nothing else **/
.main-col,
.sidebar-col {
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
}
@media (min-width: 768px) {
  .layout-border {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    /** plain .row elements inside a layout-border have always
        their natural height. They do neither grow nor shrink **/
  }
  .layout-border > .row {
    display: flex;
    flex-grow: 0;
    flex-shrink: 0;
    /** .row.stretch elements grow to the height of the surrounding
        .layout-border element, and shrink if they are too large. **/
    /** .row.shrink elements will only shrink, but not grow. Note that
         those should get a max-height value or this would not work as
         intended **/
  }
  .layout-border > .row.stretch {
    flex-grow: 1;
    flex-shrink: 1;
    flex-basis: auto;
    min-height: 0;
    /** cells inside a .stretch and .shrink row will scroll if
            they are larger than the region of the .row **/
    /** sidebar: column for main content (only use one) */
  }
  .layout-border > .row.stretch > [class^="col-"],
  .layout-border > .row.stretch > [class*=" col-"] {
    overflow-y: auto;
  }
  .layout-border > .row.stretch > .main-col {
    width: auto;
    flex: 1 1 auto;
    overflow-y: auto;
    padding-right: 15px;
    padding-left: 15px;
    min-width: 50%;
  }
  .layout-border > .row.stretch > .sidebar-col {
    width: auto;
    flex: 0 0 auto;
    overflow-y: auto;
    padding-right: 15px;
    padding-left: 15px;
  }
  .layout-border > .row.shrink {
    flex-grow: 0;
    flex-shrink: 1;
    flex-basis: auto;
    min-height: 0;
  }
  .layout-border > .row.shrink > [class^="col-"],
  .layout-border > .row.shrink > [class*=" col-"] {
    overflow-y: auto;
  }
}
.layout-row-distribute {
  display: flex;
  justify-content: space-between;
}
