﻿/* Fix sticky footer - override CDN 750px height constraint */

html {
   height: 100%;
}

body {
   min-height: 100vh;
   height: auto;
   margin: 0;
   display: flex;
   flex-direction: column;
}

/* Override the 750px height from CDN and make mainWrapper flexible */
#mainWrapper,
#mainWrapper.container-fluid,
div#mainWrapper.container-fluid {
   flex: 1 0 auto;
   height: auto !important;
   min-height: 0 !important;
   max-height: none !important;
   display: flex;
   flex-direction: column;
   width: 100%;
}

   /* Make the section with content also flexible */
   #mainWrapper > section.row {
      flex: 1 0 auto;
      display: flex;
      flex-direction: column;
   }

   /* Make center-content expand */
   #mainWrapper #center-content {
      flex: 1 0 auto;
   }

   /* Ensure header doesn't grow */
   #mainWrapper > header {
      flex-shrink: 0;
   }

   /* Mobile nav shouldn't grow either */
   #mainWrapper > .mobile-nav,
   #mainWrapper > .mobile-page-menu {
      flex-shrink: 0;
   }

/* Footer fixes - ensure it doesn't shrink/collapse and spans full width */
body > .container-fluid {
   flex-shrink: 0;
   width: 100%;
   max-width: 100%;
   margin: 0;
}

footer,
footer.span12,
[id*="footer"],
[class*="footer"] {
   flex-shrink: 0;
   width: 100% !important;
   max-width: 100% !important;
}

/* Ensure footer's parent containers don't constrain width */
body > .container-fluid > .row-fluid {
   width: 100%;
   margin: 0;
}
