.calendar {
    width: 100%;
    border-collapse: collapse;
}
.calendar th,
.calendar td {
    width: 14.28%;
    vertical-align: top;
    border: 1px solid #ccc;
    padding: 4px;
}
.calendar td {
    width: 14.28%;
    padding: 4px;
    vertical-align: top;
}

.calendar-cell {
    max-width: 130px; /* Enforced limit for text truncation */
}

.course-card-calendar {
    display: block;
    background-color: #e9f5ff;
    border: 1px solid #a7d0f5;
    border-radius: 6px;
    padding: 4px 6px;
    margin-bottom: 4px;
    font-size: 0.85em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-decoration: none;
    color: inherit;
    max-width: 100%;
    box-sizing: border-box;
}

.category-buttons {
    margin-bottom: 10px;
}
.category-button {
    margin: 0 4px 4px 0;
    padding: 4px 8px;
    text-decoration: none;
    border: 1px solid #aaa;
    border-radius: 4px;
    background: #f4f4f4;
    display: inline-block;
}
.category-button.active-category {
    background: #cce6ff;
    font-weight: bold;
}
.nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.month-label {
    display: inline-block;
    width: 160px; /* wide enough for "September 2025" */
    text-align: center;
    font-weight: bold;
}

.button-link {
    display: inline-block;
    padding: 4px 10px;
    margin-left: 8px;
    background-color: #eee;
    border: 1px solid #ccc;
    border-radius: 4px;
    color: black;
    text-decoration: none;
    font-size: 0.9em;
}
.button-link:hover {
    background-color: #ddd;
}
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}
.modal-content {
    background: white;
    padding: 20px;
    max-width: 600px;
    max-height: 80vh;         /* 👈 limits height to viewport */
    overflow-y: auto;         /* 👈 allows scrolling */
    width: 90%;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 0 10px black;
}
.modal-close {
    position: absolute;
    top: 6px;
    right: 10px;
    font-size: 24px;
    cursor: pointer;
}
