56 lines
1.0 KiB
CSS

.modal {
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100vh;
z-index: 99998;
background-color: rgba(0, 0, 0, 0.7 );
display: grid;
align-items: center;
justify-content: center;
overflow-y: auto;
visibility: hidden;
opacity: 0;
transition: opacity .4s, visibility .4s;
}
.modal-box {
position: relative;
max-width: 500px;
padding: 50px;
z-index: 1;
margin: 30px 15px;
background-color: white;
border-radius: 15px;
box-shadow: 0px 0px 30px 10px rgba(0, 0, 0, 0.15);
transform: scale(0);
transition: transform .8s;
}
.modal-close {
position: absolute;
top: 8px;
right: 8px;
border: none;
background-color: transparent;
padding: 5px;
cursor: pointer;
}
.modal-close svg path {
transition: fill .4s;
}
.modal-close:hover svg path {
fill: rgb(175, 0, 0);
}
.modal.open {
visibility: visible;
opacity: 1;
}
.modal.open .modal-box {
transform: scale(1);
}