/* ===============================
   POPUP WRAPPER
================================ */
#sep-popup {
    position: fixed;
    inset: 0;
    display: none; /* must stay hidden */
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

/* ===============================
   OVERLAY (LIGHT BLACK)
================================ */
#sep-popup .sep-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.60); /* lighter background */
}

/* ===============================
   CONTENT CONTAINER
================================ */
#sep-popup .sep-content {
    position: relative; /* positioning context for close button */
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}


/* ===============================
   IMAGE
================================ */
#sep-popup img {
    width: auto;
    height: auto;
    max-width: none;
    max-height: none;
    object-fit: contain;
    border-radius: 18px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
    background: #111;
    display: block;
}

/* ===============================
   CLOSE BUTTON (IMPROVED)
================================ */
#sep-popup .sep-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 20px;
    font-weight: bold;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10; /* ABOVE image */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===============================
   POSITION OPTIONS
================================ */
#sep-popup.top-left .sep-content {
    justify-content: flex-start;
    align-items: flex-start;
    padding: 20px;
}

#sep-popup.top-right .sep-content {
    justify-content: flex-end;
    align-items: flex-start;
    padding: 20px;
}

#sep-popup.bottom-left .sep-content {
    justify-content: flex-start;
    align-items: flex-end;
    padding: 20px;
}

#sep-popup.bottom-right .sep-content {
    justify-content: flex-end;
    align-items: flex-end;
    padding: 20px;
}

/* ===============================
   TABLET
================================ */
@media (max-width: 1024px) {
    #sep-popup img {
        max-width: 90vw;
        max-height: 85vh;
    }
}

/* ===============================
   MOBILE
================================ */
@media (max-width: 768px) {

    #sep-popup {
        padding: 15px;
    }

    #sep-popup img {
        max-width: 95vw;
        max-height: 80vh;
    }

    #sep-popup .sep-close {
        top: 10px;
        right: 10px;
    }
}

/* ===============================
   SMALL MOBILE
================================ */
@media (max-width: 480px) {
    #sep-popup img {
        max-width: 100%;
        max-height: 75vh;
        border-radius: 14px;
    }
}
