#popup-cont {
    position:fixed;
    left:0;
    top:0;
    height:100vh;
    width:100vw;
    background:rgba(0,0,0,0.5);
    backdrop-filter: blur(0.1rem);
    -webkit-backdrop-filter: blur(0.1rem);
    
    display: grid;
    justify-items: center;
    align-items: center;
    pointer-events: none;

    opacity:0;
    transition:all 0.3s;
    z-index:1000;
}

#popup-cont:has(> .popup) {
    pointer-events: all;
    opacity:1;
}

.popup {
    grid-area: 1 / 1;

    background:var(--inv-bg);
    color:var(--inv-text);
    min-width:min(14rem, calc(100vw - 2rem));
    max-width:calc(100vw - 2rem);
    max-width:min(100vw - 2rem, 36rem);
    pointer-events:all;
    box-shadow: var(--thm-box-shadow);
    border-radius:0.5rem;
    overflow:hidden;

    display:flex;
    gap:1rem;
    align-items:center;
    padding:1rem;

    animation:popupAppear 0.3s cubic-bezier(.17,.67,.61,1);
    transition: all 0.3s cubic-bezier(.17,.67,.61,1);
    -webkit-transition: all 0.3s cubic-bezier(.17,.67,.61,1);

    position:relative;

    transition:all 0.3s cubic-bezier(1,0,.6,.75);
}

.popup.green svg {fill:var(--inv-green);}
.popup.yellow svg {fill:var(--inv-yellow);}
.popup.red svg {fill:var(--inv-red);}

@keyframes popupAppear {
    0% {
        transform:translateY(1.5rem);
    }
    100% {
        transform:translateY(0);
    }
}

.popup .icon {
    fill:var(--inv-text);
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.popup .icon,
.popup .icon svg {
    width:3.75rem;
    min-width:3.75rem;
    max-width:3.75rem;
    overflow: visible;
}

.popup .icon svg {
    filter: drop-shadow(var(--thm-text-shadow));
    -webkit-filter: drop-shadow(var(--thm-text-shadow));
}

.popup:has(.conf) .text {
    display:flex;
    flex-direction: column;
    gap:0.25rem;
}

.popup:has(.conf):not(:has(span.message)) .text{
    gap:0.5rem;
}

.popup:has(.conf) .text span.message {
    margin-bottom:0.5rem;
}

.popup .close {
    position:absolute;
    top:0.5rem;
    right:0.5rem;
}
.popup .close svg {
    fill:var(--inv-text);
    transition:all 0.3s;
}
.popup .close:hover svg {
    fill:var(--inv-gray);
    filter: drop-shadow(var(--thm-text-shadow));
    -webkit-filter: drop-shadow(var(--thm-text-shadow));
}

.popup.closing {
    opacity: 0.6 !important;
    transform: scaleX(0%) scaleY(0%);
}



@media (max-width: 53rem) {
    .popup {
        flex-direction: column;
        text-align: center;
        gap:0.25rem;
    }
    .popup .conf {
        justify-content: center;
    }
}







.popup .conf {
    display:inline-flex;
    gap:0.25rem;
    /* margin-top:0.5rem; */
}

.popup .conf button {
    border-radius:0.5rem;
    padding:0.5rem 0.75rem;
    font-weight:500;
    box-shadow: var(--inv-box-shadow);
    position:relative;
    overflow: hidden;
}
.popup .conf button::after {
    content:'';
    position:absolute;
    width:100%;
    height:100%;
    opacity:0;
    transition:opacity 0.3s ease;
    top:0;
    left:0;
}
.popup .conf button:hover::after {
    opacity:0.2;
}
.popup .conf .conf-bad {
    border:0.175em solid var(--inv-red);
    color:var(--inv-red);
}
.popup .conf .conf-bad::after {
    background:var(--inv-red);
}

.popup .conf .conf-cancel {
    border:0.175em solid var(--inv-text);
    background:var(--inv-text);
    color:var(--inv-bg);
}
.popup .conf .conf-cancel::after {
    background:var(--inv-bg);
    border-radius:0.42rem;
}

