.kd-popup {
    position: fixed;
    display: flex;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    z-index: 1000;
    -webkit-transition: all .5s ease-out;
    -ms-transition: all .5s ease-out;
    -moz-transition: all .5s ease-out;
    -o-transition: all .5s ease-out;
    transition: all .5s ease-out;
    opacity: 0;
    visibility: hidden;
    overflow-y: scroll;
}

body.admin-bar .kd-popup.top-left,
body.admin-bar .kd-popup.top,
body.admin-bar .kd-popup.top-right,
body.admin-bar .kd-popup.full-screen {
    top: 32px;
    height: calc(100dvh - 32px);
}

.kd-popup.top-left {
    justify-content: flex-start;
    align-items: flex-start;
}

.kd-popup.top {
    justify-content: center;
    align-items: flex-start;
}

.kd-popup.top-right {
    justify-content: flex-end;
    align-items: flex-start;
}

.kd-popup.center-left {
    justify-content: flex-start;
    align-items: center;
}

.kd-popup.center {
    justify-content: center;
    align-items: center;
}

.kd-popup.center-right {
    justify-content: flex-end;
    align-items: center;
}

.kd-popup.open {
    opacity: 1;
    visibility: visible;
}

.kd-popup.bottom-left {
    justify-content: flex-start;
    align-items: flex-end;
}

.kd-popup.bottom {
    justify-content: center;
    align-items: flex-end;
}

.kd-popup.bottom-right {
    justify-content: flex-end;
    align-items: flex-end;
}

.kd-popup.top .kd-popup__container,
.kd-popup.bottom .kd-popup__container,
.kd-popup.full-screen .kd-popup__container {
    flex: 0 1 100%;
}

.kd-popup.full-screen .kd-popup__container {
    height: 100%;
}

.kd-popup.full-screen .kd-popup__container>.wp-block-group {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.kd-popup .kd-popup__container {
    position: relative;
    width: 100%;
    max-width: 800px;
}

.kd-popup .kd-popup-close {
    position: absolute;
    top: 22px;
    right: 22px;
    width: 23px;
    height: 23px;
    cursor: pointer;
    z-index: 10;
}

.kd-popup .kd-popup-close svg {
    display: block;
    width: 100%;
}

.kd-popup .kd-popup-close svg path {
    fill: #000000;
}

.kd-popup .wp-block-columns-is-layout-flex.no-gutter {
    gap: 0;
}

@media only screen and (max-height: 1000px) {
    .kd-popup.center {
        align-items: flex-start;
    }
}

@media only screen and (max-width: 1023px) {
    .kd-popup .kd-popup__container {
        max-width: 600px;
    }
}

@media only screen and (max-width: 781px) {
    .kd-popup {
        top: auto;
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
    }

    .kd-popup .kd-popup__container {
        max-width: 400px;
    }

    body.admin-bar .kd-popup.top-left,
    body.admin-bar .kd-popup.top,
    body.admin-bar .kd-popup.top-right,
    body.admin-bar .kd-popup.full-screen {
        top: 46px;
        height: calc(100dvh - 46px);
    }

    .kd-popup.top-left,
    .kd-popup.top,
    .kd-popup.top-right {
        justify-content: center;
        align-items: flex-start;
    }

    .kd-popup.center-left,
    .kd-popup.center,
    .kd-popup.center-right {
        justify-content: center;
        align-items: flex-start;
        padding: 10px;
    }

    .kd-popup.bottom-left,
    .kd-popup.bottom,
    .kd-popup.bottom-right {
        justify-content: center;
        align-items: flex-end;
    }

    .kd-popup.top-left .kd-popup__container,
    .kd-popup.top .kd-popup__container,
    .kd-popup.top-right .kd-popup__container,
    .kd-popup.bottom-left .kd-popup__container,
    .kd-popup.bottom .kd-popup__container,
    .kd-popup.bottom-right .kd-popup__container {
        flex: 0 1 100%;
    }

}

@media only screen and (max-width: 600px) {

    body.admin-bar .kd-popup.top-left,
    body.admin-bar .kd-popup.top,
    body.admin-bar .kd-popup.top-right,
    body.admin-bar .kd-popup.full-screen {
        top: 0;
        height: 100dvh;
    }
}