@import '../../../node_modules/nprogress/nprogress.css';
@import '../../../node_modules/bootstrap/dist/css/bootstrap.css';
@import '../../../node_modules/font-awesome/scss/font-awesome.scss';
@import 'base.scss';

$icons: (
    pdf: '//gtms04.alicdn.com/tps/i4/TB1YO6KHFXXXXc_XpXXkpw8JVXX-96-96.png',
    ai: '//gtms01.alicdn.com/tps/i1/TB1P5YNHFXXXXaqXpXXkpw8JVXX-96-96.png',
    audio: '//gtms02.alicdn.com/tps/i2/TB1kl2BHFXXXXc8XVXXkpw8JVXX-96-96.png',
    video: '//gtms03.alicdn.com/tps/i3/TB15AYQHFXXXXa2XXXXkpw8JVXX-96-96.png',
    image: '//gtms01.alicdn.com/tps/i1/TB18nHSHFXXXXamXXXXkpw8JVXX-96-96.png',
    doc: '//gtms03.alicdn.com/tps/i3/TB1DujFHFXXXXaVXVXXkpw8JVXX-96-96.png',
    psd: '//gtms03.alicdn.com/tps/i3/TB1.9HyHFXXXXbwaXXXkpw8JVXX-96-96.png',
    rar: '//gtms04.alicdn.com/tps/i4/TB1G9TKHFXXXXcxXpXXkpw8JVXX-96-96.png',
    txt: '//gtms01.alicdn.com/tps/i1/TB1uknUHFXXXXXdXXXXkpw8JVXX-96-96.png',
    xls: '//gtms01.alicdn.com/tps/i1/TB1gWfNHFXXXXaMXpXXkpw8JVXX-96-96.png',
    zip: '//gtms02.alicdn.com/tps/i2/TB1asPEHFXXXXbDXVXXkpw8JVXX-96-96.png',
    dir: '//img.alicdn.com/imgextra/i2/683489026/TB22_XgfpXXXXbtXpXXXXXXXXXX_!!683489026.png',
    default: '//gtms02.alicdn.com/tps/i2/TB17zbAHFXXXXXVaXXXkpw8JVXX-96-96.png',
    unknow: '//gtms02.alicdn.com/tps/i2/TB17zbAHFXXXXXVaXXXkpw8JVXX-96-96.png'
);

@each $icon, $url in $icons {
    .cp-icon-#{$icon} {
        background-position: center;
        background-image: url($url);
        background-size: cover;
    }
}

/* cp-header */
$headerHeight: 60px;
$headerBgColor: #123;
$color: #fff;
$logoUrl: '//gtms04.alicdn.com/tps/i4/TB1P3vNHFXXXXX.XpXX6kvSGVXX-166-40.png';
$fileItemHeight: 48px;
$menuItemHeight: 32px;

@mixin retina($width, $height) {
    width: $width / 2;
    height: $height / 2;
}

.cp-docs-nav {
    margin-bottom: 0;
    // background-color: #eee;
    border-bottom: 0;
    
    .container .navbar-header {
        margin-right: -15px;
        margin-left: -15px;

        .navbar-toggle {
            border-color: #fff;
        }
    }
    .container .navbar-collapse {
        margin-right: -15px;
        margin-left: -15px;
    }

    .navbar-nav>li>a {
        font-weight: 500;
        color: #563d7c;
    }
    .icon-bar {
        background-color: #563d7c;
    }
}

