.nav{
    margin: -.5rem -1rem;
    .nav-link{
        display: inline-flex;
        align-items: center;
        .icon + span, span + .icon{
            @if($rtl==false){
                margin-left: 0.75rem;
            }
            @if($rtl==true){
                margin-right: 0.75rem;
            }
        }
        .icon{
            font-size: 1.3em;
        }
    }
    &-tabs{
        font-family: $alt-font-family;
        margin: 0;
        font-size:0.8125rem;
        border-bottom: 1px solid $border-color;
        &-s2{
            border-bottom: none;
            justify-content: center;
        }
        + .tab-content{
            margin-top: 1.25rem;
        }
        .nav{
            &-item{
                @if($rtl==false){
                    padding-right:1.25rem;
                }
                @if($rtl==true){
                    padding-left:1.25rem;
                }
                &:last-child{
                    @if($rtl==false){
                        padding-right: 0;
                    }
                    @if($rtl==true){
                        padding-left: 0;
                    }
                }
                &.active .nav-link{
                    color: $primary;
                    &:after{
                        opacity: 1;
                    }
                }
            }
            &-link{
                padding: 1rem 0;
                font-weight: 700;
                color: $base-text;
                position: relative;
                border: none;
                outline: none;
                display: inline-flex;
                align-items: center;
                .icon{
                    font-size: 1.4em;
                    + span{
                        @if($rtl==false){
                            margin-left: 0.5rem;
                        }
                        @if($rtl==true){
                            margin-right: 0.5rem;
                        }
                    }
                }
                .badge{
                    @if($rtl==false){
                        margin-left: 0.25rem;
                    }
                    @if($rtl==true){
                        margin-right: 0.25rem;
                    }
                }
                &:hover{
                    color: $base-color;
                }
                &:focus{
                    color: $primary;
                }
                &:before,&:after{
                    position: absolute;
                    content: '';
                }
                &:after{
                    left: 0;
                    right: 0;
                    bottom: 0;
                    height: 3px;
                    background: $primary;
                    opacity: 0;
                }
                &.active{
                    color: $primary;
                    border: none;
                    background-color: transparent;
                    &:after{
                        opacity: 1;
                    }
                }
            }
        }
    }
    &-sm{
        font-size: 0.8125rem;
    }
}
@include media-breakpoint-up(md){
    .nav-tabs{
        .nav-item{
            @if($rtl==false){
                padding-right:1.5rem;
            }
            @if($rtl==true){
                padding-left:1.5rem;
            }
        }
        &-sm{
            .nav-item{
                @if($rtl==false){
                    padding-right:1.25rem;
                }
                @if($rtl==true){
                    padding-left:1.25rem;
                }
            }
        }
    }
}
@include media-breakpoint-up(lg){
    .nav-tabs{
        .nav-item{
            @if($rtl==false){
                padding-right:1.75rem;
            }
            @if($rtl==true){
                padding-left:1.75rem;
            }
        }
        &-sm{
            .nav-item{
                @if($rtl==false){
                    padding-right:1.25rem;
                }
                @if($rtl==true){
                    padding-left:1.25rem;
                }
            }
        }
        .nav-link{
            font-size: 0.875rem;
        }
    }
}
@include media-breakpoint-up(xl){
    .nav-tabs{
        .nav-item{
            @if($rtl==false){
                padding-right:2.25rem;
            }
            @if($rtl==true){
                padding-left:2.25rem;
            }
        }
        &-sm{
            .nav-item{
                @if($rtl==false){
                    padding-right:1.25rem;
                }
                @if($rtl==true){
                    padding-left:1.25rem;
                }
            }
        }
    }
}
@include media-breakpoint-down(xs){
    .nav-tabs.is-stretch{
        margin-left: -$stretch-gap-x;
        margin-right: -$stretch-gap-x;
        padding-left: $stretch-gap-x;
        padding-right:$stretch-gap-x;
    }
}

//Trigger
.nav-item-trigger{
    display: inline-flex;
    align-items: center;
    @if($rtl==false){
        margin:-1px -.5rem 0 auto;
    }
    @if($rtl==true){
        margin:-1px auto 0 -.5rem;
    }
}

// Card Nav
.nav-tabs-card{
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    font-family: $base-font-family;
}
@include media-breakpoint-up(sm){
    .nav-tabs-card{
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

// ICON
@include media-breakpoint-down(sm){
    .nav-tabs-mb-icon{
        .nav-item{
            @if($rtl==false){
                padding-right: .75rem;
            }
            @if($rtl==true){
                padding-left: .75rem;
            }
        }
        .nav-link{
            .icon{
                font-size: 1.25rem;
                padding: 0 .5rem;
                + span{
                    display: none;
                }
            }
        }
    }
}
@media (max-width:359px){
    .nav-tabs-mb-icon{
        .nav-item{
            @if($rtl==false){
                padding-right: .35rem;
            }
            @if($rtl==true){
                padding-left: .35rem;
            }
        }
    }
}

//Medium
.is-medium{
    &.nav-tabs{
        .nav-link{
            padding: .75rem 0;
        }
    }
}