@import (once) "../../include/vars";
@import (once) "../../include/mixins";

.tabs {
    position: relative;
    border: 1px solid @borderColor;
    transition: @transition-base;
    background-color: @white;
    color: @dark;

    .hamburger, .expand-title {
        cursor: pointer;
    }

    .hamburger {
        position: absolute;
        top: .25rem;
        right: .25rem;
        display: block;
    }

    .expand-title {
        display: block;
        padding: .65rem 1rem 0;
        background-color: inherit;
        color: inherit;
        text-decoration: none;
    }
}

.tabs > ul.tabs-list {
    .reset-list();
    display: flex;
    flex-direction: column;
    justify-content: inherit;
    width: 100%;
    position: relative;
    margin-top: .5rem;
    margin-bottom: 1px;

    .collapse();
}

.tabs > ul.tabs-list {
    & > li, a {
        position: relative;
    }

    & > li {
        display: block;
        background-color: @white;
        color: @dark;
        margin: 0 0 -1px 0;
    }

    & > li > a {
        padding: .5rem 1rem;
        background-color: inherit;
        color: inherit;
        text-decoration: none;
        display: flex;
        align-items: center;
        justify-content: center;

        &:hover {
            text-decoration: none;
        }

        & > [class*=mif-] {
            margin: 0 4px;
        }
    }

    & > li:hover {
        background-color: @light;
    }

    & > li.active {
        background-color: darken(@light, 10%);
    }

    .d-menu {
        position: relative;
        width: 100%;
        box-shadow: none;
    }
}

.tabs {
    &.bottom > ul.tabs-list {
        border: none;

        & > li {
            margin: -1px 0 0 0;
        }
        & > li.active {
        }
    }
}

.tabs {
    &.vertical  > ul.tabs-list {
        flex-direction: column;
        border: none;
        border-right: 1px solid @borderColor;
        width: auto;
        height: 100%;
        justify-content: inherit;

        & > li {
            border: none;
            border-right: 1px solid @borderColor;
            margin: 0 -1px 0 0;

            & > a {
                text-align: right;
            }
        }

        & > li.active {
            border: 1px solid @borderColor;
            border-right: none;
        }
    }

    &.vertical {
        &.right  > ul.tabs-list {
            //float: right;
            border: none;
            border-left: 1px solid @borderColor;

            & > li {
                border: none;
                border-left: 1px solid @borderColor;
                margin: 0 0 0 -1px;

                & > a {
                    text-align: left;
                }
            }

            & > li.active {
                border: 1px solid @borderColor;
                border-left: none;
            }

        }
    }

    &.vertical {

        min-width: 3.5rem;

        .expand-title {
            display: none!important;
        }
    }
}

.tabs-expand {
    border: none;

    & > ul.tabs-list {
        border: 0;
        border-bottom: 1px solid @borderColor;
        flex-direction: row;
        display: flex !important;
        margin-top: 0;
        height: auto;
        max-height: none;
        overflow: visible;

        & > li {
            border-bottom: 1px solid @borderColor;

            &.active {
                border: 1px solid @borderColor;
                border-bottom: none;
                background-color: @white;
            }
        }

        .d-menu {
            position: absolute;
            width: auto;
            .default-shadow();
        }
    }

    &.bottom {
        & > ul.tabs-list {
            border: none;
            border-top: 1px solid @borderColor;

            & > li {
                border: none;
                border-top: 1px solid @borderColor;

                &.active {
                    border: 1px solid @borderColor;
                    border-top: none;
                }
            }
        }
    }

    &.vertical {
        flex-direction: column;
    }

    .hamburger, .expand-title {
        display: none;
    }

    &:not(.vertical):not(.bottom) {

        ul {
            &.tabs-text, &.tabs-pills, &.tabs-group {
                border-bottom: none;
            }
        }

        ul.tabs-text {
            & > li {
                display: flex;
                align-items: flex-end;
                border: none;
                &:hover {
                    background: @transparent;
                }

                &.active {
                    font-size: 3rem;
                }

                & > a {
                    height: 100%;
                    padding: 0.5rem .5rem 0;
                    align-items: flex-end;
                }

                &:not(.active) {
                    a {
                        padding-bottom: 10px;
                    }
                }
            }
        }

        ul.tabs-group {
            justify-content: space-between;
            & > li {
                border: 1px solid @borderColor;
                width: 100%;
                &.active {
                    background: @lightGray;
                    font-weight: 500;
                }
            }
        }

        ul.tabs-pills {
            & > li {
                border: 1px solid @transparent;
                overflow: hidden;
                border-radius: 10px;

                &.active {
                    font-weight: 500;
                    border-color: @borderColor;
                    background: @lightGray;
                }
            }
        }
    }

}

