.site-l-content-wrapper {
  max-width: 1200px;
}

.site-l-content-wrapper--centered {
  margin: 0 auto;
}

.site-l-content-wrapper--styleguide {

  // Put syntax highlighter here to avoid conflicts with
  // Formation base styles

  .highlight {
    margin: $units-2 0;
  }

  /* Base styles */
  .highlight pre {
    margin: 0;
    color: $vads-color-base;
    font-size: $font-size-root;
    line-height: 1.5;
  }

  /* Comments */
  .highlight .c,
  .highlight .ch,
  .highlight .cd,
  .highlight .cm,
  .highlight .cpf,
  .highlight .c1,
  .highlight .cs {
    color: $vads-color-gray-medium;
    font-style: $font-style-italic;
  }

  /* Keywords */
  .highlight .k,
  .highlight .kd,
  .highlight .kn,
  .highlight .kp,
  .highlight .kr,
  .highlight .kt {
    color: $vads-color-primary-darker;
    font-weight: $font-weight-bold;
  }

  /* Functions and Classes */
  .highlight .nc,
  .highlight .nf,
  .highlight .fm {
    color: $vads-color-hub-education;
    font-weight: $font-weight-bold;
  }

  /* Strings */
  .highlight .s,
  .highlight .sa,
  .highlight .sb,
  .highlight .sc,
  .highlight .dl,
  .highlight .sd,
  .highlight .s2,
  .highlight .sh,
  .highlight .sx,
  .highlight .s1,
  .highlight .sr {
    color: $vads-color-secondary;
  }

  /* Numbers */
  .highlight .m,
  .highlight .mb,
  .highlight .mf,
  .highlight .mh,
  .highlight .mi,
  .highlight .mo,
  .highlight .il {
    color: $vads-color-hub-careers;
  }

  /* Variables */
  .highlight .n,
  .highlight .nv,
  .highlight .vc,
  .highlight .vg,
  .highlight .vi,
  .highlight .vm {
    color: $vads-color-primary;
  }

  /* Constants */
  .highlight .no,
  .highlight .bp {
    color: $vads-color-hub-health-care;
    font-weight: $font-weight-bold;
  }

  /* Tags (HTML/JSX) */
  .highlight .nt {
    color: $vads-color-hub-health-care;
  }

  /* Attributes (HTML/JSX) */
  .highlight .na {
    color: $vads-color-hub-burials;
  }

  /* Punctuation */
  .highlight .p,
  .highlight .pi {
    color: $vads-color-base;
  }

  /* Operators */
  .highlight .o,
  .highlight .ow {
    color: $vads-color-base;
    font-weight: $font-weight-bold;
  }

  /* JSX/JavaScript specific */
  .highlight .nx {
    color: $vads-color-primary-dark;
  }

  /* Import/Export keywords */
  .highlight .kd {
    color: $vads-color-primary-darker;
    font-weight: $font-weight-bold;
  }

  /* Template literals */
  .highlight .template-string {
    color: $vads-color-secondary;
  }

  /* Property names */
  .highlight .property {
    color: $vads-color-base;
  }

  /* Error highlighting */
  .highlight .err {
    color: $vads-color-error;
    background-color: $vads-color-error-lighter;
  }

  /* Changes and modifications */
  .highlight .gi { /* Git insertion */
    background-color: $vads-color-success-lighter;
  }

  .highlight .gd { /* Git deletion */
    background-color: $vads-color-error-lighter;
  }

  .highlight .gh { /* Git header */
    color: $vads-color-primary-darker;
    font-weight: $font-weight-bold;
  }

  /* Line highlights */
  .highlight .line-numbers .highlighted {
    color: $vads-color-error;
    font-weight: $font-weight-bold;
  }

  /* Container for highlight and button */
  .highlight-container {
    position: relative;
    display: grid;
    grid-template-columns: 10fr 1fr;
    padding: units(2);
    border: 1px solid $vads-color-base-lighter;
  }

  /* Copy button positioning */
  .highlight-container .copy-button {
    justify-self: end;
    opacity: 0;
    transition: all 0.2s ease-in-out;
  }

  .highlight-container:hover .copy-button,
  .highlight-container:focus-within .copy-button,
  .copy-button:focus {
    opacity: 1;
  }

  /* make sure code is vertically centered */
  pre.highlight {
    align-self: center;
  }

  // Overrides
  .highlight {
    margin: 0;
    padding-bottom: 0;
    font-size: 14px !important;
    line-height: 1.6;
  }

  .rouge-table, .rouge-table td {
    margin: 0;
    border: none;
  }

  .highlighter-rouge {
    background: #fff;
  }

  .highlighter-rouge .highlight {
    background: #fff;
    border-bottom: none;
    font-weight: normal;
  }

  p .highlighter-rouge,
  li .highlighter-rouge {
    margin: 0;
    border: 0;
  }

  //
  pre {
    white-space: pre-wrap;       /* css-3 */
     white-space: -moz-pre-wrap;  /* Mozilla, since 1999 */
     white-space: -pre-wrap;      /* Opera 4-6 */
     white-space: -o-pre-wrap;    /* Opera 7 */
     word-wrap: break-word;
  }

  h1#color-palette {
    border: 0;
    width: auto;
  }

  > h2 {
    border-bottom: 3px solid;
    padding-bottom: units(.5);
  }

  > p,
  > ol,
  > ul {
    max-width: 77ch;
    font-size: 1rem;
  }

  > p > code,
  > ol > li > code,
  > ul > li > code {
    background-color: rgba(0,0,0,.07) !important;
    font-family: $font-mono;
    padding: 2px 0 !important;

    &:before,
    &:after {
      letter-spacing: -0.2em;
      content: '\00a0';
    }
  }

  > .va-introtext {
    font-family: var(--font-family-sans);
    font-size: 1.375rem;
    margin-top: units(2);
  }
}

.code {
  background-color: rgba(0,0,0,.05) !important;
  font-family: $font-mono;
  padding-left: 0 !important;
  padding-right: 0 !important;

  &:before,
  &:after {
    letter-spacing: -0.2em;
    content: '\00a0';
  }
}

.site-l-content-wrapper--sidebar {
    display: flex;
    gap: units(8);

  .main-content__content {
    flex: 1;
    order: 1
  }

  .main-content__sidebar {
    display: none;

    @include media($desktop-lg) {
      display: inline;
      flex-basis: 256px;
      order: 2;
    }
  }
}
