:root {
    --sticky--pop-up-btn-width: 35px;
}
.sticky-pop-up {
    position: sticky;
    top: calc(100vh - 140px);
    z-index: 21;
}

.side-pop-up {
    margin-bottom: 30px;
    overflow: auto;
    transform: translateX(calc(100% - var(--sticky--pop-up-btn-width)));
    transition: 400ms ease-in-out;
    display: flex;
}

.side-pop-up header {
    color: inherit;
    margin-top: 0;
}

.side-pop-up .btn-primary {
    min-width: 0;
    width: 100%;
    background-color: #fff;
    color: #7f9263;
    padding: 11px 10px;
}

.side-pop-up .btn-primary:hover,
.side-pop-up .btn-primary:focus {
    background-color: #7f9263;
    color: #fff;
}

.side-pop-up .inner {
    padding: 28px;
    flex: 1;
    background-color: #7f9263;
    color: #fff;
}

.side-pop-up-wrap {
    width: 378px;
    overflow: hidden;
    position: absolute;
    right: 0;
    bottom: 0;
}

#pop-up-toggle {
    appearance: none;
    background-color: #65764c;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--sticky--pop-up-btn-width);
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
}

#pop-up-toggle svg {
    transform: rotate(180deg);
}

.show-side-popup .side-pop-up {
    transform: translateX(0);
}

.show-side-popup #pop-up-toggle svg {
    transform: rotate(0);
}

@media (max-width: 767px) {
    :root {
        --sticky--pop-up-btn-width: 24px;
    }

    .sticky-pop-up {
        top: calc(100vh - 20px);
        font-size: 14px;
        line-height: 16.8px;
    }

    .side-pop-up-wrap {
        width: calc(100% - 84px);
        max-width: 290px;
    }
    .side-pop-up {
        flex-direction: row-reverse;
        transform: translateX(calc(-100% + var(--sticky--pop-up-btn-width)));
    }

    .side-pop-up header {
        font-size: 18px;
        line-height: 1.4;
    }

    .side-pop-up .inner {
        padding: 15px;
    }
    .side-pop-up-wrap {
        left: 0;
        right: auto;
    }

    #pop-up-toggle {
        border-top-left-radius: 0;
        border-bottom-left-radius: 0;
        border-top-right-radius: 5px;
        border-bottom-right-radius: 5px;
        padding: 0 8px;
    }

    #pop-up-toggle svg {
        transform: rotate(0);
    }

    .show-side-popup #pop-up-toggle svg {
        transform: rotate(180deg);
    }

    .side-pop-up .btn-primary {
        padding: 6px 16px;
        width: auto;
    }
}
