@import "../page-layout-base";
//
// Four Regions split 12--8-2-2
//
// When three regions are active the last two regions wrap to a second line,
// allowing the first region to be full width.
//
// First region  : 12 grid columns (full width)
// -- break to new line --
// Second region : 8 grid columns.
// Third region  : 2 grid columns.
// Fourth region : 2 grid columns.
//
// ---------------------------------------------------------------------------

.fourcol-split-row-12--8-2-2 {

  // No layout required when only these regions are active because the first
  // region spans 12 columns.
  .hr--1-2,
  .hr--1-3,
  .hr--1-4 {
    .l-r {}
  }

  .hr--2-3,
  .hr--2-4,
  .hr--3-4 {
    .l-r {
      width: span(8 of 12);

      &:last-child {
        width: span(4 of 12);
      }
    }
  }


  // Three active regions.
  .hr--1-2-3,
  .hr--1-2-4 {
    .l-r {
      &:nth-child(2) {
        width: span(8 of 12);
      }

      &:last-child {
        width: span(4 of 12);
      }
    }
  }

  .hr--2-3-4 {
    .l-r {
      &:first-child {
        width: span(8 of 12);
      }

      &:nth-child(2) {
        width: span(2 of 12);
      }

      &:last-child {
        width: span(2 of 12);
      }
    }
  }


  // Four active regions.
  .arc--4 {
    .l-r {
      &:nth-child(2) {
        width: span(8 of 12);
      }

      &:nth-child(3) {
        width: span(2 of 12);
      }

      &:last-child {
        width: span(2 of 12);
      }
    }
  }
}

