/* ============================================================
   Community Calendar – Styles
   ============================================================ */

/* Filters bar */
.calendar-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.25rem;
    margin-bottom: 1.25rem;
}

.calendar-filters label {
    font-weight: 600;
    font-size: 0.9rem;
}

.calendar-filters select {
    padding: 0.35rem 0.6rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9rem;
    min-width: 160px;
}

.calendar-filters button {
    padding: 0.35rem 0.85rem;
    background: #eee;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.calendar-filters button:hover {
    background: #ddd;
}

/* Calendar container */
#community-calendar {
    max-width: 100%;
}

/* Submit link */
.calendar-submit-link {
    display: inline-block;
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* ============================================================
   Event Modal
   ============================================================ */
#event-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: #fff;
    border-radius: 8px;
    padding: 2rem;
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    font-size: 1.5rem;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
    color: #555;
}

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

.modal-content h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.35rem;
}

.modal-content p {
    margin: 0.3rem 0;
    font-size: 0.95rem;
}

.modal-content p strong {
    display: inline-block;
    min-width: 90px;
}

#modal-description {
    margin-top: 0.75rem;
    color: #444;
    line-height: 1.5;
    font-size: 0.9rem;
}

/* Add-to-calendar buttons */
#add-to-calendar-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

.btn-calendar {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    border-radius: 4px;
    font-size: 0.85rem;
    text-decoration: none;
    color: #fff;
    font-weight: 600;
}

.btn-google  { background: #4285f4; }
.btn-outlook { background: #0078d4; }
.btn-ics     { background: #555; }

.btn-calendar:hover {
    opacity: 0.88;
}

/* Registration / online links */
.modal-content .btn-register {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.4rem 1rem;
    background: #1a7f44;
    color: #fff;
    border-radius: 4px;
    font-size: 0.9rem;
    text-decoration: none;
    font-weight: 600;
}

.modal-content .btn-register:hover {
    background: #155f33;
}

/* Print calendar button */
.print-calendar-btn {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.4rem 1rem;
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

/* ============================================================
   Category color coding (add more as needed)
   ============================================================ */
.fc-event.cat-workshop  { background-color: #4e79a7; border-color: #3a5f8a; }
.fc-event.cat-social    { background-color: #59a14f; border-color: #3f7a37; }
.fc-event.cat-fundraiser { background-color: #e15759; border-color: #b83c3e; }
.fc-event.cat-meeting   { background-color: #f28e2b; border-color: #c06d16; }
.fc-event.cat-arts      { background-color: #b07aa1; border-color: #8a5b7c; }

/* ============================================================
   Print styles
   ============================================================ */
@media print {
    .calendar-filters,
    .site-header,
    .site-footer,
    #event-modal,
    .btn-calendar,
    .print-calendar-btn,
    .calendar-submit-link {
        display: none !important;
    }

    #community-calendar {
        width: 100%;
        font-size: 9pt;
    }

    .fc-event {
        background: white !important;
        border-left: 3px solid #333 !important;
        color: black !important;
        page-break-inside: avoid;
    }
}
