.pp_overlay {
    background: #000;
    z-index: 1999999998 !important;
}

.pp_pic_holder {
    z-index: 1999999999 !important;
}

/* The inline form controls its height; scrolling keeps the submit button reachable. */
div.pp_pic_holder.spf-inline-popup {
    position: fixed;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%);
    width: min(600px, calc(100vw - 24px)) !important;
}

.spf-inline-popup .pp_top,
.spf-inline-popup .pp_bottom,
.spf-inline-popup .ppt,
.spf-inline-popup .pp_details {
    display: none !important;
}

div.pp_pic_holder.spf-inline-popup .pp_content_container .pp_left,
div.pp_pic_holder.spf-inline-popup .pp_content_container .pp_right {
    padding: 0;
    background: none;
}

div.pp_pic_holder.spf-inline-popup .pp_content {
    width: 100% !important;
    height: auto !important;
    background: none;
}

.spf-inline-popup .spf-inline-content {
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
    overflow: auto;
    overscroll-behavior: contain;
    border-radius: 4px;
}

.spf-inline-popup #pp_full_res {
    font-size: 14px;
    line-height: 1.5 !important;
}

.spf-announcement-popup #fullResImage {
    display: block;
}

/* Keep image galleries above the application header and floating controls. */
.fancybox-container {
    z-index: 1999999999;
}
