.modal_overlay {
    position: fixed;
    top: 0px; left: 0px;
    width: 100%;
    height: 100%;
    background-color: rgba(236, 223, 206, 0.96);
    z-index: 99;
    display: none;        
    flex-flow: column;
    justify-content: center;
    animation-timing-function: ease-in;
    animation: opacity_in 460ms both;
}

.modal {
    position: relative;
	background: var(--bgcolor);
	box-shadow: 3px 3px 6px rgba(0,0,0,0.12);
    border-radius: 40px;    
    display: none;
    margin: auto;
    animation: scale_in_small 320ms both;
    animation-timing-function: ease-out;
    animation-delay: 230ms;
}

.close {
    position: absolute;
    top: 20px; right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 20px;
    cursor: pointer;
    transition: 230ms ease-out;
    z-index: 100;
}

.close span {
    width: 20px;
    height: 20px;
    display: block;
    margin: 10px;
    background-image: url(../img/sprite.svg);
    background-position: -35px -755px;
    transition: transform 230ms ease-out;
}
@media screen and (min-width: 768px) {
    .close:hover span {transform: rotate(90deg);}
}


/* /////////////////  MODAL_FORM  //////////////// */
.modal[data-modal="modal_form"] {    
    padding: 30px;
    flex-flow: column;
    justify-content: flex-start;
    max-height: calc(100vh - 100px);
    overflow-y: scroll;
}

.modal[data-modal="modal_form"]::-webkit-scrollbar {
    width: 5px;
    margin-right: -50px;
}
.modal[data-modal="modal_form"]::-webkit-scrollbar-track {background: transparent;}
.modal[data-modal="modal_form"]::-webkit-scrollbar-thumb {
    background: var(--maincolor);
    border-radius: 5px;
}



.modal.recall {width: min(360px, 100% - 100px);}
.modal.first_request {width: min(500px, 100% - 100px);}

.modal[data-modal="modal_form"] .block_heading {margin-bottom: 10px;}
.modal[data-modal="modal_form"] p.desc {
    font-size: 16px;
    line-height: 1.2;
    font-weight: 400;
    margin-bottom: 10px;
}
.modal[data-modal="modal_form"] form {margin-top: 10px;}


/* ************************ 768 ************************ */
@media screen and (max-width: 768px) {
    .modal {
        border-radius: 20px;
        max-height: calc(100lvh - 80px);
        overflow-y: scroll;
    }
    .modal .close {
        top: 10px; right: 10px;
        width: 30px; height: 30px;
        border-radius: 15px;
    }
    .modal .close span {margin: 5px;}

    .modal[data-modal="modal_form"] {padding: 20px;}
    .modal.recall {width: calc(100% - 60px);}
    .modal.first_request {width: calc(100% - 60px);}

    .modal[data-modal="modal_form"] .block_heading {margin-bottom: 6px;}
    .modal[data-modal="modal_form"] p.desc {
        font-size: 14px;
        line-height: 1.15;
        margin-bottom: 6px;
    }
    .modal[data-modal="modal_form"] form {margin-top: 10px;}

    form input,
    form textarea {
        width: calc(100% - 20px);
        padding: 5px 10px;
        border-radius: 13px;
        font-size: 14px;
        line-height: 16px;
    }
    form textarea {height: 60px;}

    form button {
        font-size: 14px;
        margin-top: 6px;
    }




    .form_fields_wrapper {gap: 10px;}
    .form_field p {font-size: 14px;}


    p.politika {
        font-size: 10px;
        margin-top: 6px;
    }

}