.cp-sidebar {
    position: absolute;
    top: $headerHeight;
    left: 0px;
    width: 200px;
    bottom: 0px;
    background-color: #123;
    color: $color;

    .cp-sidebar-list {
        width: 100%;
        display: flex;
        flex-direction: column;
        color: #fff;
        .cp-sidebar-item {
            width: 100;
            font-size: 20px;
            padding: 10px 20px;
            cursor: pointer;
            i.fa {
                font-size: 30px;
            }
            span {
                display: inline-block;
                vertical-align: middle;
                margin-top: -10px;
                margin-left: 10px;
            }
        }
        .active {
            background-color: #234;
        }
    }
}
.cp-preview {
    position: absolute;
    z-index: 9999;
    top: 50%;
    left: 50%;
    width: 80%;
    height: 80%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.5);

    .cp-preview-container {
        width: 100%;
        height: 100%;
        overflow: hidden;
        text-align: center;
        .cp-preview-image  {
            width: 100%;
            height: 100%;
            .cp-preview-image-info {
                position: absolute;
                left: 20px;
                top: 20px;
                color: #fff;
                font-weight: bolder;
                font-size: 16px;
            }
            .bgimg{
                // height: 100%;
                width: 100%;
                height: 100%;
                background-size: contain;
                background-repeat: no-repeat;
                background-position: center;


            }
        }
        
        .cp-preview-frame {
            width: 100%;
            height: 100%;

            iframe {
                width: 100%;
                height: 100%;
                background-color: #eee;
                border: none;
                border-radius: 5px;
                box-shadow: 0px 0px 5px #333333;
            }

            
        }
        .cp-preview-name {
            position: absolute;
            top: 5px;
            left: 50%;
            transform: translateX(-50%);
            color: #fff;
            text-align: center;
        }
        .pre-btn, .next-btn {
            color: #fff;
            font-size: 32px;
            position: absolute;
            z-index: 100;
            top: 50%;
            transform: translateY(-50%);

            i {
                color: #fff;
            }
        }
        .pre-btn {
            left: 20px;
        }
        .next-btn {
            right: 20px;
        }
    }
    .cp-preview-close {
        position: absolute;
        top: 10px;
        right: 10px;
        color: #fff;
        width: 30px;
        height: 30px;
        line-height: 30px;
        text-align: center;
        font-size: 24px;
        background-color: rgba(0, 0, 0, 0.6);
        padding: 10px;
        border-radius: 50%;
        cursor: pointer;

        .fa-times {
            position: absolute;
            top: 3px;
            left: 6px;
        }   
    }
}
.cp-content {
    position: absolute;
    top: $headerHeight;
    bottom: 0px;
    background-color: #fff;
    left: 200px;
    right: 0px;
    overflow-x: hidden;
    overflow-y: scroll;

    .cp-content-list {
        position: absolute;
        top: $fileItemHeight * 2;
        bottom: 0px;
        width: 100%;
        overflow-y: scroll;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        .cp-content-item {
            // flex: 1;
            display: flex;
            flex-direction: row;
            width: 100%;
            // padding: 5px;
            min-height: 58px;
            border-bottom: 1px solid #ccc;
        }
        .active {
            background-color: #f9f9f9;
        }
        .cp-content-file-wrap {
            flex: 1;
            display: flex;
            flex-direction: row;
            align-items: center;
            width: 100%;
            // height: 58px;
            color: #000;
            >a {
                align-items: center;
                text-overflow:ellipsis;
                overflow: hidden;
                text-align: center;
                // padding: 5px 0;
            }
            .cp-icon-default, .cp-icon {
                @include retina(96px, 96px);
                margin-left: 5px;
                // padding: 5px 0;
            }
            .cp-content-file-name {
                flex: 5;
                margin-left: 15px;
                text-align: left;
                
                input {
                    margin-top: 10px;
                }
            }
            .cp-content-file-size {
                flex: 1;
                margin-left: 15px;
            }
            .cp-content-file-time {
                flex: 3;
                margin-left: 5px;
            }
            .focus {
                border-color: rgba(82,168,236,.8);
                outline: 0;
                -webkit-box-shadow: 0 0 8px rgba(82,168,236,.6);
                box-shadow: 0 0 8px rgba(82,168,236,.6);
            }

        }
    }

    .cp-actionbar {
        margin-left: 5px;
        padding: 10px 0;
        width: 100%;
        background-color: #fff;
        position: absolute;
        top: 0;
        z-index: 2;

        
    }

    .cp-breadcrumb {
        position: absolute;
        top: $fileItemHeight;
        height: $fileItemHeight;
        width: 100%;
        margin-left: 5px;
        background-color: #eee;
        ul {
            height: 100%;
            width: 100%;
            margin: 0;
            padding: 0;
            display: flex;
            flex-direction: row;  
            // align-items: center;
            justify-content: flex-start;          
        }
        li {
            color: #337ab7;
            float: left;
            height: $fileItemHeight;
            line-height: $fileItemHeight;
            margin-left: 5px;
        }
        li.active {
            color: #aaa;
        }
    }

}

