/* ------------------------------------------------------------------------------
*
*  # Badges component
*
*  Overrides for badges bootstrap component
*
*  Version: 1.0
*  Latest update: May 25, 2015
*
* ---------------------------------------------------------------------------- */


// Base
// -------------------------

.badge {
    padding: 1px 5px 0px 5px;
    font-size: 10px;
    letter-spacing: 0.1px;
    vertical-align: baseline;
    background-color: transparent;
    border: 1px solid transparent;

    // Quick fix for badges in buttons
    .btn & {
        top: 0;
    }
    .btn-xs & {
        padding: 1px 5px 0px 5px;
    }

    // Account for badges in navs
    .list-group-item.active > &,
    .nav-pills > .active > a > &,
    .nav-tabs-solid > .active > a > &,
    .nav-tabs[class*=bg-] > li > a > & {
        color: @badge-active-color;
        background-color: @badge-active-bg;
        border-color: @badge-active-bg;
    }  
    .nav-pills > li > a > & {
        margin-left: @element-horizontal-spacing;

        &.position-right {
            margin-left: 0;
            margin-right: @element-horizontal-spacing;
        }
    }

    // Reverse in list group
    .list-group-item > & {
        float: left;
    }

    // Reverse side spacing
    .list-group-item > & + & {
        margin-right: 0;
        margin-left: @element-horizontal-spacing;
    }
}


// Contextual variations
// -------------------------

// Default
.badge-default {
    background-color: @label-default-bg;
    border-color: @label-default-bg;
}

// Primary
.badge-primary {
    background-color: @label-primary-bg;
    border-color: @label-primary-bg;
}

// Success
.badge-success {
    background-color: @label-success-bg;
    border-color: @label-success-bg;
}

// Info
.badge-info {
    background-color: @label-info-bg;
    border-color: @label-info-bg;
}

// Warning
.badge-warning {
    background-color: @label-warning-bg;
    border-color: @label-warning-bg;
}

// Danger
.badge-danger {
    background-color: @label-danger-bg;
    border-color: @label-danger-bg;
}


// Flat labels style
// -------------------------

.badge-flat {
    background-color: transparent;
    border-width: 2px;

    // Remove background color and shadow on hover
    &[href] {
        &:hover,
        &:focus {
            background-color: transparent;
            .box-shadow(none);
        }
    }
}
