.component_thing{
    clear: both;

    &:hover .box, .highlight.box{
        transition: 0.2s ease-out box-shadow;
        box-shadow: rgba(158, 163, 172, 0.3) 3px 3px 10px;
        background: var(--super-light);
        border-color: var(--super-light);
    }
    &:hover .box:not(.loading){
        .component_datetime{display: none;}
        .component_action{display: block;}
    }
    .component_action{display: none;}


    .file-is-hover{
        background: var(--emphasis-primary);
    }
    .file-is-dragging{
        opacity: 0.15;
    }


    .file-details{
        padding: 0 5px;
        line-height: 22px;
        white-space: nowrap;
        > span{
            display: inline-block;
            width: calc(100% - 130px);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            vertical-align: bottom;
            color: inherit;
        }
    }
    form{
        display: inline-block;
        input{
            font-size: 1em;
            border-width: 0px;
            padding: 0 2px 0 2px;
            background: inherit;
            border-bottom: 2px solid var(--emphasis-primary);
            color: var(--color);
        }
    }

    .component_icon{
        width: 25px;
        height: 25px;
    }

    .component_filesize{
        span{
            color: var(--light);
            font-size: 0.85em;
        }
    }

    .component_datetime{
        float: right;
        color: var(--light);
        line-height: 25px;
        margin: 0 -10px;
        padding: 0 10px;
        position: relative;
    }

    .component_action{
        float: right;
        color: #6f6f6f;
        line-height: 25px;
        margin: 0 -10px;
        padding: 0 10px;
        position: relative;
        .component_icon{
            padding: 1px 0;
            box-sizing: border-box;
        }
    }


    .selectionOverlay{ display: none; }
    &.selected .selectionOverlay{
        display: block;
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--primary);
        z-index: 2;
        opacity: 0.3;
    }
}


/* GRID & LIST VIEW */
.list > span{
    display: flex;
    flex-wrap: wrap;
    > .component_thing{
        width: 100%;
        .box{margin: 0px 0 2px 0;}
    }

    // GRID VIEW
    > .component_thing.view-grid{
        width: 25%; .box{ height: 160px;}
        @media (max-width: 769px){width: 33.33%; .box{height: 200px} }
        @media (max-width: 670px){.box{height: 170px}}
        @media (max-width: 550px){width: 50%; .box{height: 200px} }
        @media (max-width: 480px){.box{height: 170px}}
        @media (max-width: 400px){.box{height: 140px; .info_extension{font-size: 0.8em!important; padding: 3px 10px;}}}
        @media (max-width: 340px){.box{height: 130px}}
        text-align: center;

        .box{
            margin: 2px;
            padding: 0;
            position: relative;
            border: 3px solid transparent;
            border-width: 0;
            box-sizing: border-box;

            > span > img{
                padding: 0;
                margin: 0;
                display: block;
            }
            > span > img.component_icon{
                padding: 30px;
                box-sizing: border-box;
                width: 100%;
                height: 100%;
                object-fit: contain;
                margin: 0 auto;
                z-index: 0;
            }
            > span > img.thumbnail{
                width: 100%;
                height: 100%;
                object-fit: cover;
                object-position: 50% 50%;
                background: var(--dark);
                z-index: 0;
            }
            .info_extension{
                position: absolute;
                top: 45%;
                text-align: right;
                left: 0; right: 20%;
                margin: 0 auto;
                text-transform: uppercase;
                font-size: 0.95em;
                text-shadow: 0px 0px 2px rgba(0,0,0,0.2);
                span{
                    background: var(--color);
                    color: var(--bg-color);
                    border-radius: 4px;
                    padding: 3px 10px;
                    display: inline-block;
                    text-align: center;
                    min-width: 20px;
                    max-width: 65px;
                    white-space: nowrap;
                    overflow: hidden;
                    text-overflow: ellipsis;
                }
            }
            .component_filename{
                letter-spacing: -0.5px;
                z-index: 2;
                position: absolute;
                bottom: 2px;
                left: 2px;
                right: 2px;
                border-radius: 2px;
                padding: 3px 0px;
                .file-details{
                    width: calc(100% - 10px);
                    display: block;
                    > span{
                        width: 100%;
                        form input{
                            letter-spacing: -0.5px;
                            text-align: center;
                            width: 100%;
                            padding: 0;
                        }
                    }
                }
            }
            .image_layer{
                position: absolute;
                top: 0;
                bottom: 0;
                left: 0;
                right: 0;
                z-index: 1;
                background: rgba(0,0,0,0);
                transition: 0.2s ease-out background;
            }
            .component_filesize, .component_datetime{ display: none; }
            .component_action{
                opacity: 0;
                transform: translateX(5px);
                transition: 0.15s ease-out all;
                z-index: 2;
                display: block;
                position: absolute;
                top: 5px;
                right: 5px;
                border-radius: 5px;
                margin-right: 0px;
                padding: 0px;
            }
            img.thumbnail{transition: 0.2s ease-out transform;}
        }
        &.not-selected .box{
            &:hover{
                .component_action{
                    transition-delay: 0.1s;
                    opacity: 1;
                    transform: translateX(0);
                }
                img.thumbnail{
                    transform: scale(0.6);
                }
                .image_layer{
                    background: rgba(242, 242, 242, 0.7);
                }
            }
            &.preview{
                &:hover{
                    .component_filename{
                        opacity: 1;
                    }
                }
                .component_filename{
                    transition: 0.2s ease-out opacity;
                    opacity: 0;
                }
            }
        }
        &.selected .box{
            img.thumbnail{
                transform: scale(0.6);
            }
        }
    }
}
