@import '../../style/variable.scss';
.x-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99998;
    overflow-y: auto;
    font-size: 14px;
}

.x-modal-confirm {
    z-index: 999998;
}

.x-modal-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, .5);
    opacity: 0;
    transition: all .2s;
}

.x-modal-content {
    color: #475669;
    position: absolute;
    background-color: #fff;
    box-shadow: 0 2px 6px 0 #B7B7B7;
    border-radius: 4px;
    left: 50%;
    top: 80px;
    transform: translate(-50%);
    opacity: 0;
    transition: all .4s;
    margin-bottom: 100px;
    .border{
        padding:20px;
        border-bottom: .5px solid #E3E6F0;
        border-top:.5px solid #E3E6F0;
    }
}

.x-modal-content.x-modal-sm {
    width: 360px;
}

.x-modal-content.x-modal-md {
    width: 490px;
}

.x-modal-content.x-modal-lg {
    width: 640px;
}

.x-modal-content.x-modal-sg {
    width: 960px;
}

.x-modal-header {
    line-height: 16px;
    display: flex;
    padding: 14px 20px;
    align-items: center;
    font-size: 16px;
    .title {
        flex: 1;
        width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .close-btn {
        display: block;
        cursor: pointer;
        // color: #B7BDD0;
    }
}

.x-modal-body {
    padding: 20px;
    font-size: 14px;
}

.x-modal-footer {
    text-align: right;
    padding: 20px;
    button {
        margin-left: 10px;
    }
}

.x-modal-dialog .x-modal-body {
    border-top: 1px solid $theme-border;
    border-bottom: 1px solid $theme-border;
}

.x-modal-confirm,.x-modal-alert{
    .x-modal-header{
        padding-bottom: 6px;
        margin-bottom: 0;
    }
    .x-modal-body{
        padding-top: 0;
        padding-bottom: 0;
    }
    .title{
        line-height: .2rem;
        margin-bottom: .1rem;
        font-size: .16rem;
        .xicon,.iconfont{
            margin-right: .08rem;
            font-size: .2rem;
        }
        .xicon-question{
            color: $theme-danger;
        }
        .xicon-alarm{
            color: $theme-warning;
        }
    }
    .content{
        font-size: .12rem;
        line-height: .12rem;
        margin-left: .28rem;
        color: #515666;
    }
}

//动画
.x-modal-fade {
    .x-modal-bg {
        opacity: 1;
    }
    .x-modal-content {
        opacity: 1;
        top: 100px;
    }
}

@media screen and (max-width: 980px) {
    .x-modal-content {
        width: auto !important;
        left: 20px;
        right: 20px;
        transform: translate(0, 0);
    }
}

@media screen and (max-width: 1200px) {
    .x-modal-content.x-modal-sg {
        width: auto !important;
        left: 20px;
        right: 20px;
        transform: translate(0, 0);
    }
}
