@use "core/site-config";
@use "core/mq";
@use "s360-toolkit";

.layout--two-column {
  // **************************************************
  // MEDIA QUERIES

  @media (min-width: mq.$mq-1024) {
    > .layout__content > .layout__regions {
      grid-template-columns: repeat(site-config.$grid-columns, minmax(0, 1fr));

      > .layout__region--first {
        grid-column: var(--layout-two-column-region-first-grid-column);
      }

      > .layout__region--second {
        grid-column: var(--layout-two-column-region-second-grid-column);
      }
    }

    // **************************************************
    // 50-50 SPLIT

    &.layout--50-50 {
      --layout-two-column-region-first-grid-column: span 6;
      --layout-two-column-region-second-grid-column: span 6;
    }

    // **************************************************
    // 60-40 / 40-60 SPLITS

    &.layout--60-40 {
      --layout-two-column-region-first-grid-column: span 7;
      --layout-two-column-region-second-grid-column: span 5;
    }

    &.layout--40-60 {
      --layout-two-column-region-first-grid-column: span 5;
      --layout-two-column-region-second-grid-column: span 7;
    }

    // **************************************************
    // 70-30 / 30-70 SPLITS

    &.layout--70-30 {
      --layout-two-column-region-first-grid-column: span 8;
      --layout-two-column-region-second-grid-column: span 4;
    }

    &.layout--30-70 {
      --layout-two-column-region-first-grid-column: span 4;
      --layout-two-column-region-second-grid-column: span 8;
    }

    // **************************************************
    // 75-25 / 25-75 SPLITS

    &.layout--75-25 {
      --layout-two-column-region-first-grid-column: span 9;
      --layout-two-column-region-second-grid-column: span 3;
    }

    &.layout--25-75 {
      --layout-two-column-region-first-grid-column: span 3;
      --layout-two-column-region-second-grid-column: span 9;
    }
  }
}
