/* Tabs */
.resp-tab-content {
    box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.04);
    border-top: 0;
    padding: 15px;

    @media #{$screen-medium} {
        border-radius: 0 !important;
        border-top: none;
        box-shadow: none;

        &, .resp-vtabs & {
            border-color: var(--porto-gray-2);
        }
    }

    .panel {
        display: block !important;
    }
}
.resp-tabs-list {
    margin: 0;
    border-bottom: 1px solid var(--porto-gray-2);

    li {
        display: inline-block;
        float: none;
        font-size: 1em;
        font-weight: normal;
        color: var(--porto-primary-color);
        margin-#{$right}: 1px;
        padding: 10px 15px;

        &:last-child {
            margin-#{$right}: 0;
        }
        &,
        &:hover {
            background: var(--porto-gray-1);
            border: 1px solid var(--porto-gray-5);
            border-top-width: 3px;
            border-bottom: none;
        }

        &:hover {
            border-top-color: var(--porto-primary-color);
            box-shadow: none;
        }

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

        &.resp-tab-active {
            background: var(--porto-light-1);
            border-left: 1px solid var(--porto-gray-2);
            border-right: 1px solid var(--porto-gray-2);
            border-top: 3px solid var(--porto-primary-color);
            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;
        background: var(--porto-light-1);
        border: 1px solid var(--porto-gray-2);
    }
    ul.resp-tabs-list {
        width: 25%;

        @media #{$screen-medium} {
            display: none;
        }
    }
    .resp-tabs-container {
        box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.04);

        @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: 1px solid var(--porto-gray-2);
            border-top: none;
        }
    }
    .resp-tabs-list {
        border-bottom: 0;

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

            &,
            &:hover {
                border-#{$left}: 3px solid var(--porto-gray-2);
                border-#{$right}: none;
                border-top: none;
                border-bottom: none;
            }

            &:hover {
                border-#{$right}-color: transparent;
                border-#{$left}: 3px solid var(--porto-primary-color);
            }

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

            &:first-child {
                border-top: 1px solid var(--porto-gray-2) !important;
            }

            &:last-child {
                border-bottom: 1px solid var(--porto-gray-2) !important;
            }

            &.resp-tab-active {
                margin-bottom: 0 !important;
                padding: side-values(10px 16px 10px 15px) !important;
                background: var(--porto-light-1);
                border-#{$left}: 3px solid var(--porto-primary-color);
                margin-#{$right}: -1px !important;
            }
        }
    }
}

