// Name:            Badge
// Description:     Component to create notification badges

// Component:       `uk-badge`
//
// ========================================================================


// Variables
// ========================================================================

@badge-size:                                    22px;
@badge-padding-vertical:                        0;
@badge-padding-horizontal:                      5px;
@badge-border-radius:                           500px;
@badge-background:                              @global-primary-background;
@badge-color:                                   @global-inverse-color;
@badge-font-size:                               @global-small-font-size;

@badge-hover-color:                             @global-inverse-color;


/* ========================================================================
   Component: Badge
 ========================================================================== */

/*
 * 1. Style
 * 2. Center child vertically and horizontally
 */

.uk-badge {
    box-sizing: border-box;
    min-width: @badge-size;
    height: @badge-size;
    line-height: @badge-size;
    padding: @badge-padding-vertical @badge-padding-horizontal;
    border-radius: @badge-border-radius;
    vertical-align: middle;
    /* 1 */
    background: @badge-background;
    color: @badge-color;
    font-size: @badge-font-size;
    /* 2 */
    display: -ms-inline-flexbox;
    display: -webkit-inline-flex;
    display: inline-flex;
    -ms-flex-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
    .hook-badge;
}

/*
 * Required for `a`
 */

.uk-badge:hover {
    color: @badge-hover-color;
    text-decoration: none;
    .hook-badge-hover;
}


// Hooks
// ========================================================================

.hook-badge-misc;

.hook-badge() {}
.hook-badge-hover() {}
.hook-badge-misc() {}


// Inverse
// ========================================================================

@inverse-badge-background:                     @inverse-global-primary-background;
@inverse-badge-color:                          @inverse-global-inverse-color;
@inverse-badge-hover-color:                    @inverse-global-inverse-color;

.hook-inverse() {

    .uk-badge {
        background: @inverse-badge-background;
        color: @inverse-badge-color;
        .hook-inverse-badge;
    }

    .uk-badge:hover {
        color: @inverse-badge-hover-color;
        .hook-inverse-badge-hover;
    }

}

.hook-inverse-badge() {}
.hook-inverse-badge-hover() {}