/*
 * @file
 * Provides the layout styles for two-column layout section.
 */

/*
 * Media query breakpoints.
 * Processed by postcss/postcss-custom-media.
 */

/* Navigation related breakpoints */

/* Grid related breakpoints */

/* Grid shifts from 6 to 14 columns. */

/* Width of the entire grid maxes out. */

.layout--twocol-section {
  display: grid;
  gap: var(--grid-gap);
  /* Single, shrinkable column below --md so region content (flex/grid
   * children with no explicit width) can't force the implicit grid track
   * to size to its intrinsic content width and overflow the viewport. */
  --layout-twocol-grid: minmax(0, 1fr);
  grid-template-columns: var(--layout-twocol-grid);
}

.layout--twocol-section > .layout__region--first {
    grid-column: var(--layout-twocol-grid__first);
  }

.layout--twocol-section > .layout__region--second {
    grid-column: var(--layout-twocol-grid__second);
  }

@media (min-width: 768px) {
  .layout--twocol-section--50-50 {
    --layout-twocol-grid: repeat(2, minmax(0, 1fr));
  }

  .layout--twocol-section--33-67 {
    --layout-twocol-grid: repeat(3, minmax(0, 1fr));
    --layout-twocol-grid__second: span 2;
  }

  .layout--twocol-section--67-33 {
    --layout-twocol-grid: repeat(3, minmax(0, 1fr));
    --layout-twocol-grid__first: span 2;
  }

  .layout--twocol-section--25-75 {
    --layout-twocol-grid: repeat(4, minmax(0, 1fr));
    --layout-twocol-grid__second: span 3;
  }

  .layout--twocol-section--75-25 {
    --layout-twocol-grid: repeat(4, minmax(0, 1fr));
    --layout-twocol-grid__first: span 3;
  }
}
