@import '../../../styles/variables.less';

:host {
    position: absolute;
    display: block;
    background: var(--scheme-color-5-lighten-15);
    & div.arrow-left {
        position: absolute;
        background: var(--scheme-color-5-lighten-15);
        display: none;
        &.top {
            display: block;
            width: 1rem;
            height: 100%;
            left: 0;
            z-index: 1;
            & span {
                position: absolute;
                display: block;
                top: 0;
                width: 100%;
                left: 0;
                padding: 7px 0 0 5px;
                color: var(--scheme-color-1);
            }
        }
    }
    & div.arrow-right {
        position: absolute;
        display: none;
        background: var(--scheme-color-5-lighten-15);
        &.top {
            display: block;
            width: 1rem;
            height: 100%;
            right: 0;
            z-index: 1;
            & span {
                position: absolute;
                display: block;
                top: 0;
                width: 100%;
                left: 0;
                padding: 7px 0 0 5px;
                color: var(--scheme-color-1);
            }
        }
    }
    & div.wrapper {
        position: absolute;
        display: block;
        height: 100%;
        width: 100%;
        list-style: none;
        padding: 0;
        margin: 0;
        transition: all 150ms ease-in-out;
        & ul.list {
            position: absolute;
            display: block;
            height: 100%;
            list-style: none;
            padding: 0;
            margin: 0;
            white-space: nowrap;
            box-sizing: content-box !important;
            width: auto;
            & li.tab {
                display: inline-block;
                position: relative;
                list-style: none;
                box-sizing: content-box !important;
                cursor: default;
                overflow: hidden;
                & mat-icon {
                    color: var(--scheme-color-0);
                    padding: 3px 6px 3px 2px;
                }
                & p.title {
                    display: inline-block;
                    white-space: nowrap;
                    color: var(--scheme-color-1);
                    opacity: 0.5;
                    max-width: 10rem;
                    overflow: hidden;
                    text-overflow: ellipsis;
                    font-weight: 400;
                    vertical-align: top;
                    &.uppercase {
                        text-transform: uppercase;
                        font-size: 12px;
                    }
                }
                & div.title-injection {
                    position: relative;
                    display: inline-block;
                    padding: 0;
                    margin: 0;
                    vertical-align: top;
                }
                & mat-icon.close {
                    font-size: 18px;
                    opacity: 0;
                    color: var(--scheme-color-3);
                    vertical-align: top;
                    &:hover {
                        color: var(--scheme-color-1);
                    }
                }
                &:hover {
                    & mat-icon.close {
                        opacity: 1;
                    }
                }
                &.active {
                    box-sizing: content-box !important;
                    background: var(--scheme-color-5);
                    &::after {
                        position: absolute;
                        display: block;
                        content: '';
                        background: var(--scheme-color-5);
                    }
                    & mat-icon.close {
                        opacity: 1;
                    }
                    & p.title {
                        color: var(--scheme-color-1);
                        opacity: 1;
                    }
                }
            }
            &.top {
                box-sizing: content-box !important;
                &.arrows-offset {
                    padding: 0 0 0 1rem;
                }
                & li.tab {
                    padding: 0;
                    margin: 0;
                    height: 100%;
                    cursor: default;
                    box-sizing: content-box !important;
                    & p.title {
                        padding: 6px 12px;
                        &.uppercase {
                            padding: 8px 12px;
                        }
                    }
                    & mat-icon.close {
                        padding: 7px 0.5rem 0 0;
                        transition: all 150ms ease-in-out;
                        transform: translateY(-16px);
                        vertical-align: top;
                    }
                    &:hover {
                        & mat-icon.close {
                            transform: translateY(0);
                        }
                    }
                    &.active {
                        box-sizing: content-box !important;
                        background: var(--scheme-color-5);
                        &::after {
                            width: 100%;
                            height: 2px;
                            bottom: -1px;
                            background: var(--scheme-color-5);
                        }
                        & mat-icon.close {
                            transform: translateY(0);
                        }
                    }
                }
            }
            &.left {
                white-space: normal;
                box-sizing: content-box !important;
                & li.tab {
                    padding: 0;
                    margin: 0;
                    height: auto;
                    cursor: default;
                    box-sizing: content-box !important;
                    white-space: nowrap;
                    width: ~'calc(100% + 6px)';
                    & p.title {
                        padding: 16px 8px 16px 0px;
                        writing-mode: vertical-rl;
                        text-orientation: mixed;
                        transform: rotate(180deg);
                        &.uppercase {
                            padding: 16px 9px 16px 0px;
                        }
                    }
                    & mat-icon.close {
                        display: inline-block;
                        padding: 0px 0px 0px 0px;
                        margin: 0px 0px 7px -15px;
                        vertical-align: bottom;
                        transition: all 150ms ease-in-out;
                        transform: translateY(-16px);
                        pointer-events: none;
                    }
                    &:hover {
                        & mat-icon.close {
                            transform: translateY(0);
                            pointer-events: all;
                        }
                    }
                    &.active {
                        background: var(--scheme-color-5);
                        &::after {
                            width: 100%;
                            height: 2px;
                            bottom: -1px;
                            background: var(--scheme-color-5);
                        }
                        & mat-icon.close {
                            transform: translateY(0);
                            pointer-events: all;
                        }
                    }
                }
            }
        }
        &.injection {
            display: flex;
            margin: 0;
            padding: 0;
            &.top {
                flex-flow: row nowrap;
            }
            &.left {
                flex-flow: column nowrap;
            }
            & ul.list {
                display: block;
                position: relative;
                height: 100%;
                margin: 0;
                padding: 0;
                flex: 1 auto;
                order: 1;
                width: auto;
                &.top {
                    width: auto;
                }
                &.left {
                    height: auto;
                }
            }
            & div.injection {
                display: block;
                position: relative;
                height: 100%;
                margin: 0;
                padding: 0;
                flex: 1 auto;
                order: 2;
                width: 100%;
            }
        }
    }
}
