.modal {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: none;
    justify-content: center;
    align-items: flex-start; /* or center */
    z-index: 1000; /* depending on what z-index values exist in your page, in order for the modal layer to sit on top of other content */
    overflow: auto; /* enable scrolling if needed - although this is not really necessary since we are going take care of overflow in modal-content */
    background-color: rgba(0,0,0,0.8);
}
.modal.modal-show {
    animation: fadeIn 0.1s ease-in-out forwards;
}
.modal.modal-hide {
    animation: fadeOut 0.1s ease-in-out 0.1s forwards;
}
.modal-content {
    position: relative;
    background-color: #fff;
    margin: 2rem;
    padding: 2rem;
    border-radius: 0.25rem;
    width: 50%;
    max-height: 75%;
    overflow: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.modal.modal-show .modal-content {
    animation: fadeInDown 0.3s ease-in-out forwards;
}
.modal.modal-hide .modal-content {
    animation: fadeOutUp 0.2s ease-in-out forwards;
}
.modal-content h1 {
    text-align: center;
    margin-bottom: 2rem;
}
.modal-content p {
    margin: 1rem 0;
    line-height: 1.5rem;
}
.modal-close {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 1.75rem;
    font-weight: bold;
    padding: 0 0.75rem;
    /* width: 2rem;
    height: 2rem;
    display: flex;
    justify-content: center;
    align-items: center; */
    color: rgba(0,0,0,0.2);
    cursor: pointer;
    user-select: none;
}
.modal-close:hover, .modal-close:focus {
    color: rgba(0,0,0,0.5);
}

/* Animations */
@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}
@keyframes fadeOut {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}
@keyframes fadeInDown {
    0% {
        opacity: 0;
        transform: translateY(-3rem);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes fadeOutUp {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-3rem);
    }
}

@media(max-width: 992px) {
    .modal-content { width: 80%; }
}
@media(max-width:767px) {
    .modal-content { padding: 2rem 1rem 1rem 1rem; width: 90%; }
    .modal-content h1 { margin-bottom: 1.5rem; }
}
