/*
|--------------------------------------------------------------------------
| File upload
|--------------------------------------------------------------------------
|
*/

.fileupload {
    position: relative;
    text-align: center;
    color: #ccc;
    cursor: pointer;

    img {
        position: relative;
        z-index: 10;        
        width: 100%;
    }

    .placeholders {
        display: none;
        position: absolute;
        top: 0;
        z-index: 1;
        width: 100%;

        .error {
            display: none;
            color: #ff4500;
        }

        .glyphicon {
            position: relative;
        }

        .glyphicon-cloud-upload {
            top: 74px;
            font-size: 48px;
        }

        .glyphicon-exclamation-sign {
            top: 70px;
            font-size: 55px;
        }
    }

    &.empty {
        min-height: 200px;

        .placeholders {
            display: block;
        }
    }

    &.with-error {

        .placeholders {

            .idle {
                display: none;
            }

            .error {
                display: block;
            }
        }
    }

    &.dragover {
        background-color: LightYellow;
        color: #000;
    }

    .progress {
        display: none;
        position: relative;
        z-index: 1;
        margin: 85px 10px 0;
        
        .progress-bar {
            width: 0%;
            transition: none;
        }
    }
}

.fileupload-group {

    .fileupload-comments {
        top: 2px;
        color: #aaa;
        outline: 0;
        text-decoration: none;
    }

    input {
        display: none;
    }
}

.popover-content {
    
    ul {
        margin: 0;
        padding-left: 15px;
    }
}

/*
|--------------------------------------------------------------------------
| Media modal
|--------------------------------------------------------------------------
|
*/

.current-media {
    margin-top: 20px;

    .media-item {
        position: relative;
        margin-bottom: 10px;
        padding: 3px;
        border: 1px solid #e5e5e5;

        img {
            max-height: 350px;
            max-width: 100%;
            transition: opacity 0.2s ease-in-out;
        }

        .actions {
            position: absolute;
            top: 0;
            margin: 15px;
            padding: 15px;
            background: rgba(255,255,255,0.9);
            border-radius: 5px;
            opacity: 0;
            filter: ~"alpha(opacity=0)";
            transition: opacity 0.2s ease-in-out;
        }

        &:hover {

            img {
                opacity: 0.5;
                filter: ~"alpha(opacity=50)";
            }

            .actions {
                opacity: 1;
                filter: ~"alpha(opacity=100)";
            }
        }
    }
}

.drag-and-drop {
    height: 400px;
    margin-top: 20px;
    padding-top: 30px;
    border: 3px dashed #e5e5e5;
    border-radius: 20px;
    text-align: center;

    button {
        display: block;
        margin: 10px auto;
    }

    .drop-text {
        display: none;
    }

    .drag-text {
        display: inline-block;
    }

    &.dragover {
        border-style: solid;
        background-color: LightYellow;
        color: #000;
    
        .drop-text {
            display: inline-block;
        }

        .drag-text {
            display: none;
        }
    }
}

.media-save-meta {
    .glyphicon-refresh {
        -webkit-animation:spin 4s linear infinite;
        -moz-animation:spin 4s linear infinite;
        animation:spin 4s linear infinite;
    }
}

@-moz-keyframes spin { 100% { -moz-transform: rotate(360deg); } }
@-webkit-keyframes spin { 100% { -webkit-transform: rotate(360deg); } }
@keyframes spin { 100% { -webkit-transform: rotate(360deg); transform:rotate(360deg); } }