h2.resp-accordion {
    padding: 15px !important;
    line-height: 1.4;
    font-size: 1em;
    font-weight: 400;
    background: var(--porto-gray-1) !important;
    border-color: var(--porto-gray-2);

    &:first-child {
        border-top-color: var(--porto-gray-2) !important;
    }
}
h2.resp-tab-active {
    background: var(--porto-gray-1) !important;
    border-bottom: 1px solid var(--porto-gray-5) !important;
}
.resp-arrow {
    display: none;
}
.resp-easy-accordion {
    .resp-tab-content {
        background: var(--porto-light-1);
        border-color: var(--porto-gray-2);
        border-radius: 0;
        border-top: none;
        box-shadow: none;
        &:last-child {
            border-color: var(--porto-gray-2) !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 {
    margin-bottom: 35px;
}

.nav-tabs {
    margin: 0;
    text-align: $left;
    border-bottom-color: var(--porto-gray-2);

    &.text-left, &.text-start {
        text-align: $left;
    }

    &.text-right, &.text-end {
        text-align: $right;
    }

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

    .nav-link {
        margin-#{$right}: 1px;
        font-size: 14px;
        color: var(--porto-primary-color);

        &.active {
            color: var(--porto-primary-color);
        }

        &,
        &:hover,
        &:focus {
            background: var(--porto-gray-1);
            border-top-width: 3px;
            border-color: var(--porto-gray-2)
        }

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

        &:hover {
            border-top-color: var(--porto-primary-color);
            border-bottom-color: transparent;
            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;
        }
    }

    li {

        &:last-child {
            .nav-link {
                margin-#{$right}: 0;
            }
        }

        &.active .nav-link {
            background: var(--porto-light-1);
            border-color: var(--porto-gray-2);
            border-top-color: var(--porto-primary-color);
        }
    }
}

.tab-content {
    background: var(--porto-light-1);
    border: 1px solid var(--porto-gray-2);
    box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.04);
    border-top-width: 0;
    padding: 15px;
}

/* Bottom Tabs */
.tabs.tabs-bottom {
    .nav-tabs {
        li {
            margin-bottom: 0;
            margin-top: -1px;

            &:last-child {
                .nav-link {
                    margin-#{$right}: 0;
                }
            }

            .nav-link {
                margin-#{$right}: 1px;
                font-size: 14px;
                border-top: 1px solid var(--porto-gray-2);
                border-bottom: 3px solid var(--porto-gray-2);
            }

            &.active .nav-link, .nav-link:hover {
                border-top-color: transparent;
                border-bottom-color: var(--porto-primary-color);
            }
        }
    }
    .tab-content, .nav-tabs {
        border-bottom: none;
        border-top-width: 1px;
    }
}

/* Vertical */
.tabs-vertical {
    display: table;
    table-layout: fixed;
    width: 100%;
    direction: ltr;
    border-top: 1px solid var(--porto-gray-2);

    .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;
        width: 25%;
        /*@media #{$screen-normal} {
            width: 100%;
        }*/

        & > li {
            display: block;

            .nav-link {
                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 */
.tabs-left, .tabs-right {
    .nav-tabs {
        > li {
            .nav-link {
                margin-right: 1px;
                margin-left: 1px;
            }

            &:last-child .nav-link {
                border-bottom: 1px solid var(--porto-gray-2);
            }
        }
    }
}
/* Vertical - Left Side */
.tabs-left {
    .tab-content {
        border-left: none;
    }

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

            .nav-link {
                border-#{$right}: 1px solid var(--porto-gray-2);
                border-#{$left}: 3px solid var(--porto-gray-2);
            }

            &.active .nav-link {
                border-#{$right}-color: transparent;
            }

            .nav-link:hover, &.active .nav-link {
                border-#{$left}-color: var(--porto-primary-color);
            }
        }
    }
}

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

    .tab-content {
        border-right: none;
    }

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

            .nav-link {
                border-#{$left}: 1px solid var(--porto-gray-2);
                border-#{$right}: 3px solid var(--porto-gray-2);
            }

            &.active .nav-link {
                border-#{$left}-color: transparent;
            }

            .nav-link:hover, &.active .nav-link {
                border-#{$right}-color: var(--porto-primary-color);
            }
        }
    }
}

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

    li {
        margin-bottom: 0;

        .nav-link {
            border-bottom: 1px solid var(--porto-gray-2);
            border-radius: 0;
            margin-#{$right}: 0;
        }

        &.active .nav-link {
            border-bottom-color: transparent;
        }
    }
}

/* Bottom Tabs with Justified Nav */
.tabs.tabs-bottom {
    .nav.nav-tabs.nav-justified {
        border-top: none;
        li {
            .nav-link {
                margin-#{$right}: 0;
            }

            &:last-child {
                .nav-link {
                    margin-#{$right}: 0;
                }
            }
        }
    }
}

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

/* Navigation */
.tabs-navigation {
    border-width: 0;
    .nav-tabs {
        > li {
            margin-bottom: 1px;
            .nav-link {
                color: #777;
                padding: 14px;
                line-height: 100%;
                position: relative;
                &:before {
                    font-family: var(--fa-style-family-classic, "Font Awesome 6 Free");
                    font-weight: 900;
                    position: absolute;
                    content: if-ltr($fa-var-chevron-right, $fa-var-chevron-left);
                    #{$right}: 15px;
                    top: 50%;
                    transform: translateY(-50%);
                }
                i {
                    margin-#{$right}: 6px;
                }
            }

            &:first-child .nav-link {
                border-top: 1px solid var(--porto-gray-2) !important;
            }

            &.active .nav-link {
                border-#{$right}-color: var(--porto-gray-2);
            }
        }
    }
    .tab-content {
        background: transparent;
        border-width: 0;
        box-shadow: none;
        padding: 0 25px;
    }
}

