/* CALENDAR CONTAINER */
#calendar {
    max-height: 400px;
    margin: 20px auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 10px;
    box-sizing: border-box;
    overflow: hidden;
}
.fc,
.fc-list,
.fc-scroller {
    background: white;
}
/* BODY */
body {
    font-family: system-ui, sans-serif;
    margin: 0;
}
/* ========================= */
/* MODAL STYLING */
.modal {
    display: none;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
}
.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    margin: auto;
    position: relative;
}
.close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
}
.close:hover {
    color: #333;
}
h2 {
    margin-top: 0;
    color: #1e40af;
}
/* ========================= */
/* FULLCALENDAR EVENT STYLING */
.fc-event .fc-event-time {
    display: block;
    font-weight: bold;
    margin-bottom: 2px;
    line-height: 1.2;
}
.fc-event .fc-event-title {
    display: block;
    white-space: normal;
    line-height: 1.2;
    font-size: 0.9rem;
}
.fc-event {
    padding: 2px 4px;
    height: auto;
}
.fc {
    height: auto;
}
/* ========================= */
.fc-header-toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
}
.fc-header-toolbar .fc-toolbar-chunk:first-child {
    display: flex;
    justify-content: flex-start;
}
.fc-header-toolbar .fc-toolbar-chunk:nth-child(2) {
    display: flex;
    justify-content: center;
}
.fc-header-toolbar .fc-toolbar-chunk:last-child {
    display: flex;
    justify-content: flex-end;
}
/* ========================= */
/* MOBILE RESPONSIVENESS */
@media (max-width: 600px) {
    #calendar {
        max-width: 100%;
        padding: 5px;
    }
    .modal-content {
        width: 95%;
        padding: 1rem;
        max-height: 95vh;
        border-radius: 8px;
    }
    .close {
        top: 8px;
        right: 10px;
        font-size: 22px;
    }
    .fc-event .fc-event-title {
        font-size: 0.85rem;
        line-height: 1.1;
    }
    .fc-event .fc-event-time {
        font-size: 0.85rem;
    }
    .fc .fc-scrollgrid {
        overflow-x: hidden;
    }
}
