body.modal-opened {
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;

    /* OPTIONAL: none of dom element will be click-able */
    pointer-events: none;
}

.modaloverlay {
    background: rgba(0, 0, 0, 0.85);
    bottom: 0;
    left: 0;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    right: 0;
    top: 0;
    -webkit-transition: opacity 400ms ease-in;
    -moz-transition: opacity 400ms ease-in;
    transition: opacity 400ms ease-in;
    z-index: -1;
    display: none;
    padding-bottom: 1em;
}

.modaloverlay.opened{
    display: block;
    opacity:1;
    pointer-events:auto;
    z-index:99999;
}

.modaloverlay .modal {
    background-color: white;
    width: 83%;
    height: 80%;
    position: relative;
    margin: 0 auto;
    padding-bottom: 2em;
    border-radius: 3px;
    -webkit-overflow-scrolling: touch;
    margin-top: 3%;
    overflow-y: auto;
}

.modaloverlay .modal > div {
    border:none;
}

.modaloverlay .modal > iframe {
    border:none;
    width:100%;
    height: 100%;
}

.modaloverlay .modal .exit {
    float: right;
    margin-top: -48px;
    margin-right: -48px;
    cursor: pointer;
    color: #fff;
    border: none;
    border-radius: 30px;
    background: #605F61;
    font-size: 30px;
    font-weight: bold;
    display: inline-block;
    line-height: 6px;
    padding: 11px 6px;
    text-decoration: none;
}

.exit:before {
    content: "×";
}

@media (max-width: 767px) {
  .modaloverlay .modal {
    height: 100%;
  }
}

@media (min-width: 320px) and (max-width: 320px) {
  .modaloverlay .modal {
    width: 320px;
  }
}