@import "mixins/mixins";
@import "common/var";

.mpd-design {
    display: flex;
    flex-direction: column;
    background-color: #e1fbce;
    position: relative;
}
// 头部
.mpd-design .mpd-header {
    user-select: none;
    line-height: 40px;
    height: 40px;
    font-size: 14px;
    display: flex;
    &--affix {
        border-bottom: solid 1px #e6e6e6;
        background-color: #ffffff;
        &.pro-affix--fixed {
            box-shadow: $--box-shadow-light;
            & + .mpd-workbench {
                padding-top: 30px;
            }
        }
    }
    box-sizing: border-box;
    .nav-action{
        cursor: pointer;
        padding: 5px;
        display: inline;
        &:hover, &.active {
            background-color: #ecf5ff
        }
    }

    .nav-center{
        flex: 1 1 auto;
        text-align: center;
    }
}

// 工作区
.mpd-design .mpd-workbench {
    user-select: none;
    min-height: 10000px;
    box-sizing: border-box;
    margin: 10px 80px;
    border-left: 2px dashed #5b6f99;
    background: #fff;
    border-right: 2px dashed #bfc1c5
}

// 资源库
.mpd-design .mpd-resources {
    user-select: none;
    position: fixed;
    min-width: 400px;
    max-height: 650px;
    top: 50px;
    left: 50px;
    background: #fff;
    min-height: 600px;
    box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.12);
    overflow: auto;
    z-index: 100;
    &::-webkit-scrollbar {
        width: 10px;
        height: 10px;
        background: #fafafa; 
        padding-right: 2px;
    }

    &::-webkit-scrollbar-thumb {
        background: #8d8d88;
        border-radius: 10px;
    }

    .widget-category{
        padding: 10px;
        font-size: 13px;
        color: #303133;
        border-bottom: 1px solid #ebeef5;
    }
    .widget-body {
        padding: 10px;
        font-size: 13px;
        display: flex;
        flex-wrap: wrap;
        .widget-item-bg {
            background-color: #F2F6FC;
            padding: 8px;
            box-sizing: border-box;

            & + .widget-item-bg{
                margin-top: 5px;
            }
        }
    }
    .pro-layout-formitem{
        margin-bottom: 0px;
    }
}

@for $i from 0 through 10 {
  .w-#{$i} {
    width: (1 / 10 * $i * 100) * 1%;
    box-sizing: border-box;
  }
}

.mpd-active, .mpd-focus{
    outline: #409eff dashed 1px;
    outline-offset: 4px;
}

.mpd-dragable {
    cursor: move;
    outline: #409eff dashed 1px;
    outline-offset: 0px;
}

.mpd-dragable-source {
    position: relative;
    .drag-layer {
        position: absolute;
        left: 0px;
        top: 0px;
        width: 100%;
        height: 100%;
        z-index: 10;
        background-color: transparent;

        .title {
            position: absolute;
            left: 1px;
            top: 1px;
            background-color: #483d8b;
            color: #fff;
            font-size: 9px;
            padding: 0px 6px;
        }
    }
}

.mpd-dragable-target {
    font-size: inherit;
}

.mpd-help-tigger {
    position: fixed;
    right: 0px;
    bottom: 100px;
    width: 40px;
    height: 40px;
    background-color: rgb(242, 245, 246);
    box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.12);
    text-align: center;
    line-height: 40px;
    color: rgb(25, 137, 250);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
}

.mpd-dragable-source--shadow{
    position: fixed;
    .drag-layer {
        display: none;
    }
}
.mdp-drop-placeholder {
    min-width: 3px;
    min-height: 3px;
    background-color: red;
}

.editing .mpd-dropable-source{
    box-sizing: border-box;
    border: 1px solid #f6f2f2;
    margin: 4px;
    min-width: 28px;
    min-height: 28px;
}