@modal-prefix-cls: ~"@{css-prefix}modal";
@confirm-prefix-cls: ~"@{css-prefix}modal-confirm";
@confirm-head-bg-color-dark: #293137;

.dark .@{modal-prefix-cls} {
    &-mask {
        .mask-dark;
    }

    &-content {
        background-color: #39434b;
        color: #c0ccda;
    }

    &-header {
        .content-header-dark;
        background-color: #293137;
    }

    &-close {
        .content-close-dark(1px, 31px);
    }

    &-footer {
        background: @modal-footer-bg-dark;
    }
}

.dark .@{confirm-prefix-cls} {
    &-head {
        &-title {
            color: @title-color-dark;
        }
        background-color: @confirm-head-bg-color-dark;
    }

    &-body{
        color: @text-color-dark;
    }

    &-footer {
        background-color: @confirm-head-bg-color-dark;
    }
}


.@{modal-prefix-cls} {
    width: auto;
    margin: 0 auto;
    position: relative;
    outline: none;
    top: 100px;

    &-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: #fff;
        border: 0;
        border-radius: 0;
        background-clip: padding-box;
    }

    &-header {
        .content-header;
    }

    &-close {
        .content-close(1px, 31px);
    }

    &-body {
        padding: 16px;
        font-size: 12px;
        line-height: 1.5;
    }

    &-footer {
        background: @modal-footer-bg;
        padding: 6px 18px;
        text-align: right;
        button + button {
            margin-left: 8px;
            margin-bottom: 0;
        }

        button {
            min-width: 58px;
            padding: 2px 7px;
            font-size: 12px;
            border-radius: 3px;
        }
    }
}

@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;
    margin: -20px;
    &-head {
        padding: 7px 16px;
        background-color: @primary-color;
        &-title {
            display: inline-block;
            font-size: @font-size-base;
            color: @title-color;
            font-weight: 700;
        }
    }

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

        &-render{
            margin: 0;
            padding: 0;
        }

        &-icon {
            font-size: 22px;
            position: absolute;
            top: 11px;
            left: 30px;

            &-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;
        padding: 7px 16px;
        background-color: @modal-footer-bg;
        button + button {
            margin-left: 8px;
            margin-bottom: 0;
        }
        button {
            min-width: 58px;
        }
    }
}