/**
 * MOYE
 * Copyright 2014 Baidu Inc. All rights reserved.
 *
 * @file 图片上传
 * @author leon <leonlu@outlook.com>
 */

@import './variable.less';
@import './dep.less';

.@{moye-prefix}-picuploader {
    &picker {
        display: inline-block;
        *display:inline;
        *zoom:1;
        position: relative;
        width: 70px;
        margin-right: 15px;
        overflow: hidden;
        vertical-align: top;
    }

    &pic {
        border:#E1E1E1 1px solid;
        height: 68px;
        overflow: hidden;
        em {
            display: block;
            height: 44px;
            overflow: hidden;
            margin: 14px 0 0 4px;
            color: #FFF;
            font-size: 12px;
            font-style: normal;
            word-break: break-all;
        }
        img {
            width: 68px;
            height: 68px;
        }
    }

    &pic:hover {
        background: #666;
    }

    &close {
        width: 14px;
        height: 14px;
        position: absolute;
        top: 1px;
        right: 1px;
        color: #FFF;
        font: bold 14px/14px '宋体';
        cursor: pointer;
        display: none;
    }

    &close:hover {
        background: #CCC;
        background: rgba(0,0,0, 0.5);
    }

    &wrapper {
        position: absolute;
        width: 70px;
        height: 70px;
        top: 0;
    }

    &wrapper:hover {
        background: #666;
    }

    &file {
        width: 70px;
        height: 70px;
        opacity: 0;
        filter: alpha(opacity=0);
        cursor: pointer;
    }

    &title {
        text-align: center;
        color: #647DD1;
        font-size: 12px;
        line-height: 26px;
        height: 26px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

}

.@{moye-prefix}-picuploader-picked {

    .@{moye-prefix}-picuploader-{

        &pic {
            border:#1366FF 1px solid;
            background: #666;
        }

        &close {
            display: block;
        }

        &wrapper {
            top: -100em;
        }
    }
}

.@{moye-prefix}-picuploader-error {
    background: #FFB4AD;
}

.@{moye-prefix}-picuploader-disabled {

    .@{moye-prefix}-picuploader-cur {
        display: none;
    }

    .@{moye-prefix}-picuploader-close {
        display: none;
    }
}
