/* Popup Overlay */
#msp-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Dimmed background */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000; /* Ensure it's on top */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#msp-popup-overlay.msp-popup-visible {
    opacity: 1;
    visibility: visible;
}

/* Popup Container */
#msp-popup-container {
    position: relative;
    background-color: #fff; /* Optional: if your image has transparency */
    padding: 0; /* Adjust if you want padding around the image itself */
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    width: 95%; /* Mobile first */
    max-width: 700px; /* Max width for larger screens */
    max-width: 80vh; /* Max width for larger screens */
}

/* Popup Image */
#msp-popup-image {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1; /* CSS aspect ratio */
    object-fit: cover; /* Or 'contain' depending on how you want the image to fit */
}

/* Close Button */
#msp-close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 30px;
    font-weight: bold;
}
#msp-close-btn span {
    color: #fff; /* Adjust color as needed */
    cursor: pointer;
    line-height: 1;
    z-index: 10001;
}

#msp-close-btn:hover span {
    color: #0f0;
}

/* Helper class to hide initially */
.msp-popup-hidden {
    display: none !important; /* Can use this to prevent flash of unstyled content if needed, but JS handles visibility */
}