.btn-group,
.btn-group-vertical {
    position: relative;
    display: inline-block;
    vertical-align: middle; // match .btn alignment given font-size hack above
    >.btn {
        position: relative;
        float: left; // Bring the "active" button to the front
        &:hover,
        &:focus,
        &:active,
        &.active {
            z-index: 2;
        }
    }
    .btn-default {
        border-radius: 0;
        &:first-child {
            @include border-left-radius($border-radius-base);
        }
        &:last-child {
            @include border-right-radius($border-radius-base);
        }
    }
}

// Prevent double borders when buttons are next to each other
.btn-group {
    .btn+.btn,
    .btn+.btn-group,
    .btn-group+.btn,
    .btn-group+.btn-group {
        margin-left: -1px;
    }
}