.site-popup-backdrop{position:fixed;inset:0;z-index:9999;background:rgba(4,14,31,.68);backdrop-filter:blur(6px);display:grid;place-items:center;padding:24px}.site-popup-backdrop[hidden]{display:none}.site-popup-image-only{position:relative;width:auto;max-width:min(94vw,var(--popup-max,94vw));max-height:90vh;border-radius:18px;overflow:visible;filter:drop-shadow(0 26px 55px rgba(0,0,0,.35))}.site-popup-image-only img{display:block;width:auto;height:auto;max-width:100%;max-height:90vh;object-fit:contain;border-radius:18px}.site-popup-close{position:absolute;z-index:2;right:-14px;top:-14px;width:42px;height:42px;border:3px solid #fff;border-radius:50%;background:#102a56;color:#fff;font-size:25px;line-height:1;cursor:pointer;box-shadow:0 8px 22px rgba(0,0,0,.28)}
.popup-simple-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px}.popup-simple-card{padding:22px}.popup-simple-card.is-active{box-shadow:0 0 0 2px #16a34a,0 18px 42px rgba(18,55,98,.12)}.popup-simple-head{display:flex;justify-content:space-between;gap:18px}.popup-simple-head h2{margin:3px 0 6px;font-weight:600}.popup-simple-preview{margin:18px 0;background:linear-gradient(135deg,#edf4ff,#f8fafc);border:1px dashed #c9d8ea;border-radius:16px;min-height:220px;display:grid;place-items:center;overflow:hidden}.popup-simple-preview.horizontal img{max-width:100%;max-height:300px}.popup-simple-preview.vertical img{max-width:70%;max-height:430px}.popup-simple-preview img{display:block;width:auto;height:auto;object-fit:contain}.popup-empty-preview{text-align:center;color:#64748b}.popup-empty-preview span{display:block;font-size:18px}.popup-upload-form{display:grid;gap:14px}.popup-file-box{border:1px solid #dce5f0;border-radius:12px;padding:12px;display:grid;gap:8px}.popup-size-controls{display:grid;grid-template-columns:1.4fr .8fr;gap:12px}.popup-size-controls label{display:grid;gap:7px;font-size:14px}.popup-size-controls select,.popup-size-controls input{width:100%;min-height:44px;border:1px solid #ccd8e7;border-radius:10px;padding:0 12px;background:#fff}.with-unit{display:grid;grid-template-columns:1fr 42px;align-items:center}.with-unit b{height:44px;display:grid;place-items:center;background:#edf3fb;border-radius:0 10px 10px 0;font-weight:500}.with-unit input{border-radius:10px 0 0 10px}.popup-admin-note{font-size:13px;color:#61728a;background:#f1f6fd;border-radius:10px;padding:10px 12px}.popup-simple-actions{margin-top:12px}.status-pill.active{background:#dcfce7;color:#166534;padding:7px 10px;border-radius:999px;font-size:12px}
@media(max-width:900px){.popup-simple-grid{grid-template-columns:1fr}.popup-size-controls{grid-template-columns:1fr}}@media(max-width:600px){.site-popup-backdrop{padding:16px}.site-popup-image-only{max-width:94vw;max-height:86vh}.site-popup-image-only img{max-height:86vh}.site-popup-close{right:-8px;top:-12px}}


/* ============================================================
   POPUP IMAGE-ONLY PRESISI v4
   Card = ukuran gambar, tanpa area kosong.
   Override aman terhadap .site-popup lama di site.css.
   ============================================================ */
#sitePopup.site-popup-backdrop{
    display:grid !important;
    place-items:center !important;
    padding:24px !important;
    overflow:auto !important;
}

#sitePopup .site-popup.site-popup-image-only,
#sitePopup .site-popup.site-popup-image-only.site-popup-vertical,
#sitePopup .site-popup.site-popup-image-only.site-popup-horizontal{
    position:relative !important;
    display:inline-block !important;

    width:auto !important;
    height:auto !important;
    min-width:0 !important;
    min-height:0 !important;
    max-width:none !important;
    max-height:none !important;

    margin:0 !important;
    padding:0 !important;

    background:transparent !important;
    border:0 !important;
    border-radius:18px !important;
    box-shadow:none !important;
    filter:drop-shadow(0 26px 55px rgba(0,0,0,.35)) !important;

    overflow:visible !important;
    line-height:0 !important;

    /* Mematikan layout horizontal/grid lama dari .site-popup-horizontal */
    grid-template-columns:none !important;
}

#sitePopup .site-popup.site-popup-image-only > img{
    display:block !important;
    width:auto;
    height:auto !important;
    min-width:0 !important;
    min-height:0 !important;
    margin:0 !important;
    padding:0 !important;
    border:0 !important;
    border-radius:18px !important;
    background:transparent !important;
}

#sitePopup .site-popup-close{
    position:absolute !important;
    z-index:20 !important;
    top:-16px !important;
    right:-16px !important;
    width:44px !important;
    height:44px !important;
    border:3px solid #fff !important;
    border-radius:50% !important;
    background:#102a56 !important;
    color:#fff !important;
    font-size:27px !important;
    line-height:1 !important;
    display:grid !important;
    place-items:center !important;
    cursor:pointer !important;
    box-shadow:0 8px 22px rgba(0,0,0,.28) !important;
}

#sitePopup.site-popup-scrollable{
    place-items:start center !important;
    padding-top:36px !important;
    padding-bottom:36px !important;
}

#sitePopup.site-popup-scrollable .site-popup-image-only{
    margin:0 auto !important;
}

@media(max-width:600px){
    #sitePopup.site-popup-backdrop{
        padding:18px !important;
    }
    #sitePopup.site-popup-scrollable{
        padding-top:28px !important;
        padding-bottom:28px !important;
    }
    #sitePopup .site-popup-close{
        top:-12px !important;
        right:-10px !important;
        width:40px !important;
        height:40px !important;
        font-size:24px !important;
    }
}


/* Popup close click safety v5 */
#sitePopup .site-popup-close{
    z-index:999999 !important;
    pointer-events:auto !important;
    touch-action:manipulation !important;
    user-select:none !important;
    isolation:isolate !important;
}
#sitePopup .site-popup-image-only > img{
    position:relative;
    z-index:1;
}

/* ============================================================
   FIX FINAL CLOSE POPUP
   Atribut hidden HARUS mengalahkan display:grid !important.
   ============================================================ */
#sitePopup[hidden],
#sitePopup.site-popup-backdrop[hidden]{
    display:none !important;
    visibility:hidden !important;
    pointer-events:none !important;
}

