
@import "../../scss/theme/config.scss";
@import "../../scss/sprite-sheets/icons.scss";

.cd-mconfig-wrap {
    width: 310px;
    font-family: 'Microsoft YaHei', 'PingFang SC', 'SimSun', 'Hiragino Sans GB', Arial, sans-serif;

    .d-tab .d-tabs-default {
        margin: 20px 0 10px 0;
    }
}

.cd-pc-form {
    width: 635px;
    transition: all .3s ease-out;
    .cd-data-content {
        width: 310px;
        float: left;
    }
    .cd-temp-content {
        width: 310px;
        float: right;
    }
}
.cd-m-form{
    .cd-data-content{
        .cd-normal-line{
            display:flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 21px;
            padding-bottom: 10px;
            .cd-info-wrap{
                display: flex;
                align-items: center;
            }
            .cd-choose-module-info{
                display: flex;
                max-width: 160px;
                .name{
                    max-basis: 89px;
                    white-space: nowrap;
                    overflow: hidden;
                    text-overflow: ellipsis;
                }
            }
            h3{
                margin: 0;
            }
            a{
                font-size: 14px;
                font-family: PingFangSC;
                font-weight: normal;
                color: rgba(34,153,255,1);
                cursor: pointer;
            }
            .cd-delete-module{
                margin-left: 4px;
            }
        }
        h3{
            font-size: 16px;
            font-family: PingFangSC;
            font-weight: 600;
            color: rgba(51,51,51,1);
            margin: 20px 0 10px 0;
        }
        .cd-relation-page{
            font-size: 12px;
            font-family: PingFangSC;
            color: #999999;
            margin-top: -14px;
            padding-left: 1px;
            a{
               color: #2299FF;
                margin-left: 15px;
            }
        }
    }
}

