@import '../../common/styles/theme.less';


.sp-modal {
    width: 30%;
    // height: 250px;
    background-color: var(--color-white);
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    overflow: auto;
    outline: 0;
    margin: auto;
    padding: 20px;
    box-sizing: border-box;
    height: fit-content;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgb(0 0 0 / 30%);

    &-header {
        width: 100%;
        padding-bottom: 10px;
        box-sizing: border-box;
        display: flex;
        justify-content: space-between;
        align-items: center;

        >.sp-icon {
            color: var(--color-text-secondary);
            cursor: pointer;
            font-weight: bold;

            &:hover {
                color: var(--color-primary);
            }
        }
    }

    &-footer-active {
        padding-top: 10px;
        box-sizing: border-box;
        display: flex;
        width: 100%;
        justify-content: flex-end;
        align-items: center;
        >.sp-button:last-child {
            margin-left: 10px;
        }
    }

    &-mock {
        position: fixed;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        opacity: .5;
        background: #000;
        &-enter-active{
            animation: mock-in .31s;
        }
        &-leave-active{
            animation: mock-out .31s;
        }
    }
    &-enter-active{
        animation: dialog-fade-in .31s;
    }
    &-leave-active{
        animation: dialog-fade-out .31s;
    }

}

@keyframes mock-in {
    0% {
        opacity: 0
    }
}

@keyframes mock-out {
    to {
        opacity: 0
    }
}

@keyframes dialog-fade-in {
    0% {
        transform: translate3d(0, -20px, 0);
        opacity: 0
    }

    to {
        transform: translateZ(0);
        opacity: 1
    }
}

@keyframes dialog-fade-out {
    0% {
        transform: translateZ(0);
        opacity: 1
    }

    to {
        transform: translate3d(0, -20px, 0);
        opacity: 0
    }
}