/* View Toggle Styles */
.mod-events-view-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
}

.mod-events-view-toggle .view-toggle-label {
    font-weight: 500;
    color: #333;
}

.mod-events-view-toggle .btn-group {
    display: flex;
}

.mod-events-view-toggle .btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: #f8f9fa;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.mod-events-view-toggle .btn:hover {
    background: #e9ecef;
}

.mod-events-view-toggle .btn:first-child {
    border-radius: 4px 0 0 4px;
}

.mod-events-view-toggle .btn:last-child {
    border-radius: 0 4px 4px 0;
    border-left: none;
}

.mod-events-view-toggle .btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.mod-events-view-toggle .btn.active:hover {
    background: #0056b3;
    border-color: #0056b3;
}

/* Calendar and List View Containers */
#mod-events-calendar-view {
    display: none;
    min-height: 400px;
}

#mod-events-calendar-view.active {
    display: block;
}

#mod-events-list-view {
    display: none;
}

#mod-events-list-view.active {
    display: block;
}

/* Calendar Container */
#mod-events-calendar {
    margin-top: 10px;
}

/* Calendar Legend */
.mod-events-calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.mod-events-calendar-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.mod-events-calendar-legend .legend-color {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 1px solid rgba(0,0,0,0.2);
}

.mod-events-calendar-legend .legend-color.event-virtual {
    background-color: #17a2b8;
}

.mod-events-calendar-legend .legend-color.event-inperson {
    background-color: #28a745;
}

.mod-events-calendar-legend .legend-color.event-hybrid {
    background-color: #ffc107;
}

.mod-events-calendar-legend .legend-color.event-default {
    background-color: #6c757d;
}

.mod-events-calendar-legend .legend-label {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

/* Event color coding by attendance format */
.fc-event.event-virtual {
    background-color: #17a2b8;
    border-color: #117a8b;
}

.fc-event.event-inperson {
    background-color: #28a745;
    border-color: #1e7e34;
}

.fc-event.event-hybrid {
    background-color: #ffc107;
    border-color: #e0a800;
    color: #000;
}

.fc-event.event-default {
    background-color: #6c757d;
    border-color: #545b62;
}

/* Event hover effects */
.fc-event:hover {
    opacity: 0.9;
}

/* FullCalendar customization */
.fc .fc-toolbar-title {
    font-size: 1.5em;
    font-weight: 600;
}

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

.fc .fc-button-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.fc .fc-button-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.fc .fc-button-primary:disabled {
    background-color: #6c757d;
    border-color: #6c757d;
}

/* Responsive */
@media (max-width: 768px) {
    .fc .fc-toolbar {
        flex-direction: column;
        gap: 10px;
    }

    .fc .fc-toolbar > * {
        display: flex;
        justify-content: center;
    }

    .mod-events-view-toggle {
        flex-direction: column;
        align-items: stretch;
    }

    .mod-events-view-toggle .view-toggle-label {
        text-align: center;
    }

    .mod-events-view-toggle .btn-group {
        justify-content: center;
    }

    .fc .fc-toolbar-title {
        font-size: 1.2em;
    }

    .mod-events-calendar-legend {
        justify-content: center;
        gap: 10px;
    }

    .mod-events-calendar-legend .legend-label {
        font-size: 13px;
    }
}

/* Loading state */
.mod-events-calendar-loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.mod-events-calendar-loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60%, 100% {
        content: '...';
    }
}
