/* Event Calendar styling — shared by /admin/events/calendar and the public /events page.
   Plan 24 / Plan 25. */

.events-calendar-page .filter-panel {
    background: #f6f8fa;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #e0e4e8;
}
.events-calendar-page .filter-panel h5 {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    color: #333;
}
.events-calendar-page .filter-panel label {
    font-weight: 600;
    margin-top: 0.5rem;
    margin-bottom: 0.15rem;
    font-size: 0.85rem;
}
.events-calendar-page .filter-panel select,
.events-calendar-page .filter-panel input {
    font-size: 0.9rem;
}

/* Type-color legend */
.events-calendar-legend { margin-top: 1rem; font-size: 0.8rem; }
.events-calendar-legend .legend-item {
    display: inline-block;
    margin-right: 0.75rem;
    line-height: 1.6;
}
.events-calendar-legend .legend-swatch {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 2px;
    margin-right: 4px;
    vertical-align: middle;
}

/* FullCalendar overrides to match SWBNO admin look */
.fc {
    font-family: inherit;
}
.fc .fc-toolbar-title {
    font-size: 1.25rem !important;
    font-weight: 600;
}
.fc .fc-button {
    background-color: #0066CC !important;
    border-color: #0052A3 !important;
    box-shadow: none;
}
.fc .fc-button:hover {
    background-color: #0052A3 !important;
}
.fc .fc-button-active,
.fc .fc-button-primary:not(:disabled).fc-button-active {
    background-color: #003F7D !important;
    border-color: #003F7D !important;
}
.fc .fc-event {
    font-size: 0.85rem;
    padding: 2px 4px;
    cursor: pointer;
}
.fc .fc-event.event-cancelled {
    text-decoration: line-through;
    opacity: 0.65;
}
.fc .fc-event.event-postponed {
    background-image: repeating-linear-gradient(
        45deg, transparent, transparent 4px,
        rgba(255, 255, 255, 0.2) 4px, rgba(255, 255, 255, 0.2) 8px);
}
.fc .fc-day-today {
    background-color: rgba(0, 102, 204, 0.05) !important;
}

/* Empty-day list view nicety */
.fc .fc-list-empty {
    color: #888;
    font-style: italic;
}

@media (max-width: 768px) {
    .events-calendar-page .filter-panel {
        margin-bottom: 1rem;
    }
}

/* Combined Events + Board Meetings calendar controls (/Events/Calendar) */
.combined-calendar-categories { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; }
.combined-calendar-categories .cal-cat-label { display: inline-flex; align-items: center; gap: .35rem; margin: 0; font-size: .9rem; cursor: pointer; }
.combined-calendar-categories .cal-cat-swatch { display: inline-block; width: .8rem; height: .8rem; border-radius: 2px; }

/* Responsive filter sidebar → modal (all public event calendars) */
@media (min-width: 992px) {
    .calendar-filters-toggle { display: none; }
    .calendar-filters-close { display: none; }
    /* The site's Bootstrap CSS is purged and dropped the (previously unused) .col-lg-9
       rule, so the calendar column falls back to col-12 (100%) and wraps below the
       filter sidebar. Restore the 9/12 desktop width for the calendar pages. */
    .events-calendar-page .col-lg-9 { flex: 0 0 75%; max-width: 75%; }
}
@media (max-width: 991.98px) {
    .calendar-filters-col {
        position: fixed;
        inset: 0;
        z-index: 1080;
        background: rgba(0, 0, 0, .5);
        display: none;
        overflow-y: auto;
        padding: 1rem;
    }
    .calendar-filters-col.is-open { display: block; }
    .calendar-filters-col .filter-panel {
        max-width: 400px;
        margin: 1.5rem auto;
        position: relative;
    }
    .calendar-filters-close {
        position: absolute;
        top: .4rem;
        right: .5rem;
        border: none;
        background: transparent;
        font-size: 1.4rem;
        line-height: 1;
        cursor: pointer;
        color: #555;
    }
}

/* Month grid: events with a defined start AND end show no time — the time only
   renders for point-in-time events. (combined-calendar.js adds .fc-has-end.) */
.fc-dayGridMonth-view .fc-has-end .fc-event-time {
    display: none;
}
