// Name:            Close
// Description:     Defines styles for a close button
//
// Component:       `uk-close`
//
// Modifiers:       `uk-close-alt`
//
// Uses:            Icon: FontAwesome
//
// Used by:         Alert
//                  Modal
//
// ========================================================================


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

@close-size:                                    20px;

@close-alt-padding:                             2px;
@close-alt-background:                          #eee;


/* ========================================================================
   Component: Close
 ========================================================================== */

/*
 * 1. Required for `button` elements and makes
 *    close button more robust against different box-sizing use
 * 2. Style
 * 3. Required for `button` elements
 * 4. Needed for Safari
 */

.uk-close {
    /* 1 */
    -moz-box-sizing: content-box;
    box-sizing: content-box;
    /* 2 */
    display: inline-block;
    width: @close-size;
    line-height: @close-size;
    text-align: center;
    color: inherit;
    opacity: 0.3;
    /* 3. */
    padding: 0;
    border: 0;
    -webkit-appearance: none;
    /* 4. */
    background: transparent;
    .hook-close;
}

/* Icon */
.uk-close:after {
    display: block;
    content: "\f00d";
    font-family: FontAwesome;
}

/*
 * Hover
 * 1. Apply hover style also to focus state
 * 2. Remove default focus style
 * 3. Required for `a` elements
 */

.uk-close:hover,
.uk-close:focus { // 1
    opacity: 0.5;
    /* 2 */
    outline: none;
    /* 3 */
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}


/* Modifier
 ========================================================================== */

.uk-close-alt {
    padding: @close-alt-padding;
    border-radius: 50%;
    background: @close-alt-background;
    opacity: 1;
    .hook-close-alt;
}

/* Hover */
.uk-close-alt:hover,
.uk-close-alt:focus { opacity: 1; }

/* Icon */
.uk-close-alt:after { opacity: 0.5; }

.uk-close-alt:hover:after,
.uk-close-alt:focus:after { opacity: 0.8; }


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

.hook-close-misc;

.hook-close() {}
.hook-close-alt() {}
.hook-close-misc() {}