esui-uploader {
    display: block;
}

.fill-all () {
    // 占满空间
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
}

.ui-uploader {
    position: relative;
    display: inline-block;
    *display: inline;
    zoom: 1;
    margin: 0; // 重置IE6-7
    font-size: 12px;
    overflow: hidden;

    .ui-uploader-button {
        .fill-all ();
        background-image: -webkit-linear-gradient(top, #fff, #f6f6f6);
        background-image: -moz-linear-gradient(top, #fff, #f6f6f6);
        background-image: -ms-linear-gradient(top, #fff, #f6f6f6);
        background-image: -o-linear-gradient(top, #fff, #f6f6f6);
        background-image: linear-gradient(top, #fff, #f6f6f6);
        background-color: #fff;
        border: 1px solid #CCC;
        border-radius: 3px;
        vertical-align: top;
        text-align: center;
        display: block;
    }

    input {
        opacity: 0;
        filter: alpha(opacity=0);
        .fill-all ();
        z-index: 1;
        border: 0;
        padding: 0;
        margin: 0;
        width: 100px;
        font-size: 50px;
    }

    iframe {
        display: none;
    }

    .ui-uploader-indicator {
        // 这个要用来显示进度，不能用left + right的形式撑满
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: none;
        text-align: center;
    }
}

.ui-uploader-busy {
    input,
    .ui-uploader-button {
        display: none;
    }

    .ui-uploader-indicator {
        display: block;

        span {
            width: 100%;
        }
    }
}

.ui-uploader-complete {
    .ui-uploader-indicator {
        display: block;
        background-color: #3892e3;
    }
}

// 装了`ModernUpload`扩展以后的效果
.ui-uploader-droppable,
.ui-uploader-accepting {

    .ui-uploader-button {
        display: none;
    }

    .ui-uploader-indicator {
        display: table;

        span {
            display: table-cell;
            vertical-align: middle;
            line-height: normal !important;
            border: 2px dashed green;
            border-radius: 6px;
        }
    }
}

.ui-uploader-progress {
    .ui-uploader-indicator {
        background-image: none;
        background-color: #3892e3;

        span {
            display: none;
        }
    }
}
