// Tabs

.nav.nav-tabs {
    padding: 0;
    margin: 0;
    background-color: $neoteric-tabs-header-bg;
    border: 1px solid $neoteric-border-color;
    border-bottom: 0;
    border-radius: $border-radius $border-radius 0 0;
    box-shadow: 0 1px $white inset, 0 2px 3px -3px hsla(0, 0%, 0%, .15), 0 -4px 0 hsla(0, 0%, 0%, .05) inset, $neoteric-box-shadow;

    .nav-item {
        margin-bottom: 0;
        margin-left: 0;

        &:first-of-type .nav-link {

            &.active {
                border-radius: $border-radius 0 0;
                box-shadow: -1px 0 1px -1px hsla(0, 0%, 0%, .06), inset -2px 0 1px -1px hsla(0, 0%, 0%, .08), inset 0 1px 0 hsla(0, 0%, 0%, .02);
            }

        }

        &:last-of-type .nav-link {
            box-shadow: -1px 0 0 hsla(0, 0%, 0%, .05), 1px 0 0 hsla(0, 0%, 0%, .05);

            &.active {
                box-shadow: inset 2px 0 1px -1px hsla(0, 0%, 0%, .08), inset -2px 0 1px -1px hsla(0, 0%, 0%, .08), inset 0 1px 0 hsla(0, 0%, 0%, .02);
            }

        }

    }

    .nav-link {
        position: relative;
        padding: .75em 1em;
        color: var(--neoteric-color-primary);
        border: 0;
        border-top-left-radius: 0;
        border-top-right-radius: 0;
        box-shadow: -1px 0 0 hsla(0, 0%, 0%, .05);

        &.active {
            background-color: $neoteric-tabs-active-bg;
            background-image: linear-gradient(to bottom, hsla(0, 0%, 0%, 0), hsla(0, 0%, 0%, .05) 100%);
            border-right: 0;
            border-left: 0;
            border-top-left-radius: 0;
            border-top-right-radius: 0;
            box-shadow: inset 2px 0 1px -1px hsla(0, 0%, 0%, .08), inset -2px 0 1px -1px hsla(0, 0%, 0%, .08), inset 0 1px 0 hsla(0, 0%, 0%, .02);

            &::after {
                position: absolute;
                right: 0;
                bottom: -1px;
                left: 0;
                height: 5px;
                content: "";
                background-color: $neoteric-tabs-active-highlight;
                opacity: .8;
            }
        }
    }
}

.nav-tabs+.tab-content {
    padding: 15px;
    background: $white;
    border: 1px solid;
    border-color: $neoteric-border-color;
    border-radius: 0 0 $border-radius $border-radius;
    box-shadow: $neoteric-box-shadow;
}

.nav-tabs-basic {
    border-bottom: $nav-tabs-border-width solid $nav-tabs-border-color;

    .nav-link {
        color: var(--secondary);
        margin-bottom: -$nav-tabs-border-width;
        background: none;
        border: $nav-tabs-border-width solid transparent;
        padding: 0.8rem 1rem;
        font-weight: bolder;
        @include border-top-radius($nav-tabs-border-radius);

        &:hover,
        &:focus {
            border-color: $nav-tabs-link-hover-border-color;
            // Prevents active .nav-link tab overlapping focus outline of previous/next .nav-link
            isolation: isolate;
        }

        &.disabled {
            color: $nav-link-disabled-color;
            background-color: transparent;
            border-color: transparent;
        }
    }

    .nav-link.active,
    .nav-item.show .nav-link {
        color: $nav-tabs-link-active-color;
        background-color: $nav-tabs-link-active-bg;
        border-color: $nav-tabs-link-active-border-color;
    }
}

.nav-tabs-simple {
    justify-content: center;

    &+.tab-content {
        padding: 1.5rem 0;
        background: none;
        border: none;
        border-radius: 0;
        box-shadow: none;
    }

    .nav-link {
        position: relative;
        background: none;
        background-color: transparent;
        border: none;
        outline: none;
        box-shadow: none;
        border-radius: 0;
        color: var(--nav-simple-tab-link-color, var(--gray-600));
        padding: var(--nav-simple-tab-link-padding-y, 0.6rem) var(--nav-simple-tab-link-padding-x, 1rem);
        text-transform: uppercase;
        font-size: 1.2rem;
        font-weight: bold;
        margin-bottom: 1rem;
        transition: opacity 0.15s ease-in-out;

        &:disabled {
            color: var(--nav-link-disabled-color);
        }

        &:after {
            content: "";
            display: block;
            position: absolute;
            height: 3px;
            background-color: transparent;
            top: 100%;
            left: 50%;
            right: 50%;
            transform: translateY(-100%);
            opacity: 0;
            transition: all 0.15s ease-in-out;
        }

        &:hover,
        &.active,
        &.active:hover {
            color: var(--nav-simple-tab-link-active-color, var(--body-color));

            &:after {
                left: 0.5rem;
                right: 0.5rem;
                background-color: var(--template-primary-color);
                opacity: 1;
            }
        }
    }
}

.nav-offcanvas-tabs {
    display: flex;
    border-radius: 0;
    box-shadow: none;

    .nav-item {
        flex: 1 1 auto;
    }

    .nav-link {
        position: relative;
        display: block;
        width: 100%;
        border: none;
        outline: none;
        padding: 1rem 0.8rem;
        text-transform: uppercase;
        font-weight: bold;
        color: var(--gray-600);
        background-color: rgba(0, 0, 0, 0.04);
        border-bottom: 1px solid rgba(0, 0, 0, 0.106);

        &:after {
            position: absolute;
            content: "";
            bottom: -1px;
            left: 0;
            width: 0;
            height: 2px;
            background-color: var(--template-primary-color);
            transition: width 0.4s ease;
        }

        &.active {
            background-color: rgba(0, 0, 0, 0.1);
            color: var(--body-color);

            &:after {
                width: 100%;
            }
        }
    }


}