﻿// button
.btn {
    padding: 0;
    @include border-radius(3px);
    text-transform: uppercase;
    outline: none !important;

    [class*="fa-angle-"] {
        font-size: 16px;
    }
}

// button size
.btn {
    @include button-size($btn-size-default);
    font-size: 14px;
}

.btn-sm {
    @include button-size($btn-size-sm);
    font-size: 12px;
}

.btn-lg {
    @include button-size($btn-size-lg);
    font-size: 14px;
}

// button colors
.btn-default {
    @include button-variant($btn-default-color, $btn-default-bg, $btn-default-border);
}

.btn-primary {
    @include button-variant($btn-primary-color, $btn-primary-bg, $btn-primary-border);
}

.btn-success {
    @include button-variant($btn-success-color, $btn-success-bg, $btn-success-border);
}

.btn-info {
    @include button-variant($btn-info-color, $btn-info-bg, $btn-info-border);
}

.btn-warning {
    @include button-variant($btn-warning-color, $btn-warning-bg, $btn-warning-border);
}

.btn-danger {
    @include button-variant($btn-danger-color, $btn-danger-bg, $btn-danger-border);
}

// btn-hasicon
.btn-hasicon {
    position: relative;
    padding-left: $btn-size-default + ($btn-size-default / 2) - 2.5px;

    &.btn-sm {
        padding-left: $btn-size-sm + ($btn-size-sm / 2) - 2px;
    }

    &.btn-lg {
        padding-left: $btn-size-lg + ($btn-size-lg / 2) - 4px;
    }

    i {
        font-size: 14px;
        border-right: 1px solid rgba(0, 0, 0, 0.08);
        height: 100%;
        margin: 0;
        text-align: center;
        position: absolute;
        top: -1px;
        left: -1px;
        display: block;
        vertical-align: middle;
        width: $btn-size-default;
        height: $btn-size-default;
        line-height: $btn-size-default + 2px;
    }

    &.btn-sm {
        i {
            width: $btn-size-sm;
            height: $btn-size-sm;
            line-height: $btn-size-sm + 2px;
        }
    }

    &.btn-lg {
        i {
            width: $btn-size-lg;
            height: $btn-size-lg;
            line-height: $btn-size-lg + 2px;
        }
    }
}

// btn-icon
.btn-icon {
    padding: 0;
    width: $btn-size-default * 1.5;

    &.btn-sm {
        width: $btn-size-sm * 1.5;
    }

    &.btn-lg {
        width: $btn-size-lg * 1.5;
    }
}

// btn-group
.btn-group {

    &.btn-default-group {
        .btn {
            border-right-width: 1px;
            border-left-width: 0;
            margin: 0;
        }
    }

    .btn {
        padding: 0;
        margin: 0;
        margin-right: 2px;
        width: $btn-size-default * 1.5;

        &.btn-sm {
            width: $btn-size-sm * 1.5;
        }

        &.btn-lg {
            width: $btn-size-lg * 1.5;

            i {
                font-size: 16px;
            }
        }

        &:last-child {
            border-right-width: 1px;
            margin-right: 0;
        }

        &:first-child {
            border-left-width: 1px;
        }

        &.btn-default {
            &:hover, &:focus {
                border-color: $btn-default-border !important;
            }
        }
    }
}
