/* The Modal (background) */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 10000; /* Sit on top */
    padding-top: 100px; /* Location of the box */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
     opacity: 0;
    transition: opacity 1s;
    justify-content: center;
    align-items: center;

}

/* Modal Content */
.modal-content {
    background-color: #fefefe;
    margin: auto;
   /* padding: 20px;*/
    border: 1px solid #888;
    width: 800px;
    min-height: 400px;
}

/* The Close Button */
.close {
    color: #aaaaaa;
    float: right;
    font-size: 28px;
    font-weight: bold;

}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}


.w3-animate-show{

    animation: show 0.8s;
    animation-fill-mode:forwards; // means stop at the last status when animation finished
}
.w3-animate-hide{
    animation: hide 0.8s;
    animation-fill-mode:forwards; // means stop at the last status when animation finished
}
@keyframes hide{
    from {opacity:1; }
    to {opacity:0; }
}

@keyframes show{
    from {opacity:0; }
    to {opacity:1; }

}

@media (max-width: 400px) { /* Adjust the max-width as needed */
    .modal {
        justify-content: center;
        align-items: center;
        padding-top: 10%; /* Adjust as needed for spacing */
    }

    .modal-content {
        background-color: #fefefe;
        margin: auto;
        /* padding: 20px; */
        border: 1px solid #888;
        width: 90%; /* Adjust as needed */
        max-width: 90%; /* Adjust as needed */
        display: flex;
        flex-direction: column;
        justify-content: space-between; /* This centers the buttons vertically */
    }
}