.modal {
    visibility: hidden; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.5); /* Black with opacity */
    opacity: 0; /* Start fully transparent */
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out; /* Smooth transition */
}

/* Modal Content */
.modal-content {
    background-color: #fefefe;
    margin: auto; /* Center the modal */
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* Could be more or less, depending on screen size */
    max-width: 500px; /* Maximum width */
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    position: absolute; /* Position the modal */
    top: 50%; /* Move the modal down by 50% of the viewport height */
    left: 50%; /* Move the modal right by 50% of the viewport width */
    transform: translate(-50%, -50%); /* Adjust the modal's position to center it */
}

/* Close Button */
.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
}

/* Fade-in animation */
.modal.fade-in {
    visibility: visible; /* Make the modal visible */
    opacity: 1; /* Fully opaque */
}

/* Fade-out animation */
.modal.fade-out {
    visibility: visible; /* Keep the modal visible during the fade-out */
    opacity: 0; /* Fully transparent */
}

/* Style for the Cancel button */
.close-modal-btn {
    background-color: #f44336; /* Red color */
    color: white;
    border: none;
    padding: 15px 35px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}

.close-modal-btn:hover {
    background-color: #d32f2f; /* Darker red on hover */
}

.modal-action-btn {
    width: fit-content;
    padding: 15px 40px;
    background-color: #404042;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    line-height: 16px;
}