.akppg-popup {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 2147483647 !important;

    display: flex;
    align-items: center;
    justify-content: center;

    visibility: hidden;
    opacity: 0;

    pointer-events: none;

    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
}

.akppg-popup.active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}


/* Dark background */
.akppg-popup-overlay {
    position: absolute !important;
    inset: 0 !important;

    width: 100%;
    height: 100%;

    background: rgba(0, 0, 0, 0.88);

    z-index: 1;
}


/* Popup image container */
.akppg-popup-content {
    position: relative !important;

    z-index: 2;

    width: auto;
    height: auto;

    max-width: 92vw;
    max-height: 92vh;

    margin: 0;
}


/* Popup image */
.akppg-popup-image {
    display: block;

    width: auto;
    height: auto;

    max-width: 92vw;
    max-height: 88vh;

    object-fit: contain;

    border-radius: 8px;

    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.6);
}


/* Close button */
.akppg-popup-close {
    position: absolute !important;

    top: -18px;
    right: -18px;

    width: 46px;
    height: 46px;

    padding: 0;

    border: 0;
    border-radius: 50%;

    background: #ffffff;
    color: #111111;

    font-size: 32px;
    line-height: 46px;

    text-align: center;

    cursor: pointer;

    z-index: 10;

    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.35);
}

.akppg-popup-close:hover {
    background: #eeeeee;
}


/* Prevent page scrolling while popup is open */
body.akppg-popup-open {
    overflow: hidden !important;
}


/* Mobile */
@media (max-width: 600px) {

    .akppg-popup-content {
        max-width: 94vw;
        max-height: 88vh;
    }

    .akppg-popup-image {
        max-width: 94vw;
        max-height: 82vh;
    }

    .akppg-popup-close {
        top: -12px;
        right: -8px;

        width: 40px;
        height: 40px;

        font-size: 28px;
        line-height: 40px;
    }
}