.is-modal {
  -webkit-filter: blur(10px);
  filter: blur(10px);
  -webkit-transition: .5s;
  transition: .5s
}

.modal-wrapper {
  -webkit-box-align: center;
  -ms-flex-align: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  align-items: center;
  background: rgba(0, 0, 0, .8);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  height: 100%;
  justify-content: center;
  left: 0;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 999
}

.modal-wrapper .modal-overlay {
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  width: 100%;
  z-index: -1
}

.modal-wrapper .modal-close {
  color: #fff;
  cursor: pointer;
  position: absolute;
  right: 20px;
  top: 20px;
  z-index: 1000
}

@media (max-width:768px) {
  .modal-wrapper .modal-close {
    right: 10px;
    top: 10px
  }
}

.modal-wrapper .modal-close:after {
  content: "×";
  font-size: 40px
}

.modal-wrapper .modal-inner {
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  align-items: center;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-direction: column;
  flex-direction: column;
  justify-content: center
}

.modal-wrapper .modal-inner .modal-item {
  line-height: 0;
  margin-bottom: 5px;
  max-height: 100%;
  max-width: 100%
}

.modal-wrapper .modal-inner .modal-item .modal-img {
  height: auto;
  max-width: 80vw;
  width: auto
}

@media (max-width:768px) {
  .modal-wrapper .modal-inner .modal-item .modal-img {
    max-width: 100vw;
    max-width: 100vmin;
    width: 100vw;
    width: 100vmin
  }
}

.modal-wrapper .modal-inner .modal-item .modal-iframe {
  height: 80vh;
  width: 80vw
}

@media (max-width:768px) {
  .modal-wrapper .modal-inner .modal-item .modal-iframe {
    width: 100vw
  }
}

.modal-wrapper .modal-inner .modal-gallery {
  text-align: center
}

.modal-wrapper .modal-inner .modal-gallery .modal-btns {
  font-size: 20px
}

.modal-wrapper .modal-inner .modal-gallery .modal-btns .modal-count {
  color: #fff;
  display: inline-block;
  font-size: .8em;
  letter-spacing: .2em;
  line-height: 1;
  padding: 0 10px;
  vertical-align: middle
}

.modal-wrapper .modal-inner .modal-gallery .modal-btns .modal-next,
.modal-wrapper .modal-inner .modal-gallery .modal-btns .modal-prev {
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  color: #fff;
  cursor: pointer;
  display: -webkit-inline-box;
  display: -ms-inline-flexbox;
  display: inline-flex;
  justify-self: center;
  vertical-align: middle
}

.modal-wrapper .modal-inner .modal-gallery .modal-btns .modal-prev:after {
  content: "◀"
}

.modal-wrapper .modal-inner .modal-gallery .modal-btns .modal-next:after {
  content: "▶"
}