.bar label {
    font-size: 18px;
    position: absolute;
    top: -.5px;
    left: 0;
    color: var(--cloudy-white);
    font-weight: 500;
    text-align: start;
    font-family: 'Montserrat', sans-serif;
    padding: 4px 0 4px 0;
    border-radius: 8px 8px 0 0;
    background-image:url('../img/pattern-mirror.svg');
    background-size:150%;
    background-blend-mode: overlay;
    background-color: #494949;
    width: 100%;
    height: 22px;
    text-align: center;
    background-position: 0px 0px;
    background-repeat: repeat-x;
    animation: animatedBackground 240s linear infinite;
}

.modal>div:has(.bar){
    padding:48px 24px 24px 24px;
}

@keyframes animatedBackground {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 100% 100%;
    }
}


.modal {
    overflow-x:hidden;
    overflow-y: auto;
    color: var(--cloudy-white);
    position: fixed;
    top: -5%;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    text-align: center;
    /* Transition opacity on open */
    -webkit-transition: opacity 100ms ease-in;
    -moz-transition: opacity 100ms ease-in;
    transition: opacity 100ms ease-in;
    font-family: Montserrat;

    /* Hide for now */
    opacity: 0;
    pointer-events: none;
    z-index: 20;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal::-webkit-scrollbar {
    width: 2px;
    position: relative;
    height: 4px;
    
}

/* Track */
.modal::-webkit-scrollbar-track {
    border-radius: 8px;
    background: #36373f;
}

.modal::-webkit-scrollbar-thumb {
    background: rgb(85, 85, 85);
    border-radius: 10px;
}

.modal::-webkit-scrollbar-thumb:hover {
    background: #1b1b1b;
}

.modal::-webkit-scrollbar {
    width: 5px;
    position: relative;
    height: 4px;
    
}


/* Show modal */
.modal:target {
    opacity: 1;
    pointer-events: all;
    z-index: 9999;
}

.modal:target>div{
    transform: scale(1);
}

/* Show modal */
.modal:target img{
    opacity: 1;
    pointer-events: all;
}

/* Content */

.modal>div {
    transition:all 300ms cubic-bezier(0.23, 1, 0.320, 1);
    transform: scale(.8);
    height: fit-content;
    position: relative;
    box-sizing: border-box;
    margin:10px;
    padding: 24px;
    border-radius: 12px 12px 8px 8px;
    box-shadow: 0 3px 20px rgba(0, 0, 0, 0.9);
    background: var(--graphite);
}

/* Modal close link */
.modal #close {
    position: absolute;
    right: 8px;
    top: 6px;
    width: 16px;
    height: 16px;
    padding: 0;
    display:flex;
    justify-content: center;
    align-items: center;
}


.modal #close:before,
.modal #close:after {
    position: absolute;
    content: ' ';
    height: 18px;
    width: 2px;
    background-color: var(--cloudy-white);
    transition:background-color 100ms ease-in-out;
}

.modal #close:hover:before,
.modal #close:hover:after {
    background-color: var(--crimson-red);
}

.modal a:before {
    transform: rotate(45deg);
}

.modal a:after {
    transform: rotate(-45deg);
}




@media only screen and (max-width: 586px) {
    .popup-wrapper{
        padding:16px !important;
    }
}