/* 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) !important; /* Fallback color */
    background-color: rgba(0, 0, 0, 0.4) !important; /* Black w/ opacity */
    opacity: 0;
    transition: opacity 1s;
    justify-content: center;
    align-items: center;
    color-scheme: light;

}

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

    border-radius: 15px; /* Rounded corners */

    color-scheme: light;

    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08); /* Optional soft shadow */
}


/* Dark Mode Styles */
.modal.dark {
    background-color: rgba(0, 0, 0, 0.8) !important; /* Dark overlay */
    color-scheme: dark;
}

.modal-content.dark {
    background-color: #192132 !important; /* Dark background for modal content */
    color: #a3adc2 !important; /* Light text color for readability */
    color-scheme: dark;
    border-radius: 15px; /* Maintain rounded corners for dark mode */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08); /* Optional soft shadow */
}

/* The Close Button */
.close {
    color: #3f4643;
    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 */
    }
}