.modal-overlay {
  z-index: 2;
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /*for old Safari*/
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-overlay:target {
  height: 100% \9 ;
}

/* IE9,10 */
a.modal-open:hover {
  cursor: pointer;
}

.modal-content {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  margin: auto;
  display: none;
  z-index: 999999;
  margin: auto;
  padding: 40px 13px 40px 30px;
  border-radius: 10px;
  background: #fff;
  height: 50%;
  max-width: 600px;
}

.modal-inner {
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
  height: 100%;
  width: 100%;
  padding-right: 17px;
  padding-bottom: 100px;
}

.modal-inner::-webkit-scrollbar-track {
  -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  background-color: #F5F5F5;
}

.modal-inner::-webkit-scrollbar {
  width: 12px;
  background-color: #F5F5F5;
}

.modal-inner::-webkit-scrollbar-thumb {
  border-radius: 10px;
  -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  background-color: #006EBB;
}

.modal-content img {
  width: auto;
  /* max-height: 95vh */
}

a.modal-close {
  position: absolute;
  top: 0;
  right: 0;
  color: #006EBB;
  font-size: 35px;
  line-height: 1;
  font-weight: bold;
  text-decoration: none;
}

a.modal-close:hover {
  cursor: pointer;
  opacity: 0.6;
}

@media screen and (max-height: 640px) {
  .modal-content {
    padding: 40px 10px 10px;
  }
  .modal-content h1 {
    font-size: 100%;
    margin-bottom: 3px;
  }
  .modal-content p {
    font-size: 75%;
    width: 70%;
    margin: auto;
  }
  a.modal-close:hover {
    opacity: 1;
  }
}
@media screen and (max-width: 640px) {
  .modal-content {
    padding: 40px 10px 10px;
    width: 95%;
    height: 95%;
  }
  .modal-content img {
    max-height: inherit;
    width: 100%;
    height: auto;
  }
  .modal-content p {
    font-size: 75%;
    width: 100%;
  }
  a.modal-close:hover {
    opacity: 1;
  }
}