@mixin cwui-button-group {
  .button-group {
    align-items: stretch;
    display: flex;
    flex-wrap: nowrap;
    margin-bottom: $buttongroup-margin;
    
    .button {
      align-items: center;
      border-radius: 0;
      display: flex;
      flex: 0 0 auto;
      font-size: map-get($button-sizes, default);
      justify-content: center;
      margin: 0;
      
      &:first-child {
        border-bottom-left-radius: $button-radius;
        border-top-left-radius: $button-radius;
      }
      
      &:last-child {
        border-bottom-right-radius: $button-radius;
        border-top-right-radius: $button-radius;
      }
      
      &:not(:last-child) {
        border-right-width: 0;
      }
    }
  
  
    // Sizes
    @each $size, $value in map-remove($button-sizes, default) {
      &.#{$size} #{$buttongroup-child-selector} {
        font-size: $value;
      }
    }
    
    &--compact .button {
      padding: .5em .7em;
    }
  
  
    // Even-width Group
    &.expanded {
      @include button-group-expand;
    }
  
  
    // Stacked
    &.stacked,
    &.stacked-for-small,
    &.stacked-for-medium {
      @include button-group-stack;
    }
  
    &.stacked {
      .button {
        border-right-width: 1px;
      }
  
      .button:not(:last-child) {
        border-bottom-width: 0;
      }
    }
  
    &.stacked-for-small {
      @include breakpoint(small only) {
        .button {
          border-right-width: 1px;
        }
        
        .button:not(:last-child) {
          border-bottom-width: 0;
        }
      }
      @include breakpoint(medium) {
        @include button-group-unstack;
      }
    }
  
    &.stacked-for-medium {
      @include breakpoint(medium down) {
        .button {
          border-right-width: 1px;
        }
    
        .button:not(:last-child) {
          border-bottom-width: 0;
        }
      }
  
      @include breakpoint(large) {
        @include button-group-unstack;
      }
    }
  
  
    // Colors
    &.secondary .button {
      background-color: $white;
      color: #6f695e;
      border-color: #ddd7c9;
    
      &:focus,
      &:hover,
      &:visited,
      &:active {
        background-color: #efece5;
      }
    }
  
    &.cta .button {
      background-color: $chico-red;
      color: $white;
      border: 0;
    
      &:focus,
      &:hover,
      &:visited,
      &:active {
        background-color: #540303;
      }
    }
  }
}
