@import (reference) 'main.less';

@left-col-bg: #263238;
@left-col-color: darken(#E4E6E6, 10%);
@left-col-width: 220px;

#left-col {
    width: @left-col-width;
    background-color: @left-col-bg;
    color: @left-col-color;
    text-align: center;
    flex: 0 0 auto;
    .user-select(none);
    position: relative;
    height: 100%;
    transition: left 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    left: 0;

    &.closed {
        left: -500px;
    }

    .left-col-closer {
        position: absolute;
        color: @left-col-color;
        top: 5px;
        right: 5px;
        font-size: 21px;
    }

    .space-usage {
        display: none;
        width: 100%;
        position: absolute;
        bottom: 20px;
        left: 15px;
        padding-right: 40px;

        > .progress {
            height: 10px;
            background-color: lighten(@left-col-bg, 8%);
            margin-bottom: 10px;
        }

        > .text {
            text-align: left;
            padding-left: 2px;
            font-size: 12px;
            .clearfix();
            
            > .upgrade {
                display: block;
                float: right;
                cursor: pointer;
                color: @primary-palette;

                &:hover {
                    color: lighten(@primary-palette, 10%);
                }
            }
        }
    }

    .current-user {
        .clearfix();
        border-bottom: 1px solid hsl(213,9%,14%);
        box-shadow: 0 1px 0 0 rgba(255,255,255,.08);
        padding: 20px;
        margin: 0 0 20px;
        height: @navbar-height;
        cursor: pointer;

        .avatar, .user-email {
            float: left;
        }

        .avatar {
            width: 30%;
            overflow: hidden;

            img {
                width: 45px;
                height: 45px;
                object-fit: cover;
                border-radius: 50%;
            }
        }

        .user-email {
            text-align: left;
            width: 70%;
            padding-top: 12px;
            font-size: 14px;
        }
    }

    .categories-list {
        font-size: 17px;
        text-align: left;
        margin-top: 30px;
        cursor: pointer;
        color: @left-col-color;

        > .category {
            padding: 10px 0 10px 25px;

            &:hover, &.draggable-over {
                background-color: lighten(@left-col-bg, 5%);
            }
        }

        .open {
            cursor: auto;
            border-right: 5px solid @primary-palette;
            background-color: lighten(@left-col-bg, 5%);
        }

        i {
            margin-right: 7px;
        }
    }

    .folders-list {
        margin-top: 25px;
        color: @left-col-color;
        font-size: 16px;
        text-align: left;
        max-height: ~"calc(100% - 80px - 200px)";
        overflow-x: auto;

        ul {
            padding: 0;

            > li {
                list-style: none;
                cursor: pointer;
                .transition(color 0.1s ease-in-out);
                max-width: 100%;
                overflow: hidden;
                white-space: nowrap;

                &.draggable-over {
                    > .folder-name {
                        background-color: lighten(@left-col-bg, 3%);
                        cursor: pointer;
                    }
                }

                > .folder-name {
                    padding: 7px 5px 7px 45px;
                    border-left: 5px solid transparent;

                    > .icons {
                        display: inline-block;
                        position: relative;

                        > .toggle-icon {
                            transition: all 0.2s ease-in-out;
                            font-size: 13px;
                            cursor: default;
                            position: absolute;
                            top: 3px;
                            right: 25px;

                            &:hover {
                                color: black;
                            }
                        }

                        > .icon-folder {
                            margin-right: 5px;
                        }
                    }

                    &:hover {
                        background-color: lighten(@left-col-bg, 3%);
                    }

                    &.open {
                        background-color: lighten(@left-col-bg, 6%);
                        border-color: @primary-palette;

                        > .toggle-icon {
                            transform: rotate(90deg);
                            margin-right: 0;
                        }
                    }
                }
            }

            &.sub-folders {
                display: none;

                &.subfolders-open {
                    display: block;
                }
            }
        }

        .heading {
            cursor: pointer;
            padding: 10px 0 10px 30px;

            > .toggle-icon {
                transition: all 0.2s ease-in-out;
            }

            > .folder-name {
                > .icon-folder {
                    margin-right: 5px;
                }

                &.open {
                    color: @primary-palette;

                    > .toggle-icon {
                        transform: rotate(90deg);
                    }
                }
            }

            &:hover {
                background-color: lighten(@left-col-bg, 3%);
            }
        }
    }

    &.open .dropdown-menu {
        display: block;
    }

    .ad-container {
        position: absolute;
        bottom: 80px;
        width: 100%;
        overflow: hidden;
    }
}