@import "import";

.nestedLayout {
  $padding: spacer(lg);
  @include global-container($padding);
  color: color(text);
  max-width: max-w(content);
  min-height: calc(
    100vh - var(--header-height) - var(--footer-height) - $padding + $padding/2
  );

  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  p,
  a,
  button,
  blockquote,
  code,
  pre {
    width: fit-content;

    &:not(:first-child) {
      margin-top: spacer(7);
    }

    a {
      display: inline;
      width: fit-content;
      margin-top: 0;
    }

    code {
      display: inline;
    }
  }

  h1 {
    margin-bottom: spacer(5);
  }

  strong {
    font-weight: font-weight(bold);
  }

  & > a,
  & > button {
    display: block !important;
  }

  ul,
  ol {
    list-style-position: outside;
    margin: 0 spacer(7);
  }

  ul {
    list-style-type: disc;
  }

  ol {
    list-style-type: decimal;
  }

  ul ul,
  ol ul,
  ol ol,
  ul ol {
    list-style-position: outside;
    margin-left: 2ch;
  }

  ul ul,
  ol ul {
    list-style-type: square;
  }

  ol ol,
  ul ol {
    list-style-type: lower-latin;
  }

  li {
    margin-top: spacer(4);
  }

  span {
    display: inline;
  }

  blockquote {
    width: 100%;

    p {
      &:not(:first-child) {
        margin-top: spacer(2);
      }
    }
  }

  pre {
    code {
      display: inline-block;
      text-wrap: wrap;
    }
  }

  hr {
    margin: spacer(7) 0;
  }

  &.center {
    @include flex(column);
  }
}
