


.modal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  -webkit-transition: all 0.2s 0.2s ease-in-out;
  transition: all 0.2s 0.2s ease-in-out;
}

.modal-content {
  padding: 10px;
  max-width: 600px;
  min-width: 360px;
  max-height: 85%;
  overflow: auto;
  position: absolute;
  z-index: 350;
  top: 50%;
  left: 50%;
  z-index: 2;
  opacity: 0;
  /*border-radius: 3px;*/
  background: #fff;
  -webkit-transform: translate(-50%, 0);
  -ms-transform: translate(-50%, 0);
  transform: translate(-50%, 0);
  -webkit-transition: all 0.5s ease-in-out;
  transition: all 0.5s ease-in-out;
}

.modal-close {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-color: rgba(0,0,0,0.5);
}

/*
.modal-close:after {
  content: "X";
  float: right;
  margin: 5px 5px 0 0;
  width: 30px;
  height: 30px;
  position: relative;
  z-index: 3;
  text-align: center;
  line-height: 30px;
  cursor: pointer;
  background-color: rgba(255,255,255,0.8);
  border-radius: 20px;
  box-shadow: 0 0 3px #000;
}
*/

input[id*="modal_"] {
  position: fixed;
  left: -9999px;
  top: 50%;
  opacity: 0;
}

input[id*="modal_"]:checked + div.modal {
  opacity: 1;
  visibility: visible;
/*
  -webkit-transition-delay: 0.5s;
  -ms-transition-delay: 0.5s;
  transition-delay: 0.5s;
  */
}

input[id*="modal_"]:checked + div.modal .modal-content {
  opacity: 1;
  -webkit-transform: translate(-50%, 0);
  -ms-transform: translate(-50%, 0);
  transform: translate(-50%, 0);
  /*
  -webkit-transition-delay: 0.5s;
  -ms-transition-delay: 0.5s;
  transition-delay: 0.5s;
  */
}

@media screen and (max-width: 767px) {
  .modal-content {
    padding: 10px 5%;
    min-width: 88%;
  }
}