.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    display: flex; /* Use flexbox for centering */
    justify-content: center;
    align-items: center;

    /* Initial state for transition */
    opacity: 0;
    visibility: hidden;
    pointer-events: none; /* Prevent interaction when hidden */
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto; /* Allow interaction when visible */
}

.modal {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 400px;
    text-align: center;
    position: relative;

    /* Initial state for transition */
    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* When the overlay is visible, transition the modal in */
.modal-overlay.visible .modal {
    transform: scale(1);
    opacity: 1;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}

.modal-close:hover {
    color: #333;
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
}
