/* User Provided Stylesheet */

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  min-height: 0;
  flex: 1 0 auto;
}

.article.content {
  /* Override 100vh from myst-theme:styles/typography.css so content div
   * doesn't grow <main> to push the footer offscreen.
   */
  min-height: 0;
}

.footer {
  /* Make footer "sticky" to page bottom (also the above flex rules), per
   * the flexbox strategy described here:
   *    https://css-tricks.com/couple-takes-sticky-footer/#aa-there-is-flexbox
   * and here:
   *    https://philipwalton.github.io/solved-by-flexbox/demos/sticky-footer/
   * This solution does not require hardcoding a fixed footer height in the
   * style rules.
   */
  flex-shrink: 0;
  background: #013243;
  color: white;
  padding-left: 2rem;
  padding-right: 2rem;

  /* Outer content grid */
  & .outer-grid {
    /* logo, project description, link columns, social icons */
    grid-template-columns: 2fr 6fr 8fr 3fr;
    column-gap: 4rem;
    align-items: center;
    margin: 0rem 4rem;

    & li {
      list-style: none;
    }
  }

  @media (max-width: 640px) {
    & .outer-grid {
      grid-template-columns: 1fr;
      justify-items: start;
    }
  }

  /* Heading colours */
  & a,
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    color: white;
  }

  & h1 {
    font-size: 1.25rem;
    font-weight: bold;
  }
  & .footer-links {
    column-gap: 1.5rem;
    line-height: normal;

    & a {
      color: white;
      text-decoration-color: white;
      display: inline-block;
      white-space: nowrap;

      /* MyST renders external links as
       * <a class="whitespace-nowrap"><span class="link-text whitespace-normal">.
       * Override the span so multi-word labels stay on one line. */
      & .link-text {
        white-space: nowrap;
      }
    }
  }

  & .footer-icons {
    column-gap: 3rem;
    row-gap: 1rem;

    & img {
      filter: invert(100%);
      margin-bottom: 0.1rem;
      margin-top: 0.1rem;
      min-width: 1.75rem;
      width: 1.75rem;
    }
  }
}

.footer-logo {
  min-width: 60px;
}

/* Hide download button */
.myst-fm-downloads-button {
  display: none;
}

/* Set site title bold */
.myst-home-link {
  font-weight: bold;
}

/* Unsure where this CSS came from, but keeping it for now */
/* --- Make layout feel less "book-ish" and closer to a website --- */
.bd-main .bd-content .bd-article-container {
  max-width: 900px; /* keep readable, less wide than default "docs" feel */
}

h1,
h2,
h3,
h4 {
  letter-spacing: -0.01em;
}

/* Slightly tighten the top spacing so it feels more like a marketing/docs site */
.bd-header {
  box-shadow: none;
}

/* If the left sidebar feels too dominant, reduce its visual weight */
.bd-sidebar-primary {
  border-right: 0;
}

.copyright {
  font-size: smaller;
}
