/* .modal */

.modal { opacity: 0; pointer-events: none; position: fixed; top: 0; left: 0; z-index: 1; width: 100vw; height: 100vh; display: flex; flex-direction: row; justify-content: center; align-items: center; opacity: all .5s ease; }
.modal .modal-bg { position: absolute; top: 50%; left: 50%; width: 3px; height: 0; opacity: .9; background-color: #282a29;}

.modal .modal-close { position: absolute; top: 0; left: inherit; right: 0; z-index: 10; display: block; width: 50px; height: 50px; background-color: #3182a4; border: 1px solid #3182a4; margin: -.5rem;}
.modal .modal-close span { position: relative; z-index: 10; display: flex; flex-direction: row; justify-content: center; align-items: center; width: 100%; height: 100%;}
.modal .modal-close svg { stroke: #fff; transition: stroke .2s ease;}
.modal .modal-close:after { content: ""; position: absolute; top: 0; left: 50%; width: 0; height: 100%; background: #fff; transition: width .5s ease , left .5s ease;}

@media(hover:hover) {
    .modal .modal-close:hover svg { stroke: #3182a4;}
    .modal .modal-close:hover:after { left: 0; width: 100%;}
}

.modal .modal-content { opacity: 0; position: relative; z-index: 10; display: flex; flex-direction: row; justify-content: center; align-items: center; width: 80%; height: 90%; padding: 1.5rem; }
.modal .modal-content iframe { width: 100%; height: 100%;}
.modal .modal-content h2 { margin-bottom: 1rem;}
.modal .modal-content h2 + p + form > fieldset { margin-top: 0;}
.modal .modal-content h2 + p + form > fieldset > div { margin-bottom: 0;}
.modal .modal-content h2 + p + form > fieldset > div > textarea { margin-top: 1rem;}

.modal .modal-content .overflow-y { width: calc(100% + .5rem); max-height: 100%; overflow-y: scroll; padding-right: .5rem; margin-right: -.5rem;}

@media(max-width: 767px){
    .modal .modal-content { height: 80%;}
}


/* .modal.modal-form */
.modal.modal-form .modal-content { max-width: 600px; max-height: 650px; padding: 3rem;}
.modal.modal-form .modal-content.submmited-form { height: auto; max-height: inherit;}
.modal.modal-form .modal-content.submmited-form .form-content { margin-bottom: auto;}
.modal.modal-form .modal-content.submmited-form h2 + p { display: none;}
.modal.modal-form .modal-content.submmited-form form .ok-message { display: block;}
.modal.modal-form .modal-content.submmited-form form fieldset { display: none;}

@media(max-width: 767px){
    .modal.modal-form .modal-content { padding: 2rem;}
}




/* SHOW MODAL */

.modal.active { z-index: 5000; opacity: 1; pointer-events: all;}
.modal.active .modal-bg { animation: show-modal .9s .35s ease-in-out forwards;}
.modal.active .modal-content { animation: modal-content-opacity 1.5s .5s ease-in-out forwards;}

@keyframes show-modal {
    0%   { top: 50%; left: 50%; width: 3px;  height: 0;}
    50%  { top: 0%;  left: 50%; width: 3px;  height: 100%;}
    100% { top: 0%;  left: 0%;  width: 100%; height: 100%;}
}
@keyframes modal-content-opacity {
    0%   { opacity: 0;}
    100% { opacity: 1;}
}