@import '../../base/base';

body {
    &.layout-rtl {

        /*  Tree View   */

        .treeview {
            list-style: none;
            padding: 0;
            margin-bottom: 0;
            position: relative;

            li {
                p {
                    font-size: 13px;
                    color: #888ea8;
                    font-weight: 500;
                }
            }
            .tv-item {
                
                .tv-header {
                    padding: 6px 0;
                    cursor: pointer;
                    position: relative;
                    .tv-collapsible {
                        display: flex;
        
                        .icon {
                            margin-left: 6px;
                            align-self: center;
                            svg {
                                width: 14px;
                                height: 14px;
                                transition: .5s;

                                &.icon-tabler-chevron-right {

                                }
                            }
                        }
            
                        .title {
                            margin-bottom: 0;
                            align-self: center;
                            font-size: 14px;
                            color: #3b3f5c;
                            font-weight: 600;
                        }

                        &:not(.collapsed) {
                            .icon {
                                svg {
                                    &.icon-tabler-chevron-right {
                                        transform: rotate(90deg);
                                        color: #3b3f5c;
                                    }
                                }
                            }
                        }
                        
                    }

                    
                }

                .treeview-collapse {

                    .treeview {
                        position: relative;
                        &:before {
                            content: "";
                            position: absolute;
                            height: calc(100% - 10px);
                            width: 1px;
                            top: 0;
                            right: -24px;
                            display: block;
                            border-left: 1px dashed #888ea8;
                            display: none;
                        }
                    }
                    
                    &.show {
                        .treeview {
                            &:before {
                                display: block;
                            }
                        }
                    }
                    
                }
            }
            
            
            .treeview {
                margin-right: 30px;
                list-style: none;
                padding: 0;

                .tv-item {

                    position: relative;

                    &:before {
                        content: '';
                        position: absolute;
                        height: 1px;
                        width: 18px;
                        right: -22px;
                        top: 10px;
                        border-bottom: 1px dashed #888ea8;
                    }
                    
                    &.tv-folder {
                        
                        &:before {
                            right: -22px;
                            top: 18px;
                            
                        }
                        
                    }


                    &:not(.tv-folder) {
                        padding-right: 5px;
                    }
                    
                }
                
            }


            &.folder-structure {

                .tv-item {
                
                    .tv-header {
                        padding: 6px 0;
                        cursor: pointer;
                        .tv-collapsible {
                            display: flex;
                
                            .icon {
                                margin-left: 6px;
                                align-self: center;
                                svg {
                                    width: 20px;
                                    height: 20px;
                                    transition: .5s;
                                    color: #e2a03f;
                                    fill: #e2a03f;
                                }
                            }

                            &:not(.collapsed) {
                                .icon {
                                    svg {
                                        color: #e2a03f;
                                        fill: rgb(226 160 63 / 40%);
                                    }
                                }
                            }
                        }
                    }
                }


                &.treeview {

                    .tv-item {

                        &:not(.tv-folder) {
            
                            span {
                                &.icon {
                                    margin-right: 5px;
                                    svg {
                                        color: #888ea8;
                                        fill: #4361ee33;
                                        width: 20px;
                                        height: 20px;
                                    }
                                }
                            }
                            p {
                                display: inline-block;
                            }
                        }


                        &:before {
                            top: 14px;
                        }
                        
                    }
                    
                }

                .tv-item {

                    .treeview-collapse {
                        .treeview {
                            &:before {
                                height: calc(100% - 16px);
                            }
                        }
                    }
                    
                }
                
            }
            
        }

    }
}