
.modalbackground {
margin: 0; /* убираем отступы */
padding: 0; /* убираем отступы */
position: fixed; /* фиксируем положение */
top:0; /* растягиваем блок по всему экрану */
bottom:0;
left:0;
right:0;
background: rgba(0,0,0,0.5); /* полупрозрачный цвет фона */
z-index:100; /* выводим фон поверх всех слоев на странице браузера */
opacity:0; /* Делаем невидимым */
pointer-events: none; /* элемент невидим для событий мыши */
display: flex;
}

/* при отображении модального окно - именно здесь начинается магия */
.modalbackground:target {
    opacity: 1; /* делаем окно видимым */ 
    pointer-events: auto; /* элемент видим для событий мыши */
}

/* ширина диалогового окна и его отступы от экрана */
.modalwindow {
	width: 500px;
	max-width: 900px;
	margin: auto;
    color:#404d4d;
	background: #fff;
	border-radius: 4px;
    padding-bottom: 20px;
    border-radius: var(--border-radius);
}

/* настройка заголовка */
.modalwindow h4 {
    margin: 0;
    color:#444444;
    padding-left:15px;
}



.m-header{
    display: flex;
    align-items:center;
    justify-content: space-between;
    /*padding: 10px;*/
    border-radius: 3px 3px 0px 0px;
    margin-bottom:15px;
    padding-top: 5px;
}


.m-close{
    font-size: 5rem;
    line-height: 1;
    color: #fdfdfd;
    text-decoration: none;
    margin-right: 10px;
    position: absolute;
    margin-left: 510px;
    margin-top: 15px;
    border-radius: var(--border-radius);
}

.m-close:hover{
     background: none;
     text-decoration: none;
    color: #b2b2b2;
}

.m-body{
    padding-left: 15px;
    padding-right: 15px;
    padding-bottom: 15px;
    box-sizing:border-box;
    /*padding-top: 30px;*/
}

.m-body h3{
    color:#444444;
    font-size: 26px;
    /*margin-top: -40px;*/
    margin-bottom: 20px;
}



@media screen and (max-width: 576px) {

    .modalwindow {
        width: 90% !important;
        border-radius: 6px;
        box-sizing: border-box;
    }

    .chek{
        position: absolute;

    }
    .m-close{
        background: none;
        font-size: 2rem;
        font-weight: 700;
        line-height: 1;
        color: #000;
        text-shadow: 0 1px 0 #fff;
        text-decoration: none;
        margin-right: 10px;
        position: relative;
        margin: 0px;
        top: -5px;
        left: -5px;
    }

}