:not(html:has(body [class*="masonry"])):has(.page-back-button-container) body{
    padding-top: calc(30px + 20px);
}

.page-back-button-container{
    height: calc(30px + 20px);
    width: 100%; 
    position: relative;
    position: sticky;
    position: fixed !important;
    display: flex;
    top: 0;
    z-index: 2000;
    gap: 20px;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.page-back-button-container::before{
    content: '';
    inset: 0;
    position: absolute;
    background: var(--background-color);
    opacity: .5;
    opacity: 0;
}

.page-back-button-inner-container{
    display: flex;
    height: 100%;
    width: calc(100% - (20px * 2));
    max-width: 1000px;
    position: relative;
    justify-content: center;
    align-items: center;
}

.page-back-button{
    width: 30px;
    position: absolute;
    font-size: 25px;
    pointer-events: all;
    aspect-ratio: 1/1;
    border-radius: 50%;
    background: var(--menu-trigger-button-background);
    color: var(--menu-trigger-button-text);
    display: flex;
    left: 10px;
    justify-content: center;
    align-items: center;
    box-shadow: var(--box-shadow);
}

.bar-button{
    height: 100%;
    padding: 0 10px;
    display: flex;
    pointer-events: all;
    background: var(--fill-1);
    color: var(--light-grey);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3px;
    border-radius: 100px;
    box-shadow: var(--box-shadow);
}

html:has(body [class*="masonry"]) .page-back-button-container{
    background: transparent;
    pointer-events: none;
    backdrop-filter: blur(0);
}

html:has(body [class*="masonry"]) .page-back-button-container::before{
    background: none;
}

html:has(body [class*="masonry"]) .menu-button{
    position: relative; 
}

/* the code under this line is active when screen goes over the specified px dimension after "min-width:" ----------------------------------------------------------------------------*/
@media only screen and (min-width: 600px){

    :not(html:has(body [class*="masonry"])):has(.page-back-button-container) body{
        padding-top: calc(25px + (20px * 2));
    }

    .menu-button{
        --height: 25px;
    }
    .page-back-button{
        width: 25px;
        font-size: 20px;
    }
    .page-back-button-container{
        height: calc(25px + 20px + 20px);
    }
}