.cd-form-container,.cd-container-config {
    @include clearFix();
    transition: all .3s ease-out;

    .cd-form-group {
        margin: 20px 0;

        //&:not(:last-child) {
        //    margin: 0 0 20px 0;
        //}

        .cd-radio-icon{
            width: 12px;
            height: 12px;
            &::after{
                top: 4px;
                left: 4px;
            }
        }

        .cd-radio-label{
            font-size: 12px;
        }

        .cd-title {
            margin-bottom: 10px;
            color: $colorBase;
            font-size: 12px;
            font-weight: bolder;
            display: inline-block;
            position: relative;
            &.cd-required:after {
                content: '(必填)';
                color: $colorNormal;
                font-weight: normal;
                margin-left: 5px;
                font-size: 12px;
            }
            &.cd-not-required:after {
                content: '(非必填)';
                color: $colorNormal;
                font-weight: normal;
                margin-left: 5px;
                font-size: 12px;
            }
        }

        .cd-invest-data{
            position: absolute;
            right: -245px;
            top: 0;
            font-size: 12px;
            color: #2299FF;
        }
        .cd-tips {
            font-size: 12px;
            color: #999;
            margin-bottom: 10px;
            line-height: 16px;
        }
        .cd-body {
            .cd-style-editor-preview {
                text-align: center;
                padding: 5px;
                background-color: #F2F2F2;
                margin: 10px 0;
                height: 140px;
                line-height: 140px;
                display: flex;
                align-items: center;
                justify-content: center;
                img {
                    max-height: 140px;
                    max-width: 300px;
                }
            }
            .cd-style-container {
                .cd-temp-title {
                    line-height: 1.4;
                    span {
                        display: inline-block;
                        text-overflow: ellipsis;
                        overflow: hidden;
                        white-space: nowrap;
                        width: 170px;
                        vertical-align: top;
                    }
                    a {
                        color: #29f;
                        vertical-align: top;
                    }
                }
            }
            .cd-style-editor {
                display: flex;
                align-items: center;
                justify-content: center;
                background: #EFEFEF;
                border-radius: 2px;
                width: 100%;
                color: $colorBase;
                text-align: center;
                height: 40px;
                line-height: 40px;
                .cd-icons-brush {
                    margin: 0 10px;
                }
                &.cd-disabled{
                    color: #c8c8c8;
                    cursor: no-drop;
                }
            }
            .cd-form-tips {
                color: #999;
                font-size: 12px;
                margin-top: 10px;
            }
        }
        .cd-moodule-name-input{
            border: 1px solid rgba(225,225,232,1);
            border-radius: 2px;
            height: 32px;
            box-sizing: border-box;
            padding-left: 10px;
        }
        .cd-new-seckill-doc {
            position: relative;
            padding: 9px 10px 9px 10px;
            margin: 15px 0 -5px;
            background-color: #ffffcc;
            font-size: 12px;
            color: #666;
            line-height: 16px;
        }
    }
    .cd-image-panel {
        height: 110px;
        line-height: 110px;
        width: 100%;
        text-align: center;
        background-color: #f2f2f2;
        background-repeat: no-repeat;
        //background-size: 100% 100%;
        //TODO:图片等比缩放
        background-size: contain;
        background-position: center;
        vertical-align: middle;
        position: relative;
        .cd-image-panel-mask {
            position: absolute;
            top: 0;
            right: 0;
            bottom: 0;
            left: 0;
            background-color: rgba(0, 0, 0, 0.4);
            display: none;
            z-index: 1;
        }
        &.cd-hasimg:hover {
            .cd-img-size {
                display: inline-block;
            }
            .cd-icons-link-del-white{
                display: inline-block;
            }
        }
        .cd-img-size {
            background: rgba(0, 0, 0, 0.40);
            border-radius: 2px;
            position: absolute;
            top: 0;
            left: 0;
            height: 30px;
            line-height: 30px;
            color: #FFFFFF;
            padding: 0 20px;
            font-size: 12px;
            z-index: 2;
            display: none;
        }
        .cd-icons-link-del-white{
            position: absolute;
            top: 10px;
            right: 10px;
            cursor: pointer;
            z-index: 2;
            display: none;
        }
        &.cd-show-mask {
            &:hover {
                .cd-image-panel-mask {
                    display: block;
                }
                a {
                    display: inline-block;
                }
            }
            a {
                display: none;
            }
        }
        a {
            @include blackBorderBtn(14px, 100px, 36px, 10px);

            width: 100px;
            margin: 5px;
            padding: unset !important;
            display: inline-block;
            position: relative;
            z-index: 2;
        }
        &.cd-has-make-image{
            a{
                width: 85px;
                margin: 3px;
            }
            a:first-of-type:after{
                position: absolute;
                content: 'NEW';
                width: 30px;
                line-height: 15px;
                background-color: $colorSelectTab;
                color: $colorWhite;
                text-align: center;
                font-size: 12px;
                font-weight: bolder;
                letter-spacing: -1px;
                top: -8px;
                right: -8px;

                //@extend .cd-icons;
                //@extend .cd-icons-new_icon;
            }
        }
        .cd-hide{
            display: none;
        }
    }

    .cd-image-wap {
        @include clearFix();
        padding-bottom: 10px;
        &.cd-hasimg:hover {
            .cd-img-size {
                display: inline-block;
            }
        }
        .cd-img-size {
            background: rgba(0, 0, 0, 0.40);
            border-radius: 2px;
            position: absolute;
            top: 0;
            left: 0;
            height: 30px;
            line-height: 30px;
            color: #FFFFFF;
            padding: 0 20px;
            display: none;
            z-index: 2;
            font-size: 12px;
        }
        .cd-preview {
            background: #F7F7F7;
            width: 200px;
            height: 78px;
            line-height: 78px;
            float: left;
            text-align: center;
            position: relative;
            img {
                max-width: 100%;
                max-height: 100%;
                vertical-align: middle;
                position: relative;
                z-index: 1;
            }
            .cd-imgholder {
                @extend .cd-icons;
                @extend .cd-icons-imgholder;
                position: absolute;
                top: 23px;
                left: 81px;
            }
        }
        .cd-operate {
            width: 80px;
            float: right;
            a {
                @include smallBlackBorderBtn(78px, 23px, 9px);
                margin-top: 9px;
                white-space: nowrap;
            }
        }
        &.cd-hasimg {
            .cd-preview {
                background: url(//img14.360buyimg.com/cms/jfs/t18196/333/1294142974/807/f84be69/5ac2e880Nca56064a.png) repeat;
                .cd-imgholder {
                    display: none;
                }
            }
        }
    }

    .cd-full-btn {
        width: 100%;
        text-align: center;
        line-height: 35px;
        height: 35px;
        color: #333;
        display: inline-block;
        background-color: #efefef;
        &.cd-disabled{
            color: #c8c8c8;
            cursor: no-drop;
        }
    }
    .cd-check-box .cd-check-label {
        max-width: 290px;
    }

    .cd-dt-tip{
        overflow: hidden;
        padding-bottom: 10px;
        font-size: 12px;
        color: #999;
        .cd-left-part{
            float: left;
        }
        .cd-right-part{
            float: right;
            span{
                padding: 0 10px;
                color: #29f;
            }
        }
        i{
            display: inline-block;
            width: 12px;
            height: 12px;
            margin-right: 3px;
            vertical-align: bottom;
        }
        .cd-status-close,.cd-status-open{
            display: none;
        }
        &.policy-has-close{
            .cd-status-open{
                display: none;
            }
            .cd-status-close{
                display: inline;
            }
            i{
                background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAAAXNSR0IArs4c6QAAASdJREFUKBWFUcFqwkAQdTdCayLm0kv/woM/4MmT1xwkohhMiF+iZ0tDVgJBcso3ePXW/kQvPbeYU0nS92QXpCAdmMzOvLeTmbeic2Npms6EEOu2bXsoP8IbeB6G4QvqPHcEPyA+oZCA+I40iaLoS9ddxBg+hi9R/+wSINmyrF0QBG/MlVJrRnQ+IGyzLDvVda1wnkqOwc6GTOJfIwbOGY3mkjM7jvNqSGVZ9gE+IP8xNR0TxJXEx/Z9/9uAnudd0OSCfGlqjHovW+put9jdM7n8Q1MUxeAuSwPYlYo1vJBXVbX57wLwWEp5lHwUJGNIN+IlLs0Iy6HKkAdi2Gviuu7ePNwzCorSUTEjgh4jJhnYAot/XC+wC406I6zgthaj4RjsDPVqcn4BhbZ9RmdvegoAAAAASUVORK5CYII=);
            }
        }
        &.policy-has-open{
            .cd-status-open{
                display: inline;
            }
            .cd-status-close{
                display: none;
            }
            i{
                background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAAAXNSR0IArs4c6QAAAUFJREFUKBWFkbFKA0EQhmen8O72PCXBFL6FhYWVcEqwyRMIYhBS6AukzTsoBqyC7ZWWMRwIgoW+hI1FIIcmXPTkdp3/dCVYxIW73Zn/n2H2W0ULKxwGh0bZjrIUkLK+SMYSD7r73Yue6hlYFX5RGm2UZdFXlp9WyO9nzewV+dqwtl7Q+6klG5PH7Xw3f0Ge9K2X6FRvVwHikd/B9xuLJp4bxIwx0DmP80dn+LtDE899OPKPGDN7UXDpTI20sSojeDLrp8thx6hyoRMWQU92Jm9OHMfjGZOaGUNtl8OOe8HLJN0WheVn60kBmfpDfW258ZsYvAzOH9P52X8FFV7F14xHAWeHFZdGMTMNwjTcwhmawDlo7bXOq4fTd3qTivIK6EDMQXAPB7Nv1XHWnD9XBeiCBc5ABxo/MIyVMdA5UUkJzxfCHYI6kRVVWwAAAABJRU5ErkJggg==);
            }
        }
    }
    .cd-dt-btn{
        a{
            display: block;
            background: #efefef;
            height: 36px;
            line-height: 36px;
            border-radius: 2px;
            text-align: center;
            font-size: 14px;
            color: #000;
            &::before{
                display: inline-block;
                content: "+";
                font-size: 16px;
                margin-right: 5px;
            }
        }
    }
}
