/*
 * DO NOT EDIT THIS FILE.
 * See the following change record for more information,
 * https://www.drupal.org/node/3084859
 * @preserve
 */

/**
 * @file
 * Grid system definition for the content narrow layout.
 */

.layout--content-narrow,
.layout--pass--content-narrow > * {
  grid-column: 1 / 7;
  width: 100%;

  @media (min-width: 43.75rem) {
    grid-column: 2 / 14;
  }

  @media (min-width: 62.5rem) {
    grid-column: 3 / 11;
  }
}

/*
  If .layout--content-narrow is nested within any of the following, allocate the appropriate
  amount of columns within its parent .grid-full.
    - .layout--content-narrow class.
    - Element that's inheriting the layout--content-narrow styles from its parent region.
    - .layout--content-medium class.
    - Element that's inheriting the layout--content-medium styles from its parent region.
*/

.layout--content-narrow,
.layout--pass--content-narrow > *,
.layout--content-medium,
.layout--pass--content-medium > * {
  & .layout--content-narrow,
  & .layout--pass--content-narrow > * {
    @media (min-width: 43.75rem) {
      grid-column: 1 / 13;
    }

    @media (min-width: 62.5rem) {
      grid-column: 1 / 9;
    }
  }
}

/*
  Special grid-breaking treatment for text-content elements that
  reside in a content-narrow layout.
*/

.layout--content-narrow,
.layout--pass--content-narrow > * {
  &.text-content,
  & .text-content {
    & blockquote {
      &::before {
        @media (min-width: 43.75rem) {
          inset-inline-start: calc(-1 * (var(--grid-col-width) + var(--grid-gap)));
        }
      }

      &::after {
        @media (min-width: 43.75rem) {
          inset-inline-start: calc(-1 * (var(--grid-col-width) + var(--grid-gap)));
          width: var(--sp);
          height: calc(100% - 2.8125rem);
          margin-inline-start: 2px;
        }
      }

      @media (min-width: 43.75rem) {
        width: calc(10 * var(--grid-col-width) + 9 * var(--grid-gap));
        margin-block: var(--sp3);
        padding-inline-start: 0;
      }
    }

    & pre {
      @media (min-width: 43.75rem) {
        margin-block: var(--sp3);
      }

      @media (min-width: 62.5rem) {
        width: calc(12 * var(--grid-col-width) + 11 * var(--grid-gap));
        margin-inline-start: calc(-1 * (var(--grid-col-width) + var(--grid-gap)));
      }
    }
  }
}

/**
 * <pre> and <blockquote> elements should not break containers and overflow
 * into sidebar region when present.
 */

.sidebar-grid {
  & .layout--content-narrow,
  & .layout--pass--content-narrow > * {
    &.text-content,
    & .text-content {
      & blockquote,
      & pre {
        width: auto;
      }
    }
  }
}
