/* --- Modal Styling --- */

/* The dark background overlay */
.modal-overlay {
    position: fixed; /* Stay in place even when scrolling */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Semi-transparent black */
    z-index: 1000; /* Sit on top of everything else */
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
}

/* When the modal is active, we change its display property */
.modal-overlay.active {
    display: flex; /* Use flexbox to easily center the content */
}

/* The white box containing the modal content */
.modal-content {
    background-color: #fff;
    padding: 20px 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    width: 90%;
    max-width: 600px; /* Adjust max-width as needed */
    max-height: 90vh; /* Max height to prevent overflow on small screens */
    overflow-y: auto; /* Add scroll if content is too long */
}

/* Modal header styling */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

/* The 'X' close button */
.close-modal-button {
    background: none;
    border: none;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    color: #888;
    padding: 0;
    line-height: 1;
}

.close-modal-button:hover {
    color: #000;
}

/* Optional: Style for the trigger button */
.open-modal-button {
    cursor: pointer;
    padding: 10px 15px;
    border: 1px solid #ccc;
    background-color: #f7f7f7;
    border-radius: 4px;
}