@modal-prefix-cls: ~"@{css-prefix}modal";
@confirm-prefix-cls: ~"@{css-prefix}modal-confirm";

.@{modal-prefix-cls} {
    width: auto;
    margin: 0 auto;
    position: relative;
    outline: none;
    top: 100px;
    // border: 1px solid @border-color-primary;
    // background-color: @collapse-header-color;
    &-hidden {
        display: none !important;
    }

    &-wrap {
        position: fixed;
        overflow: auto;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: @zindex-modal;
        -webkit-overflow-scrolling: touch;
        outline: 0;
    }

    &-wrap * {
        box-sizing: border-box;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    }

    &-mask {
        .mask;
    }

    &-content {
        position: relative;
        background-color: @body-background;
        border: 0;
        border-radius: @border-radius-base;
        background-clip: padding-box;
        border: 1px solid @border-color-primary;
        overflow: hidden;
    }

    &-header {
        background-color: @collapse-header-color;
        text-align: left;
        padding: 0px 20px;
        height: 50px;
        line-height: 50px;
        &-inner{
            font-weight: normal;
            line-height: 50px;
            font-size: @font-size-base;
        }
        border-bottom: 1px solid @border-color-primary;
    }
    .modal-close{
        text-align: right;
        width: 32px;
        height: 32px;
        position:absolute;
        top: 10px;
        right: 20px;
        z-index:1;
    }
    &-close {
        display: inline-block;
        color: #000;
        .ivu-icon{
            font-size: 30px;
            &:hover{
                color: #c5c4c4;
            }
        }
    }

    &-body {
        font-size: 12px;
        line-height: 1.5;
        background-color: @body-background;
        padding: 20px;
    }

    &-footer {
        text-align: right;
        line-height: 60px;
        padding-right:20px;
        padding-left:20px;
        button + button {
            margin-left: 8px;
            margin-bottom: 0;
        }
        border-top: 1px solid @border-color-primary;
    }
}

@media (max-width: 768px) {
    .@{modal-prefix-cls} {
        width: auto !important;
        margin: 10px;
    }
    .vertical-center-modal {
        .@{modal-prefix-cls} {
            flex: 1;
        }
    }
}

.@{confirm-prefix-cls} {
    padding: 0 4px;
    &-head {
        &-title {
            display: inline-block;
            font-size: @font-size-base;
            color: @title-color;
            font-weight: 700;
        }
    }

    &-body{
        margin-top: 6px;
        padding-left: 48px;
        padding-top: 18px;
        font-size: @font-size-small;
        color: @text-color;
        position: relative;

        &-icon {
            font-size: 36px;
            position: absolute;
            top: 0;
            left: 0;

            &-info {
                color: @primary-color;
            }
            &-success {
                color: @success-color;
            }
            &-warning {
                color: @warning-color;
            }
            &-error {
                color: @error-color;
            }
            &-confirm {
                color: @warning-color;
            }
        }
    }

    &-footer{
        margin-top: 40px;
        text-align: right;

        button + button {
            margin-left: 8px;
            margin-bottom: 0;
        }
    }
}