//
// Component: Nav
//
// ========================================================================


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

@nav-padding-vertical:                          6px;
@nav-padding-horizontal:                        25px;

@nav-header-padding-vertical:                   @nav-padding-vertical;
@nav-header-padding-horizontal:                 @nav-padding-horizontal;
@nav-header-font-size:                          round((@global-font-size * 0.85)); // 12px / 14px
@nav-header-font-weight:                        normal;
@nav-header-margin-top:                         @global-margin;

@nav-divider-margin-vertical:                   15px;
@nav-divider-margin-horizontal:                 0;

@nav-subtitle-font-size:                        round((@global-font-size * 0.85)); // 12px / 14px
@nav-subtitle-line-height:                      round((@nav-subtitle-font-size * 1.46)); // 18px / 20px

@nav-sub-padding-left:                          (@nav-padding-horizontal + @nav-nested-padding-left);

@nav-parent-icon-width:                         @global-line-height;

@nav-side-color:                                @global-color;
@nav-side-hover-background:                     @global-default-background;
@nav-side-hover-color:                          @global-color;
@nav-side-active-background:                    @global-default-background;
@nav-side-active-color:                         @global-color;
@nav-side-header-color:                         @global-muted-color;
@nav-side-divider-border:                       @global-border;
@nav-side-nested-color:                         @global-muted-color;
@nav-side-nested-hover-color:                   @global-color;

@nav-dropdown-color:                            @global-color;
@nav-dropdown-hover-background:                 @global-primary-background;
@nav-dropdown-hover-color:                      @global-contrast-color;
@nav-dropdown-header-color:                     @global-color;
@nav-dropdown-divider-border:                   @global-border;
@nav-dropdown-nested-color:                     @global-muted-color;
@nav-dropdown-nested-hover-color:               @global-color;

@nav-navbar-color:                              @global-color;
@nav-navbar-hover-background:                   @global-default-background;
@nav-navbar-hover-color:                        @global-color;
@nav-navbar-header-color:                       @global-color;
@nav-navbar-divider-border:                     @global-border;
@nav-navbar-nested-color:                       @global-muted-color;
@nav-navbar-nested-hover-color:                 @global-color;

@nav-offcanvas-color:                           @global-color;
@nav-offcanvas-hover-background:                #f5f5f5;
@nav-offcanvas-hover-color:                     @global-color;
@nav-offcanvas-active-background:               #f5f5f5;
@nav-offcanvas-active-color:                    @global-color;
@nav-offcanvas-header-color:                    @global-color;
@nav-offcanvas-divider-border:                  #ddd;
@nav-offcanvas-nested-color:                    @global-color;
@nav-offcanvas-nested-hover-color:              @global-color;


// Sub-object: `uk-nav-header`
// ========================================================================

.hook-nav-header() {}


// Sub-object: `uk-nav-divider`
// ========================================================================

.hook-nav-divider() {}


// Sub-object: `uk-nav-sub`
// ========================================================================

.hook-nav-sub() {}


// Modifier: `uk-nav-parent-icon`
// ========================================================================

.hook-nav-parent-icon() {}


// Modifier `uk-nav-side`
// ========================================================================

//
// Items
//

.hook-nav-side() { padding: 8px 16px; }

// Hover
.hook-nav-side-hover() {}

// Active
.hook-nav-side-active() {}

//
// Sub-object: `uk-nav-header`
//

.hook-nav-side-header() { padding: 8px 16px; }

//
// Sub-object: `uk-nav-divider`
//

.hook-nav-side-divider() {}


// Modifier `uk-nav-dropdown`
// ========================================================================

//
// Items
//

.hook-nav-dropdown() {}

// Hover
.hook-nav-dropdown-hover() {}

//
// Sub-object: `uk-nav-header`
//

.hook-nav-dropdown-header() {}

//
// Sub-object: `uk-nav-divider`
//

.hook-nav-dropdown-divider() {}


// Modifier `uk-nav-navbar`
// ========================================================================

//
// Items
//

.hook-nav-navbar() {}

// Hover
.hook-nav-navbar-hover() {}

//
// Sub-object: `uk-nav-header`
//

.hook-nav-navbar-header() {}

//
// Sub-object: `uk-nav-divider`
//

.hook-nav-navbar-divider() {}


// Modifier `uk-nav-offcanvas`
// ========================================================================

.hook-nav-offcanvas-link() {}

.hook-nav-offcanvas-link-hover() {}

//
// Items
//

.hook-nav-offcanvas() {}

// Hover
.hook-nav-offcanvas-hover() {}

// Active
.hook-nav-offcanvas-active() {}

//
// Sub-object: `uk-nav-header`
//

.hook-nav-offcanvas-header() {}

//
// Sub-object: `uk-nav-divider`
//

.hook-nav-offcanvas-divider() {}


// Miscellaneous
// ========================================================================

.hook-nav-misc() {

    /*
     * Allow `uk-sub-nav` on hover
     */

    .uk-nav-side > li { position: relative; }

    .uk-nav-side .uk-subnav {
        position: absolute;
        top: 6px;
        right: 15px;
        padding: 0;
    }

    /* Needed if uk-subnav is used to keep style on hover */
    .uk-nav-side > li:hover > a {
        background: @nav-side-hover-background;
        color: @nav-side-hover-color;
    }

}