/* The Modal (background) */
.show_image_modal {
  display: none;
  /* Hidden by default */
  position: fixed;
  /* Stay in place */
  z-index: 3;
  /* Sit on top */
  padding-top: 0px;
  /* Location of the box */
  left: 0;
  top: 0;
  width: 100%;
  /* Full width */
  height: 100%;
  /* Full height */
  overflow: auto;
  /* Enable scroll if needed */
  background-color: rgb(0, 0, 0);
  /* Fallback color */
  background-color: rgba(0, 0, 0, 0.8);
  /* Black w/ opacity */
}

/* Modal Content (image) */
.show_image_modal_content {
  margin: auto;
  display: block;
  /* margin-top: 15px; */
}

.show_image_modal_content.landscape_pic,
.show_image_modal_content.portrait_pic {
  margin-top: 15px;
  max-width: 90%;
  max-height: 90%;
}

/* Legend of Modal Image */
.show_image_modal_text {
  margin: auto;
  display: block;
  max-width: 75%;
  text-align: center;
  color: #ccc;
  padding: 10px 0;
}

/* Add Animation */
.show_image_modal_content,
.show_image_modal_text {
  -webkit-animation-name: zoom;
  -webkit-animation-duration: 0.6s;
  animation-name: zoom;
  animation-duration: 0.6s;
}

@-webkit-keyframes zoom {
  from {
    -webkit-transform: scale(0)
  }

  to {
    -webkit-transform: scale(1)
  }
}

@keyframes zoom {
  from {
    transform: scale(0)
  }

  to {
    transform: scale(1)
  }
}

/* The Close Button */
.show_image_modal_close {
  position: fixed;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
}

.show_image_modal_close:hover,
.show_image_modal_close:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}

/* 100% Image Width on Smaller Screens */
@media only screen and (max-width: 700px) {
  .show_image_modal_content {
    /* useless since max-width is still 85%, but keep the block in case we need special treatment */
    /*width: 100%;*/
  }
}

/* Next & previous buttons */
.show_image_modal_prev,
.show_image_modal_next {
  cursor: pointer;
  position: absolute;
  top: 40%;
  width: auto;
  margin-top: -22px;
  padding: 16px;
  color: white;
  font-weight: bold;
  font-size: 36px;
  transition: 0.6s ease;
  border-radius: 0 3px 3px 0;
}

/* Position the "next button" to the right */
.show_image_modal_next {
  right: 0;
  border-radius: 3px 0 0 3px;
}

/* On hover, add a black background color with a little bit see-through */
.show_image_modal_prev:hover,
.show_image_modal_next:hover {
  background-color: rgba(0, 0, 0, 0.8);
}