/* Styling for all preview images, wherever they are */
.preview-image {
    cursor: pointer; /* Indicates it's clickable */

}

/* Styles for the dynamically created modal */
.modal-overlay {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5); /* 50% opaque black background */
    display: flex; /* Use flexbox for centering */
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
    /* Initially hidden. JavaScript will control its display property. */
}

.modal-content-img {
    margin: auto;
    display: block;
    max-width: 92%;
    max-height: 92vh; /* Max height relative to viewport height */
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

.modal-close-button {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.modal-close-button:hover,
.modal-close-button:focus {
    color: #bbb;
    text-decoration: none;
}