/* GnuBoard popup layer compatibility for the Viking Lab custom theme. */
#hd_pop {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    pointer-events: none;
}

#hd_pop > h2 {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

#hd_pop .hd_pops {
    position: absolute;
    box-sizing: border-box;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
    pointer-events: auto;
}

#hd_pop .hd_pops_con {
    box-sizing: border-box;
    overflow: auto;
}

#hd_pop .hd_pops_con img {
    display: block;
    max-width: 100%;
    height: auto;
}

#hd_pop .hd_pops_footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    box-sizing: border-box;
    min-height: 48px;
    padding: 8px 10px;
    background: #151515;
    color: #fff;
}

#hd_pop .hd_pops_footer button {
    margin: 0;
    padding: 8px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

#hd_pop .hd_pops_footer .hd_pops_close {
    background: #3b3b3b;
}

#hd_pop .hd_pops_footer button:hover,
#hd_pop .hd_pops_footer button:focus-visible {
    background: #5a5a5a;
}

@media (max-width: 600px) {
    #hd_pop .hd_pops {
        top: 64px !important;
        left: 16px !important;
        max-width: calc(100vw - 32px);
    }

    #hd_pop .hd_pops_con {
        width: calc(100vw - 32px) !important;
        height: auto !important;
        max-height: calc(100vh - 150px);
    }

    #hd_pop .hd_pops_footer {
        font-size: 13px;
    }
}