#search {
    // position: absolute;
    // font-size: 18px;
    // padding-top: 40px;
    // top: -30px;
    // right: 60px;
    // position: relative;
    // display: inline-block;
    position: absolute;
    top: 15px;
    right: 10px;
    label {
        position: absolute;
        left: 18px;
        top: 6px;
    }

    #search-input{
        padding-left: 43px;
        padding-right: 43px;
        border-radius: 23px;
    }

    #search-clear {
        text-decoration: none;
        position: absolute;
        right: 18px;
        top: 11px;
        color: #b3b3b3;
    }
}
.cp-alerts {
    position: absolute;
    top: 10px;
    right: 0;
    z-index: 99999;
    width: 300px;
}
.cp-progress {
    position: absolute;
    z-index: 99999;
    width: 400px;
    // height: 100px;
    // padding: 20px;
    border-radius: 10px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    // background-color: rgba(0, 0, 0, .4);

    .progress {
        margin-top: 45px;
    }
}
.cp-modal {
    background-color: rgba(0, 0, 0, .4);
    width: 100%;
    height: 100%;
    position: absolute;
    .cp-modal-container {
        height: 100%;
    }
    .modal-dialog {
        top: 50%;
        transform: translateY(-50%);
    }
    .cp-breadcrumb {
        position: relative;
        top: 0;
    }
    .cp-content-list {
        position: relative;
        top: 0;
        flex-direction: row;
        flex-wrap: wrap;
        min-height: 200px;
        .cp-content-file-wrap {
            width: 100px;
            text-align: center;
            flex-direction: column;
            i.fa {
                font-size: 64px;
            }
            .cp-content-file-name {
                height: 20px;
                line-height: 20px;
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
            }
        }
    }
}

/* ng-repeat animation */

.animate-repeat.ng-move,
.animate-repeat.ng-enter,
.animate-repeat.ng-leave {
    -webkit-transition:all linear 0.5s;
    transition:all linear 0.5s;
}

.animate-repeat.ng-leave.ng-leave-active,
.animate-repeat.ng-move,
.animate-repeat.ng-enter {
    opacity: 0.3;
    // max-height:0;
    transform: translateX(-100%);
}

.animate-repeat.ng-leave,
.animate-repeat.ng-move.ng-move-active,
.animate-repeat.ng-enter.ng-enter-active {
    opacity: 1;
    // max-height:40px;
    transform: translateX(0%);
}

/**
 * Stagger Leave (hide) animation
 */
.animate-repeat.ng-leave-stagger {
    /* this will have a 100ms delay between each successive leave animation */
    -webkit-transition-delay: 0.2s;
    transition-delay: 0.2s;

    /* in case the stagger doesn't work then these two values
     must be set to 0 to avoid an accidental CSS inheritance */
    -webkit-transition-duration: 0s;
    transition-duration: 0s;
}

/**
 * Stagger ENTER ANIMATION
 */
.animate-repeat.ng-enter-stagger {
    /* this will have a 100ms delay between each successive enter animation */
    -webkit-transition-delay: 0.2s;
    transition-delay: 0.2s;

    /* in case the stagger doesn't work then these two values
     must be set to 0 to avoid an accidental CSS inheritance */
    -webkit-transition-duration: 0s;
    transition-duration: 0s;
}