@import "@{bootstrap-path}/less/navs.less";


.nav-pills {
    > li.active > a {
        &,
        &:hover,
        &:focus {
            background-color: #eee;
            color: @text-color;
        }
    }
}

// Simple stacked nav menu

.nav.nav-stacked {
    > .category {
        text-transform: uppercase;
        font-weight: 700;
        border-left: 3px solid transparent;
        padding: 3px 15px;
        margin-top: 18px;
        color: @gray-light;
        font-size: @font-size-base - 1;

        &:first-child {
            margin-top: 12px;
        }
    }

    > li > a {
        padding: 3px 15px;
        border-left: 3px solid transparent;
        border-radius: 0;

        &:hover {
            background-color: #eee;
        }
    }
    > li.active > a {
        background-color: #eee;
        color: @text-color;
        border-left-color: @brand-primary;

        &:hover, &:focus {
            background-color: #eee;
            color: @text-color;
            cursor: default;
        }
    }
}

.nav-stacked.nav-tree {

    > .category {
        padding-left: 20px;
    }

    // standard level
    > li > a {
        padding-left: 20px;
    }

    // nested 1 level
    > li > .nav-stacked > li > a {
        padding-left: 40px;
    }
    // nested 2 levels
    > li > .nav-stacked > li > .nav-stacked > li > a {
        padding-left: 60px;
    }

    > li > .expander {
        padding-left: 8px;
    }

    > li > .nav-stacked > li > .expander {
        padding-left: 28px;
    }

    > li > .nav-stacked > li > .nav-stacked > li > .expander {
        padding-left: 48px;
    }

    > li .expander {
        z-index: 1;
        position: absolute;
        font-style: normal;
        text-align: right;
        padding-top: 3px;
        padding-bottom: 3px;
        padding-right: 8px;
        color: @gray-light;
        font-size: 14px;
        border: none;
        background: transparent;
        outline: none;

        &:hover, &:focus {
            background: transparent;
            border: none;
            color: #000;
            cursor: pointer;
        }
    }

    > li .expander.expanded:after {
        &:extend(.icon:after, .icon-angle-down:after);
    }

    > li .expander.collapsed:after {
        &:extend(.icon:after, .icon-angle-right:after);
        margin-left: 2px;
    }
}

// Nested stacked menus
//
// Increases padding and lightens text weight.

.nav-stacked > li > .nav-stacked {
  > li > a {
    padding-left: 35px;
    font-weight: 400;
  }

  > li > .nav-stacked > li > a {
    padding-left: 55px;
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
}

.nav-tabs {
    > li {
        > a {
            margin-right: -1px;
            // background-color: transparent;
            // border-color: @nav-tabs-border-color;
        }
        &.disabled > a {
            color: #999;
        }
        &.active > a {
            background-color: @nav-tabs-active-link-hover-bg;
        }

        &.open > a,
        &.open > a:focus {
            border-color: @nav-tabs-border-color;
        }
    }
    &.nav-justified {
        // > li + li > a,
        // > .active + li > a,
        // > .active + li > a:focus {
        //     border-left: 0;
        // }
        // > li + .active > a,
        // > li + .active > a:focus {
        //     border-left: 0;
        // }
        > .active > a,
        > .active > a:hover,
        > .active > a:focus {
            border-bottom-color: #fff;
        }

        @media (max-width: @screen-xs-max) {
            > .active > a,
            > li > a {
                background: #fff;
                border-color: @nav-tabs-border-color;
            }
        }
    }
}

.nav-centered {
    text-align: center;
    > li {
        float: initial;
        display: inline-block;
    }
}

.nav-tabs.nav-tabs-light {
    border-bottom: 1px solid @nav-tabs-border-color;
    > li {
        margin-bottom: -1px;
        > a {
            border: none;
            background: transparent;
            border-bottom: 2px solid transparent;
        }
        &.disabled > a {
            &:hover {
                border-bottom-color: transparent;
            }
        }
        > a:hover {
            border: none;
            background: transparent;
            border-bottom: 2px solid @nav-tabs-border-color;
        }

        &.active > a,
        &.active > a:hover,
        &.active > a:focus,
        &.active > a:active,
        &.open > a {
            border: none;
            background: transparent;
            border-bottom: 2px solid @gray-light;
        }
    }
}

.nav-steps {
    width: 100%;
    display: table;
    table-layout: fixed;
    word-wrap: break-word;
    margin-left: 0;
    padding: 0;
    > li {
        display: table-cell;
        max-width: 150px;
        min-width: 75px;
        text-align: center;
        padding: 0 10px;

        > a, > span {
            display: block;
            font-weight: 600;
            outline: none;
            padding-top: 25px;
            position: relative;
        }

        > a:before, > span:before {
            background: @brand-primary;
            border-radius: 100%;
            content: "";
            box-shadow: 0 0 0 3px #f5f5f5;
            height: 10px;
            left: 50%;
            margin-left: -5px;
            position: absolute;
            top: 3px;
            width: 10px;
        }
    }

    li + li > span:after,
    li + li > a:after {
      background: @brand-primary;
      border: solid #f5f5f5;
      border-width: 2px 0;
      box-shadow: -5px 0 0 -2px @brand-primary, 5px 0 0 -2px @brand-primary;
      content: "";
      height: 8px;
      left: -50%;
      margin-left: -14px;
      margin-right: 6px;
      position: absolute;
      right: 50%;
      top: 4px;
    }

    .active ~ li {
      color: #707070;
    }

    .active ~ li > span:before,
    .active ~ li > a:before {
      background-color: #cccccc;
    }

    .active ~ li > span:after,
    .active ~ li > a:after {
      background-color: #f5f5f5;
      box-shadow: none;
    }
}

.nav-steps.nav-stacked {
    display: block;
    counter-reset: test;

    > li {
        text-align: left;
        display: block;
        max-width: none;
        min-width: 0;
        padding: 11px 0 10px 50px;

        > a,
        > span {
            padding-top: 0;
        }

        > a:before,
        > span:before {
            left: -35px;
            top: 0;
            margin: 0;
            height: 20px;
            width: 20px;
            content: counter(test);
            counter-increment: test;
            text-align: center;
            color: #fff;
            box-shadow: 0 0 0 3px @brand-primary;
        }

        &.active > a:before,
        &.active > span:before {
            color: @brand-primary;
            background: #fff;
            box-shadow: 0 0 0 3px @brand-primary;
        }

        &.active ~ li > span:before,
        &.active ~ li > a:before {
            color: @text-color;
            background: #fff;
            box-shadow: 0 0 0 3px #f5f5f5;
        }
    }

    li + li > span:after,
    li + li > a:after {
        top: -100%;
        height: 100%;
        bottom: 0;
        left: -27px;
        border-width: 0 0;
        right: 0;
        width: 3px;
        margin-left: 0;
    }
}

.nav-dots {
    display: block;
    padding-left: 0;

    > li {
        display: inline-block;
    }

    > li > a {
        margin-right: 4px;
        display: inline-block;
        border-radius: 50%;
        height: 10px;
        width: 10px;
        overflow: hidden;
        text-indent: 100%;
        background-color: #ddd;
    }

    > li:last-child > a {
        margin-right: 0;
    }

    > li.active > a {
        background-color: #aaa;
    }
}
