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

.modal {
    position: relative;
    width: min(366px, 100% - 20px);
	background: #fff;
    border-radius: 10px;
    display: none;
    margin: auto;
    padding: 20px 0;
    flex-flow: column;    
	box-shadow: 0px 4px 23px rgba(0,0,0,0.12);
    animation: opacity_in 120ms both;
    animation-timing-function: ease-out;
    animation-delay: 120ms;
}



.modal_header,
.modal_body {
    position: relative;
    width: calc(100% - 40px);
    padding: 0 20px;
}
.modal .close {
    position: absolute;
    top: 0;
    right: 20px;
    width: 32px;
    height: 32px;
    transform: rotate(45deg);
    cursor: pointer;
    z-index: 9;
}
.modal .close span {
    position: absolute;
    background-color: var(--blue);
    border-radius: 2px;
}
.modal .close span:first-child {
    top: 0; left: 50%;
    transform: translateX(-2px);
    width: 4px;
    height: 100%;
}
.modal .close span:last-child {
    top: 50%; left: 0;
    transform: translateY(-2px);
    width: 100%;
    height: 4px;
}


.modal h2,
.modal h4,
.modal h4 span {color: var(--blue);}
.modal form>div {margin-bottom: 10px;} 



.modal.big_image {    
    width: auto;
    max-width: 90vw;
    max-height: 90vh;  
    padding: 20px;
    user-select: none; 
}
.modal.big_image .close {
    top: 20px;
    background-color: rgba(255,255,255,0.8);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.8);
    border-radius: 16px;
    transition: 230ms ease-out;
}  

.modal.big_image .close:hover {transform: rotate(135deg);}


.modal.big_image .img {
    background-size: cover;
    background-position: center;
}

.modal.big_image .arrow {border-radius: 30px;}
.modal.big_image .arrow:hover {background-color: rgba(255,255,255,0.8);}
.modal.big_image .arrow svg path {stroke: var(--blue);}






.back_button {
    padding: 3px 16px 5px;
    border-radius: 4px;
    background-color: var(--blue);
    color: var(--lightgray);
    transition: 120ms ease-out; 

}

.back_button:hover {background-color: var(--darkblue);}

