 /* class that triggers the Modal */
.messageImage {
  border-radius: 2px;
  cursor: pointer;
  transition: 0.3s;
}

@media (hover: hover) {
  .messageImage:hover {
    opacity: 0.7;
  }
}
  
/* The Modal (background) */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 4; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  background-color: rgb(0,0,0); /* Fallback color */
  background-color: rgba(0,0,0,0.9); /* Black w/ opacity */
  align-items: center; /* <--- NEU */
  justify-content: center; /* optional, falls nicht sowieso schon mittig */
}

/* Modal Content (Image) */
.modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;

  animation-name: zoom;
  animation-duration: 0.6s;
}

@keyframes zoom {
  from {
    transform: translate(-50%, -50%) scale(0);
  }
  to {
    transform: translate(-50%, -50%) scale(1);
  }
}

/* The Close Button */
.modalCloseButton {
  position: absolute;
  top: 0px;
  right: 5px;
  z-index: 5;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
}

@media (hover: hover) {
  .modalCloseButton:hover {
    text-decoration: none;
    cursor: pointer;
  }
}
.modalCloseButton:focus {
  text-decoration: none;
  cursor: pointer;
}

 .body-modal-open {
  overflow: hidden;
}