/* Popup Overlay */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    overflow: hidden;
}

/* Display popup when enabled */
.popup-overlay.show {
    display: flex !important;
}

/* Popup Content */
.popup-content {
    background: #fff;
    padding: 15px;
    border-radius: 10px;
    max-width: 90%;  /* 90% of screen width */
    max-height: 90%; /* 90% of screen height */
    overflow-y: auto; /* Allow scrolling if content exceeds height */
    position: relative;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Close Button */
.mpp-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #f44336;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Popup Images */
.popup-images img {
    max-width: 100%;  /* Make the image responsive */
    max-height: 50vh; /* Limit height to 50% of viewport */
    margin-bottom: 10px;
    object-fit: contain; /* Scale images without distortion */
    border-radius: 5px;
}

/* Responsive Adjustments for Smaller Screens */
@media (max-width: 768px) {
    .popup-content {
        max-width: 95%;  /* Use more space on smaller screens */
        max-height: 85%; /* Adjust height to fit better */
        padding: 10px;
    }

    .mpp-close-btn {
        top: 5px;
        right: 5px;
        width: 25px;
        height: 25px;
        font-size: 18px;
    }

    .popup-images img {
        max-height: 35vh; /* Further limit image size for mobile */
    }
}
