.my_modal{
position: fixed;
z-index: 10;
width: 50vw;
height: auto;
left: 25vw;
top: 50vh;
background: white;
transform: translateY(-25%);
padding: .5rem;
border: 1px solid silver;
box-shadow: 4px 4px 8px #0002;
border-radius: 5px;
opacity: 0;
pointer-events: none;
transition: all 200ms ease-out;

display: flex;
flex-direction: column;
}
.my_modal.visivel{
opacity: 1;
pointer-events: initial;
transform: translateY(-50%);
z-index: 9999;
}

.my_modal > header{
width: 100% !important;
height: 40px;	
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid #0001;
box-sizing: border-box;
padding: 0 10px;
margin-bottom: 10px;
}

.my_modal > .corpo-modal{
width: 100%;	
padding: .5em 10px;
height: auto;
padding-bottom: 10px;
}

.my_modal > footer{
display: flex;
justify-content: flex-end;
border-top: 1px solid #0001;
padding-top: 0.75em;
}

span.fechar-modal{
background: #fff;
border: 1px solid tomato;
border-radius: 50%;
display: block;
width: 1.50em;
height: 1.50em;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
color: tomato;
font-size: 1em;
font-weight: bold;
}

.my_modal > footer button{
width: 100px;
height: 25px;
cursor: pointer;
border: 1px solid #ccc;
margin: 0 5px;
}

#mascara{
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background:black;
opacity: 0;
z-index: 999;
pointer-events: none;
}
/*pointer-events = n responde a eventos do mouse*/
/* ~ = que tenha um irmão anterior ou posterior a mascara*/
.my_modal.visivel ~ #mascara{
opacity: 0.5;
pointer-events: initial;
}

@media(max-width: 560px){
.my_modal{width: 80vw;left: 10vw;}
span.fechar-modal{width: 2.5em;height: 2em;font-size: .9em;
}
}