/* Simple */
.tabs.tabs-horizontal {
    display: block;
}
.tabs.tabs-simple {
    .nav-tabs {
        justify-content: center;
        border: 0;
        margin-bottom: 10px;
        > li {
            margin-#{$left}: 0;
            margin-bottom: $spacement-lg;
            text-align: center;
            .nav-link {
                padding: 15px 30px;
                background: none;
                border-radius: 0;
                font-size: 16px;
                border: 0;
                color: var(--porto-body-color);
                border-bottom: 3px solid var(--porto-gray-2);
            }

            &.active .nav-link, .nav-link:hover, .nav-link:focus {
                border-bottom-color: var(--porto-primary-color);
            }
        }
    }
    .tab-content {
        background: transparent;
        border: 0;
        padding: 0;
        margin: 0;
        box-shadow: none;
    }
}

/* theme colors */
/* secondary, tertiary, quaternary, dark, light */
@each $state in $color_states_not_primary {
    .tabs-#{nth($state,1)} ul.nav-tabs .nav-link {
        color: var(--porto-#{nth($state,1)}-color);
    }

    .tabs-#{nth($state,1)} ul.nav-tabs li.active .nav-link,
    .tabs-#{nth($state,1)} ul.nav-tabs li .nav-link:hover {
        border-top-color: var(--porto-#{nth($state,1)}-color);
    }
    .tabs-#{nth($state,1)}.tabs-bottom .nav-tabs li .nav-link:hover,
    .tabs-#{nth($state,1)}.tabs-bottom .nav-tabs li.active .nav-link {
        border-bottom-color: var(--porto-#{nth($state,1)}-color);
    }
    .tabs-#{nth($state,1)}.tabs-vertical.tabs-left li .nav-link:hover,
    .tabs-#{nth($state,1)}.tabs-vertical.tabs-left li.active .nav-link {
        border-left-color: var(--porto-#{nth($state,1)}-color);
    }
    .tabs-#{nth($state,1)}.tabs-vertical.tabs-right li .nav-link:hover ,
    .tabs-#{nth($state,1)}.tabs-vertical.tabs-right li.active .nav-link {
        border-right-color: var(--porto-#{nth($state,1)}-color);
    }
}

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

        .nav-tabs {
            display: block;
            width: auto;
        }

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

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

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

/* Section Tab */
.section-tabs.tabs {
    --porto-section-tab-nav-color: var(--porto-gray-2);
    --porto-section-tab-nav-active-color: var(--porto-primary-color);
    --porto-section-tab-nav-width: 3px;
    
    margin-bottom: 0;
    .tab-pane {
        width: 100%;
        > .elementor-widget-wrap,
        > .elementor-column-wrap {
            height: 100%;
        }
    }
    &.tabs-simple.tabs-horizontal .nav-tabs > li {
        margin-bottom: 0;
    }
    .nav-link {
        height: calc( 100% + 1px );
    }
    .nav-item.nav-icon-up i {
        display: block;
        margin-right: 0;
    }
    .nav-item:not(.nav-icon-up) .nav-link {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
    }
    .tab-content {
        flex: 1;
    }
    &.tabs-vertical {
        .tab-pane {
            height: 100%;
        }
        .nav, .nav-item{
            margin-bottom: 0;
        }
    }
    &:not(.tabs-vertical):not(.tabs-bottom) {
        .nav-item .nav-link {
            border-top-color: var(--porto-section-tab-nav-color);
            border-top-width: var(--porto-section-tab-nav-width);
        }
        .nav-item.active .nav-link,
        .nav-link:hover {
            border-top-color: var(--porto-section-tab-nav-active-color);    
        }
    }
    &.tabs-bottom,
    &.tabs-simple .nav-tabs {
        .nav-item .nav-link {
            border-bottom-color: var(--porto-section-tab-nav-color);
            border-bottom-width: var(--porto-section-tab-nav-width);
        }
        .nav-item.active .nav-link,
        .nav-link:hover {
            border-bottom-color: var(--porto-section-tab-nav-active-color);    
        }
    }
    &.tabs-vertical.after-nav {
        .nav-item .nav-link {
            border-right-color: var(--porto-section-tab-nav-color);
            border-right-width: var(--porto-section-tab-nav-width);
        }
        .nav-item.active .nav-link,
        .nav-link:hover {
            border-right-color: var(--porto-section-tab-nav-active-color);    
        }
    }
    &.tabs-vertical:not(.after-nav) {
        .nav-item .nav-link {
            border-left-color: var(--porto-section-tab-nav-color);
            border-left-width: var(--porto-section-tab-nav-width);
        }
        .nav-item.active .nav-link,
        .nav-link:hover {
            border-left-color: var(--porto-section-tab-nav-active-color);    
        }
    }
}