body,
main {
    overflow-x: hidden;
}

/*noinspection CssOverwrittenProperties*/
.king-addons-popup {
    position: fixed;
    overflow: auto;
    transition: all 500ms ease;
    max-width: 100%;
    max-height: 100vh;
    /* Safari fix */
    max-height: 100svh;
}

/* Hide scrollbar */
.king-addons-popup::-webkit-scrollbar {
    display: none;
}

.king-addons-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    display: none;
    width: 100%;
    height: 100%;
    transition: opacity 500ms ease;
    opacity: 0;
}

.king-addons-popup-close-button {
    line-height: 1;
    position: absolute;
    z-index: 999;
    top: 10px;
    right: 10px;
    bottom: 0;
    display: block;
    width: min-content;
    height: min-content;
    padding: 0;
    cursor: pointer;
}

.king-addons-popup-animation-fade {
    opacity: 0;
}

.king-addons-popup-animation-fade.king-addons-popup-active {
    opacity: 1;
}

.king-addons-popup-position-top {
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    transition: top 500ms ease, transform 500ms ease;
}

.king-addons-popup-position-right {
    top: 50%;
    right: -100%;
    transform: translateY(-50%);
    transition: right 500ms ease, transform 500ms ease;
}

.king-addons-popup-position-bottom {
    bottom: -100%;
    left: 50%;
    transform: translateX(-50%);
    transition: bottom 500ms ease, transform 500ms ease;
}

.king-addons-popup-position-left {
    top: 50%;
    left: -100%;
    transform: translateY(-50%);
    transition: left 500ms ease, transform 500ms ease;
}

.king-addons-popup-position-top.king-addons-popup-animation-slide.king-addons-popup-active {
    top: 50%;
    transform: translate(-50%, -50%);
}

.king-addons-popup-position-right.king-addons-popup-animation-slide.king-addons-popup-active {
    right: 50%;
    transform: translate(50%, -50%);
}

.king-addons-popup-position-bottom.king-addons-popup-animation-slide.king-addons-popup-active {
    bottom: 50%;
    transform: translate(-50%, 50%);
}

.king-addons-popup-position-left.king-addons-popup-animation-slide.king-addons-popup-active {
    left: 50%;
    transform: translate(-50%, -50%);
}

.king-addons-popup-button {
    display: inline-block;
    transition: all .3s;
}