.stack {
  display: flex;
}

.stack--column {
  flex-direction: column;
}

.stack--split\@m {
  flex-direction: column;
  
  @media all and (min-width: $widescreen) {
    display: flex;
    flex-direction: row;
  }
}

.stack--split\@xxs {
  flex-direction: column;
  
  @media all and (min-width: 20rem) {
    display: flex;
    flex-direction: row;
  }
}

.stack--spaceBetween {
  justify-content: space-between;
}

.stack--spaceBetween\@m {
  @media all and (min-width: 20rem) {
    justify-content: space-between;
  }
}

.stack--end-row {
  justify-content: flex-end;
}

.stack--center-row {
  align-items: center;
}

.stack--center-row\@m {
  @media all and (min-width: $widescreen) {
    align-items: center;
  }
}

.stack--medium .stack__item {
    margin-bottom: 1rem;
    
    &:last-child {
      margin-bottom: 0;
    }
}

.stack--large .stack__item {
    margin-bottom: 2.5rem;
    
    &:last-child {
      margin-bottom: 0;
    }
}

.stack__item--flex {
  flex: 1;
}

.stack--split\@m.stack--medium .stack__item {
    @media all and (min-width: $widescreen) {
        margin-right: 1rem;
        
        &:last-child {
          margin-right: 0;
        }
    }
}

.stack--split\@m.stack--large .stack__item {
    @media all and (min-width: $widescreen) {
        margin-right: 2rem;
        
        &:last-child {
          margin-right: 0;
        }
    }
}

.stack--split\@m .stack__item {
    @media all and (min-width: $widescreen) {
        margin-bottom: 0;
    }
}

.stack--split\@m>.stack__item--30\@m {
  @media all and (min-width: $widescreen) {
    flex: 0 0 30%;
    max-width: 30%;
  }
}

.stack--split\@m>.stack__item--70\@m {
  @media all and (min-width: $widescreen) {
    flex: 0 0 70%;
    max-width: 70%;
  }
}
