/* Tabs */
.resp-tab-content {
    border-radius: 0 0 $border-base $border-base;
    box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.04);
    border: if-light(1px solid #eee, 1px solid $color-dark-4);
    border-top: 0;
    padding: 15px;

    @media #{$screen-medium} {
        border-radius: 0 !important;
        border-color: if-light(#ddd, $color-dark-4);
        border-top: none;
        box-shadow: none;

        &:last-child {
            @include if-dark {
                border-bottom: 1px solid $color-dark-4 !important;
            }
        }
    }

    .panel {
        display: block !important;
    }
}
.resp-tabs-list {
    margin: 0;
    border-bottom: if-light(1px solid #eee, 1px solid $color-dark-4);

    li {
        display: inline-block;
        float: none;
        font-size: 1em;
        font-weight: normal;
        margin-#{$right}: 1px;
        border-radius: $border-normal $border-normal 0 0;
        padding: 10px 15px;

        &:last-child {
            margin-#{$right}: 0;
        }
        &,
        &:hover {
            background: if-light(#f4f4f4, $color-dark-3);
            border-bottom: none;
            border-left: if-light(1px solid #eee, 1px solid $color-dark-3);
            border-right: if-light(1px solid #eee, 1px solid $color-dark-3);
            border-top: if-light(3px solid #eee, 3px solid $color-dark-3);
        }

        &:hover {
            border-bottom-color: transparent;
            border-top: 3px solid #CCC;
            box-shadow: none;
        }

        &:active,
        &:focus {
            border-bottom: 0;
        }

        &.resp-tab-active {
            background: if-light(#fff, $color-dark-4);
            border-left: if-light(1px solid #eee, 1px solid $color-dark-4);
            border-right: if-light(1px solid #eee, 1px solid $color-dark-4);
            border-top: 3px solid #CCC;
            padding: 10px 15px 11px !important;
        }
    }
}

.resp-vtabs {
    display: table !important;
    width: 100%;

    @media #{$screen-medium} {
        display: block;
    }

    ul.resp-tabs-list,
    .resp-tabs-container {
        display: table-cell;
        width: auto;
        float: none;
        vertical-align: top;
    }
    ul.resp-tabs-list {
        width: 25%;

        @media #{$screen-medium} {
            display: none;
        }
    }
    .resp-tabs-container {
        border-radius: corner-values(0 $border-base $border-base 0);
        box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.04);
        border: if-light(1px solid #eee, 1px solid $color-dark-4);
        background: if-light(#fff, $color-dark-4);

        @media #{$screen-medium} {
            display: block;
            box-shadow: none;
            border: none;
        }
    }
    .resp-tab-content {
        background: transparent;
        box-shadow: none;
        border-radius: 0;
        border-width: 0;
        &:before {
            content:"";
            display:block;
        }
        @media #{$screen-medium} {
            border: if-light(1px solid #ddd, 1px solid $color-dark-4);
            border-top: none;

            &:last-child {
                @include if-dark {
                    border-bottom: 1px solid $color-dark-4 !important;
                }
            }
        }
    }
    .resp-tabs-list {
        border-bottom: 0;

        li {
            border-radius: 0;
            margin-#{$right}: 0;
            padding: 10px 15px !important;

            &:first-child {
                border-radius: corner-values($border-normal 0 0 0);
                border-top: if-light(1px solid #eee !important, 1px solid $color-dark-4 !important);
            }

            &:last-child {
                border-radius: corner-values(0 0 0 $border-normal);
                border-bottom: if-light(1px solid #eee !important, 1px solid $color-dark-4 !important);
            }

            &,
            &:hover {
                border-#{$left}: if-light(3px solid #eee, 3px solid $color-dark-4);
                border-#{$right}: none;
                border-top: none;
                border-bottom: none;
            }

            &:hover {
                border-#{$right}-color: transparent;
                border-#{$left}: 3px solid #CCC;
            }

            &:active,
            &:focus {
                border-#{$right}: 0;
            }

            &.resp-tab-active {
                background: if-light(#fff, $color-dark-4);
                margin-bottom: 0 !important;
                padding: side-values(10px 16px 10px 15px) !important;
                border-#{$left}: 3px solid #CCC;
                margin-#{$right}: -1px !important;
            }
        }
    }
}

h2.resp-accordion {
    background: if-light(#f5f5f5 !important, $color-dark-3 !important);
    border-color: if-light(#ddd, $color-dark-4);
    padding: 15px !important;
    line-height: 1.4;
    font-size: 1em;
    font-weight: 400;
    &:first-child {
        border-top-color: if-light(#ddd !important, $color-dark-4 !important);
    }

}
h2.resp-tab-active {
    background: if-light(#f5f5f5 !important, $color-dark-3 !important);
    border-bottom: if-light(1px solid #ddd !important, 1px solid $color-dark-3 !important);
}
.resp-arrow {
    display: none;
}
.resp-easy-accordion {
    .resp-tab-content {
        border-radius: 0;
        border-color: if-light(#ddd, $color-dark-4);
        background: if-light(#fff, $color-dark-4);
        border-top: none;
        box-shadow: none;

        &:last-child {
            border-color: if-light(#ddd !important, $color-dark-3 !important);
        }
    }

    h2.resp-tab-active {
        @include if-dark {
            background: $color-dark-4 !important;
        }
    }
}

.tab-content {
    padding: 15px;

    h2 {
        font-size: 1.4286em;
        line-height: 1.4;
        font-weight: 400;
        margin-bottom: 1.0714em;
    }

    p {
        margin-bottom: 10px;
    }

    table {
        margin-top: 20px;
        p {
            margin: 0;
        }
    }

    *:last-child {
        margin-bottom: 0;
    }
}

.tabs {
    border-radius: $border-base;
    margin-bottom: 35px;
}

.nav-tabs {
    margin: 0;
    font-size: 0;
    border-bottom-color: if-light(#eee, $color-dark-3);
    text-align: $left;

    &.text-left {
        text-align: left;
    }

    &.text-right {
        text-align: right;
    }

    &.text-center {
        text-align: center;
    }

    li {
        display: inline-block;
        float: none;

        &:last-child {
            a {
                margin-#{$right}: 0;
            }
        }

        a {
            margin-#{$right}: 1px;
            border-radius: $border-normal $border-normal 0 0;
            font-size: 14px;

            &,
            &:hover {
                background: if-light(#f4f4f4, $color-dark-3);
                border-bottom: none;
                border-left: if-light(1px solid #eee, 1px solid $color-dark-3);
                border-right: if-light(1px solid #eee, 1px solid $color-dark-3);
                border-top: if-light(3px solid #eee, 3px solid $color-dark-3);
            }

            &:hover {
                border-bottom-color: transparent;
                border-top: if-light(3px solid #ccc, 3px solid $dark-default-text);
                box-shadow: none;
            }

            &:active,
            &:focus {
                border-bottom: 0;
            }

            i {
                margin-#{$right}: 4px;
                &.icon-image {
                    display: inline-block;
                    max-width: 20px;
                }
                &.icon-featured.icon-image {
                    max-width: 75px;
                }
            }

            .featured-box,
            .featured-box .box-content {
                background: transparent;
                box-shadow: none;
                border-radius: 0;
                border-width: 0;
                padding: 0;
                margin: 0;
            }

            .featured-box {
                i.icon-featured {
                    margin-left: auto;
                    margin-right: auto;
                }
            }

            .tab-title {
                display: block;
                margin-top: 3px;
            }
        }

        &.active {
            a,
            a:hover,
            a:focus {
                background: if-light(#fff, $color-dark-4);
                border-left-color: if-light(#eee, $color-dark-4);
                border-right-color: if-light(#eee, $color-dark-4);
                border-top: if-light(3px solid #ccc, 3px solid $dark-default-text);
            }
        }
    }
}

.tab-content {
    border-radius: 0 0 $border-base $border-base;
    box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.04);
    background: if-light(#fff, $color-dark-4);
    border: if-light(1px solid #eee, 1px solid $color-dark-4);
    border-top: 0;
    padding: 15px;
}

/* Right Aligned */
.nav-tabs.nav-right {
    text-align: right;
}

/* Bottom Tabs */
.tabs.tabs-bottom {

    .tab-content {
        border-radius: $border-base $border-base 0 0;
        border-bottom: 0;
        border-top: if-light(1px solid #eee, 1px solid $color-dark-4);
    }

    .nav-tabs {
        border-bottom: none;
        border-top: if-light(1px solid #eee, 1px solid $color-dark-4);

        li {
            margin-bottom: 0;
            margin-top: -1px;

            &:last-child {
                a {
                    margin-#{$right}: 0;
                }
            }

            a {
                margin-#{$right}: 1px;
                border-radius: 0 0 $border-normal $border-normal;
                font-size: 14px;

                &,
                &:hover {
                    border-bottom: if-light(3px solid #eee, 3px solid $color-dark-3);
                    border-top: if-light(1px solid #eee !important, 1px solid $color-dark-4 !important);
                }

                &:hover {
                    border-bottom: if-light(3px solid #ccc, 3px solid $dark-default-text);
                    border-top: if-light(1px solid #eee !important, 1px solid $color-dark-4 !important);
                }
            }

            &.active {
                a,
                a:hover,
                a:focus {
                    border-bottom: if-light(3px solid #ccc, 3px solid $dark-default-text);
                    border-top-color: transparent !important;
                }
            }
        }
    }
}

/* Vertical */
.tabs-vertical {
    display: table;
    width: 100%;
    border-top: if-light(1px solid #eee, 1px solid $color-dark-4);
    direction: ltr;

    .tab-content {
        display: table-cell;
        vertical-align: top;
        direction: if-ltr(ltr, rtl);
        text-align: $left;
    }

    .nav-tabs {
        border-bottom: none;
        display: table-cell;
        height: 100%;
        float: none;
        padding: 0;
        vertical-align: top;

        & > li {
            display: block;

            a {
                border-radius: 0;
                display:block;
                padding-top: 10px;
                text-align: $left;

                &,
                &:hover,
                &:focus {
                    border-bottom: none;
                    border-top: none
                }
            }

            &.active {
                a,
                a:hover,
                &:focus {
                    border-top: none;
                }
            }
        }
    }
}

/* Vertical - Left Side */
.tabs-left {
    .tab-content {
        border-left: none;
        border-radius: 0 $border-normal $border-normal $border-normal;
    }

    .nav-tabs {
        & > li {
            margin-right: -1px;

            &:first-child {
                a {
                    border-radius: $border-normal 0 0 0;
                }
            }

            &:last-child {
                a {
                    border-radius: 0 0 0 $border-normal;
                    border-bottom: if-light(1px solid #eee, 1px solid $color-dark-3);
                }
            }

            a {
                border-right: if-light(1px solid #eee, 1px solid $color-dark-3);
                border-left: if-light(3px solid #eee, 3px solid $color-dark-3);
                margin-right: 1px;
                margin-left: 1px;

                &:hover {
                    border-left-color: #CCC;
                }
            }

            &.active {
                a,
                a:hover,
                a:focus {
                    border-left: 3px solid #CCC;
                    border-right-color: if-light(#fff, $color-dark-4);
                }
            }
        }
    }
}

/* Vertical - Right Side */
.tabs-right {

    .tab-content {
        border-radius: $border-normal 0 $border-normal $border-normal;
        border-right: none;
    }

    .nav-tabs {
        & > li {
            margin-left: -1px;

            &:first-child {
                a {
                    border-radius: 0 $border-normal 0 0;
                }
            }

            &:last-child {
                a {
                    border-radius: 0 0 $border-normal 0;
                    border-bottom: if-light(1px solid #eee, 1px solid $color-dark-3);
                }
            }

            a {
                border-right: if-light(3px solid #eee, 3px solid $color-dark-3);
                border-left: if-light(1px solid #eee, 1px solid $color-dark-3);
                margin-right: 1px;
                margin-left: 1px;

                &:hover {
                    border-right-color: #CCC;
                }
            }

            &.active {
                a,
                a:hover,
                a:focus {
                    border-right: 3px solid #CCC;
                    border-left-color: if-light(#fff, $color-dark-4);
                }
            }
        }
    }
}

/* Justified */
.nav-tabs.nav-justified {
    padding: 0;
    margin-bottom: -1px;

    li {
        margin-bottom: 0;

        &:first-child {
            a,
            a:hover {
                border-radius: corner-values($border-normal 0 0 0);
            }
        }

        &:last-child {
            a,
            a:hover {
                border-radius: corner-values(0 $border-normal 0 0);
            }
        }

        a {
            border-bottom: if-light(1px solid #eee, 1px solid $color-dark-3);
            border-radius: 0;
            margin-#{$right}: 0;

            &:hover,
            &:focus {
                border-bottom: if-light(1px solid #eee, 1px solid $color-dark-3);
            }
        }

        &.active {
            a,
            a:hover,
            a:focus {
                background: if-light(#fff, $color-dark-4);
                border-left-color: if-light(#eee, $color-dark-4);
                border-right-color: if-light(#eee, $color-dark-4);
                border-top-width: 3px;
            }
        }

        &.active {
            a {
                &,
                &:hover,
                &:focus {
                    border-top-width: 3px;
                    border-bottom: if-light(1px solid #fff, 1px solid $color-dark-4);
                }
            }
        }
    }
}

/* Bottom Tabs with Justified Nav */
.tabs.tabs-bottom {
    .nav.nav-tabs.nav-justified {
        border-top: none;
        li {
            a {
                margin-#{$right}: 0;
                border-top: if-light(1px solid #eee, 1px solid $color-dark-3);
            }

            &:first-child {
                a {
                    border-radius: corner-values(0 0 0 $border-normal);
                }
            }

            &:last-child {
                a {
                    margin-#{$right}: 0;
                    border-radius: corner-values(0 0 $border-normal 0);
                }
            }

            &.active {
                a,
                a:hover,
                a:focus {
                    border-top: if-light(1px solid #fff, 1px solid $color-dark-4);
                }
            }
        }
    }
}

/* Center */
.tabs-center {
    .nav-tabs {
        margin: 0 auto;
        text-align: center;
    }
}

/* Navigation */
.tabs-navigation {
    border-radius: $border-normal;
    border-width: 0;
    .nav-tabs {
        > li {
            margin-bottom: 1px;
            a {
                color: #777;
                padding: 14px;
                line-height: 120%;
                &:before {
                    font-family: FontAwesome;
                    position: absolute;
                    content: if-ltr($fa-var-chevron-right, $fa-var-chevron-left);
                    #{$right}: 15px;
                    top: 15px;
                }
                i {
                    margin-#{$right}: 8px;
                }
            }
        }
        > li:first-child a {
            border-top: if-light(1px solid #eee !important, 1px solid $color-dark-4 !important);
            border-radius: $border-normal $border-normal 0 0;
        }
        > li.active a {
            &, &:hover, &:focus {
                border-left-color: if-light(#eee, $color-dark-4);
                border-right-color: if-light(#eee, $color-dark-4);
            }
        }
        > li:last-child a {
            border-radius: 0 0 $border-normal $border-normal;
        }
    }
    .tab-content {
        background: transparent;
        border-width: 0;
        padding: 0 25px;
    }
}

/* Simple */
.tabs.tabs-simple {
    .nav-tabs {
        border: 0;
        margin-bottom: 10px;
        > li {
            margin-left: 0;
            margin-bottom: $spacement-lg;
            text-align: center;
            a, a:hover, a:focus {
                padding: 15px 30px;
                background: none;
                border: 0;
                border-bottom: if-light(3px solid #eee, 3px solid $color-dark-4);
                border-radius: 0;
                font-size: 16px;
            }
        }
    }
    .tab-content {
        background: transparent;
        border: 0;
        padding: 0;
        margin: 0;
        box-shadow: none;
    }
}

/* Responsive */
@media (max-width: 991px) {
    .tabs-navigation {
        display: block;

        .nav-tabs {
            display: block;
        }

        .tab-content {
            padding: 25px 0;
        }
    }
}
@media (max-width: 479px) {

    .tabs {
        .nav.nav-tabs.nav-justified {
            li {
                display: block;
                margin-bottom: -5px;
                a {
                    border-top-width: 3px !important;
                    border-bottom-width: 0 !important;
                }
                &:first-child a,
                &:first-child a:hover {
                    border-radius: $border-normal $border-normal 0 0;
                }
                &:last-child a,
                &:last-child a:hover {
                    border-radius: 0;
                }
                &.active {
                    a {

                    }
                }
            }
        }
        &.tabs-bottom {
            .nav.nav-tabs.nav-justified {
                li {
                    margin-bottom: 0;
                    margin-top: -5px;
                    a {
                        border-bottom-width: 3px !important;
                        border-top-width: 0 !important;
                    }
                    &:first-child a,
                    &:first-child a:hover {
                        border-radius: 0;
                    }
                    &:last-child a,
                    &:last-child a:hover {
                        border-radius: 0 0 $border-normal $border-normal;
                    }
                }
            }
        }
    }
}