.bg-dark {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    background-color: var(--bgl-dark-bg);
    z-index: 999;
    pointer-events: none;
    opacity: 0;
    transition: all ease-in-out 0.3s;
    max-height: 100vh;
    overflow: scroll;
    margin: 0 auto;
    width: 100%;
    display: grid;
    align-items: center;
    overflow-x: hidden;
}


.bg-lignt {
    background-color: var(--bgl-white);
}

.modal {
    width: 96%;
    max-width: 720px;
    /* transform: scale(0.5); */
    /* opacity: 0; */
    transition: all ease-in-out 0.18s;
    margin-left: auto;
    margin-right: auto;
    height: fit-content;
}

.is-active .modal {
    animation: 200ms ease bgl-modal-animation;

}

@keyframes bgl-modal-animation {
    from {
        scale: 0.7;
        transform: translateY(2rem);
    }

    to {
        scale: 1;
        transform: translateY(0);

    }
}

.small-modal .modal {
    max-width: 300px;
    text-align: center;
}

.tool-bar {
    margin: -1rem -1rem 1rem;
    display: flex;
    justify-content: space-between;
    position: -webkit-sticky;
    position: sticky;
    padding-top: 0rem;
    top: 0rem;
    z-index: 3;
    background: var(--bgl-popup-bg);
    border-radius: var(--card-border-radius);
}

.modal-size {
    cursor: pointer;
}

.is-side .modal {
    inset-inline-end: -1720px;
    opacity: 1;
    max-width: 600px;
    width: 90%;
    margin-top: 1rem;
    margin-bottom: 1rem;
    margin-inline-start: auto;
    margin-inline-end: 20px;
    min-height: calc(100vh - 40px);
    transform: translateX(100%);
}

.is-active .modal {
    opacity: 1;
    box-shadow: 6px 6px 20px 20px #0000001c;
}

.bg-lignt .modal {
    border: 1px solid var(--border-color);
}

.bg-lignt.is-active .modal {
    box-shadow: none;
}

.is-active.is-side .modal {
    inset-inline-end: 0px;
    transform: translateX(0%);
}

.bg-dark.is-active {
    opacity: 1;
    pointer-events: all;
}

body:has(.bg-dark.is-active) {
    overflow: hidden;
}

.is-side.bg-dark.is-active {
    opacity: 1;
    align-items: stretch;
}

.is-side.is-active .modal {
    pointer-events: all;
}

@media screen and (max-width: 910px) {
    .tool-bar {
        margin: -1rem 0rem 1rem;
        padding-bottom: 1rem;
        align-items: center;
    }

    .is-active.is-side .modal {
        margin-inline-end: 2%;
        margin-inline-start: 2%;
        width: 98%;

    }

}