/**
 *  The <main> HTML element represents the dominant content of the <body> of a document. 
 *  The main content area consists of content that is directly related to or expands upon the central topic of a document, 
 *  or the central functionality of an application. ~ https://developer.mozilla.org/en-US/docs/Web/HTML/Element/main
 */
.flex-layout {
  display: flex;
  flex-wrap: wrap;

  & > * {
    .w-100();
  }

  &.auto > * {
    width: initial;
    min-width: initial;
  }

  /** When you have a sidebar */
  & > .sidebar {
    .w-100();

    @media (min-width: @xl) {
      width: auto;
      min-width: unset;
    }
  }

  .main {
    .w-100();
    margin-bottom: 0;
    @media (min-width: @xl) {
      width: auto;
      min-width: unset;
      flex: 1; /** make it fill the remaining space */
    }
  }

  & [class*='-columns'] {
    gap: @default-distance;
    & > * {
      margin-bottom: 0 !important;
    }
  }

  &.two-columns {
    & > *:not(.w-100):not(.w-50):not(.w-33):not(.w-25):not(.w-16):not(.w-8) {
      .w-50();
    }
  }

  &.three-columns {
    & > *:not(.w-100):not(.w-50):not(.w-33):not(.w-25):not(.w-16):not(.w-8) {
      .w-33();
    }
  }

  &.four-columns {
    & > *:not(.w-100):not(.w-50):not(.w-33):not(.w-25):not(.w-16):not(.w-8) {
      .w-25();
    }
  }

  &.five-columns {
    & > *:not(.w-100):not(.w-50):not(.w-33):not(.w-25):not(.w-16):not(.w-8) {
      .w-20();
    }
  }

  &.six-columns {
    & > *:not(.w-100):not(.w-50):not(.w-33):not(.w-25):not(.w-16):not(.w-8) {
      .w-16();
    }
  }

  &.twelve-columns {
    & > *:not(.w-100):not(.w-50):not(.w-33):not(.w-25):not(.w-16):not(.w-8) {
      .w-8();
    }
  }
}
