// Copyright (C) YOOtheme GmbH, http://www.gnu.org/licenses/gpl.html GNU/GPL */

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


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

@nav-padding-horizontal:                        0;

@nav-header-padding-horizontal:                 @nav-padding-horizontal;
@nav-header-margin-top:                         @global-margin;

@nav-divider-margin-horizontal:                 @nav-dropdown-padding-horizontal;

@nav-sub-padding-left:                          @nav-padding-horizontal;

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

@nav-side-color:                                @global-dark-color;
@nav-side-hover-background:                     rgba(0,0,0,0);
@nav-side-hover-color:                          @global-link-color;
@nav-side-active-background:                    rgba(0,0,0,0);
@nav-side-active-color:                         @global-link-color;
@nav-side-header-color:                         @global-dark-color;
@nav-side-divider-border:                       @global-border;
@nav-side-nested-color:                         @global-color;
@nav-side-nested-hover-color:                   @global-link-color;

@nav-dropdown-color:                            @global-dark-color;
@nav-dropdown-hover-background:                 rgba(0,0,0,0);
@nav-dropdown-hover-color:                      @global-link-color;
@nav-dropdown-header-color:                     @global-dark-color;

@nav-dropdown-divider-border:                   @global-border;

@nav-dropdown-nested-color:                     @global-color;
@nav-dropdown-nested-hover-color:               @global-link-color;

@nav-navbar-color:                              @global-dark-color;
@nav-navbar-hover-background:                   rgba(0,0,0,0);
@nav-navbar-hover-color:                        @global-link-color;
@nav-navbar-header-color:                       @global-dark-color;
@nav-navbar-divider-border:                     @global-border;
@nav-navbar-nested-color:                       @global-color;
@nav-navbar-nested-hover-color:                 @global-link-color;

@nav-offcanvas-padding-vertical:                10px;
@nav-offcanvas-padding-horizontal:              @nav-dropdown-padding-horizontal;
@nav-offcanvas-color:                           @global-dark-color;
@nav-offcanvas-hover-background:                rgba(0,0,0,0);
@nav-offcanvas-hover-color:                     @global-link-color;
@nav-offcanvas-active-background:               rgba(0,0,0,0);
@nav-offcanvas-active-color:                    @global-link-color;
@nav-offcanvas-header-color:                    @global-dark-color;
@nav-offcanvas-divider-border:                  @global-border;
@nav-offcanvas-nested-color:                    @global-color;
@nav-offcanvas-nested-hover-color:              @global-link-color;

//
// New
//

@nav-dropdown-padding-horizontal:               40px;
@nav-sub-padding-horizontal:                    40px;
@nav-sub-padding-vertical:                      25px;
@nav-navbar-padding-vertical:                   5px;

@nav-border:                                    @global-border;
@nav-sub-background:                            @global-light-background;


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

.hook-nav-header() {}


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

.hook-nav-divider() {}


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

.hook-nav-sub() { padding: @nav-sub-padding-vertical @nav-sub-padding-horizontal; }


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

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


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

//
// Items
//

.hook-nav-side() {}

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

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

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

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

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

.hook-nav-side-divider() {
    margin-right: @nav-padding-horizontal;
    margin-left: @nav-padding-horizontal;
}


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

//
// Items
//

.hook-nav-dropdown() { margin: 0 @nav-dropdown-padding-horizontal; }

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

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

.hook-nav-dropdown-header() {
    margin-left: @nav-dropdown-padding-horizontal;
    margin-right: @nav-dropdown-padding-horizontal;
}

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

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


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

//
// Items
//

.hook-nav-navbar() { padding: @nav-navbar-padding-vertical @nav-dropdown-padding-horizontal; }

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

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

.hook-nav-navbar-header() {
    margin-left: @nav-dropdown-padding-horizontal;
    margin-right: @nav-dropdown-padding-horizontal;
}

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

.hook-nav-navbar-divider() {
    margin-left: @nav-dropdown-padding-horizontal;
    margin-right: @nav-dropdown-padding-horizontal;
}


// 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() {
    margin-left: @nav-dropdown-padding-horizontal;
    margin-right: @nav-dropdown-padding-horizontal;
}

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

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


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

.hook-nav-misc() {

    .uk-nav-side > li:not(:first-child) > a { border-top: 1px solid @nav-border; }

    .uk-nav-side .uk-nav-sub,
    .uk-dropdown .uk-parent.uk-open .uk-nav-sub {
        background: @nav-sub-background;
        border-top: 1px solid @nav-border;
    }

    .uk-dropdown-navbar .uk-parent:not(.uk-open) .uk-nav-sub,
    .uk-nav-dropdown .uk-parent:not(.uk-open) .uk-nav-sub {
        margin: 0 @nav-dropdown-padding-horizontal;
        padding: 15px;
        border-top: 1px solid @nav-border;
        border-bottom: 1px solid @nav-border;
    }

    .uk-nav-dropdown .uk-open .uk-nav-sub,
    .uk-dropdown-navbar .uk-open .uk-nav-sub { border-bottom: 1px solid @nav-border; }

    .uk-nav-offcanvas .uk-nav-sub {
        background: @nav-sub-background;
        border-top: 1px solid @nav-border;
        border-bottom: 1px solid @nav-border;
    }

}