@use "../theme.scss" as *;

/* flexbox based layout primitives */
.row, .col {
  display: flex;
  flex-wrap: wrap;
  box-sizing: border-box;

  &.flex-no-wrap {
    flex-wrap: nowrap;
  }

  &.flex-wrap-reverse {
    flex-wrap: wrap-reverse;
  }

  &.inline {
    display: inline-flex;
  }

  & > * {
    box-sizing: border-box;
  }
}

/* alignment in cross axis */
.row, .col {
  &.start, // deprecated
  &.align-items-start {
    align-items: flex-start;
  }

  &.center, // deprecated
  &.align-items-center {
    align-items: center;
  }

  &.end,
  &.align-items-end {
    align-items: flex-end;
  }
}

/* alignment in main axis */
.row, .col {
  &.justify-start, // deprecated
  &.justify-content-start {
    justify-content: flex-start;
  }

  &.justify-center, // deprecated
  &.justify-content-center {
    justify-content: center;
  }

  &.justify-end, // deprecated
  &.justify-content-end {
    justify-content: flex-end;
  }

  &.justify-around, // deprecated
  &.justify-content-around {
    justify-content: space-around;
  }

  &.justify-evenly, // deprecated
  &.justify-content-evenly {
    justify-content: space-evenly;
  }

  &.justify-between, // deprecated
  &.justify-content-between {
    justify-content: space-between;
  }
}

.row {
  flex-direction: row;

  &.reverse {
    flex-direction: row-reverse;
  }
}

.col {
  flex-direction: column;

  &.reverse {
    flex-direction: column-reverse;
  }
}

/* self alignment */

.self-start {
  align-self: flex-start;
}

.self-center {
  align-self: center;
}

.self-end {
  align-self: flex-end;
}

.self-stretch {
  align-self: stretch;
}
