/* Base Styles - Matching Original */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8f9fa;
    margin: 0;
    padding: 20px;
}

/* Card Container */
.card {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.card-body {
    padding: 40px;
}

/* Calendar Title */
.calendar-title {
    text-align: center;
    font-size: 1.5em;
    margin-bottom: 30px;
    color: #333;
}

/* Calendar Styles */
#calendar {
    margin-top: 20px;
}

.fc-event {
    cursor: pointer;
    transition: opacity 0.2s;
}

.fc-event:hover {
    opacity: 0.8;
}

.fc-list-event-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Bulletin View */
#bulletin-container {
    max-width: 900px;
}

.bulletin-navigation {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.bulletin-day {
    margin-bottom: 30px;
}

.bulletin-date {
    font-size: 1.3em;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #007bff;
}

.bulletin-event {
    padding: 15px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.bulletin-event:hover {
    background-color: #e9ecef;
}

.bulletin-event-title {
    font-weight: 600;
    font-size: 1.1em;
    margin-bottom: 5px;
}

.bulletin-event-time {
    color: #666;
    font-size: 0.95em;
}

/* Event Detail Overlay (replaces Bootstrap modal) */
.event-detail-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 10000;
    overflow-y: auto;
    animation: fadeIn 0.2s ease-in-out;
    backdrop-filter: blur(2px);
}

.event-detail-overlay.active {
    display: block !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.event-detail-container {
    position: relative;
    max-width: 600px;
    margin: 50px auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    border: 3px solid #007bff;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-detail-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.2s, color 0.2s;
    z-index: 10;
}

.close-detail-btn:hover {
    background-color: #f8f9fa;
    color: #333;
}

.event-detail-content {
    padding: 40px;
}

.event-title {
    font-size: 1.8em;
    color: #333;
    margin-bottom: 30px;
    margin-top: 0;
    padding-right: 40px;
}

.event-info {
    margin-bottom: 30px;
}

.info-row {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid #e9ecef;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    width: 120px;
    flex-shrink: 0;
    color: #555;
}

.info-value {
    flex: 1;
    color: #333;
}

.event-detail-footer {
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.text-muted {
    color: #6c757d;
    font-size: 0.9em;
    font-style: italic;
    margin: 0;
}

/* Event Type Colors */
.event-type-meeting {
    color: #007bff;
}

.event-type-service {
    color: #28a745;
}

.event-type-workshop {
    color: #ffc107;
}

.event-type-default {
    color: #6c757d;
}

/* FullCalendar Header Buttons */
.fc-header-toolbar {
    margin-bottom: 1.5em !important;
}

.fc-toolbar-chunk {
    display: flex;
    align-items: center;
}

.fc .fc-button {
    padding: 0.4em 0.65em !important;
    font-size: 0.9em !important;
}

/* Responsive Design */
@media (max-width: 767px) {
    body {
        padding: 10px;
    }

    .card-body {
        padding: 20px;
    }

    .calendar-title {
        font-size: 1.2em;
    }

    .fc-list-event-title {
        white-space: normal;
    }

    /* Fix FullCalendar mobile toolbar spacing */
    .fc-header-toolbar {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        margin-bottom: 1em !important;
    }

    .fc-toolbar-chunk {
        width: 100%;
        justify-content: center;
    }

    .fc .fc-button {
        padding: 0.5em 0.8em !important;
        font-size: 0.85em !important;
        margin: 0 2px !important;
    }

    .fc .fc-button-group {
        display: flex;
    }

    .event-detail-container {
        margin: 20px;
        max-width: calc(100% - 40px);
    }

    .event-detail-content {
        padding: 30px 20px;
    }

    .event-title {
        font-size: 1.4em;
    }

    .info-row {
        flex-direction: column;
    }

    .info-label {
        margin-bottom: 5px;
        width: 100%;
    }

    .bulletin-navigation {
        flex-direction: column;
        gap: 10px;
    }

    .bulletin-navigation .btn {
        width: 100%;
    }
}

/* Loading State */
.loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.2s;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}
