/* Custom Calendar Styles */
:root {
    --fc-border-color: #e5e7eb;
    --fc-button-bg-color: #4f46e5;
    --fc-button-hover-bg-color: #4338ca;
    --fc-button-active-bg-color: #3730a3;
    --fc-event-bg-color: #4f46e5;
    --fc-event-border-color: #4f46e5;
    --fc-today-bg-color: #eef2ff;
}

/* Calendar Container */
#calendar {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Calendar Header */
.fc .fc-toolbar {
    padding: 0.5rem 0 1rem 0;
}

.fc .fc-toolbar-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
}

.fc .fc-button {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
}

.fc .fc-button:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.fc .fc-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Calendar Day Cells */
.fc .fc-daygrid-day {
    cursor: pointer;
    transition: background-color 0.2s;
}

.fc .fc-daygrid-day:hover {
    background-color: #f9fafb;
}

.fc .fc-daygrid-day-number {
    padding: 0.5rem;
    font-weight: 500;
}

.fc .fc-day-today {
    background-color: var(--fc-today-bg-color) !important;
}

.fc .fc-day-today .fc-daygrid-day-number {
    color: #4f46e5;
    font-weight: 700;
}

/* Events */
.fc-event {
    border-radius: 0.375rem;
    padding: 6px 8px !important;
    margin-bottom: 2px !important;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-size: 13px !important;
    line-height: 1.4 !important;
    min-height: 50px !important;
    white-space: normal !important;
    overflow: visible !important;
}

.fc-event:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.fc-event-main {
    padding: 4px !important;
}

.fc-daygrid-event {
    white-space: normal !important;
    align-items: flex-start !important;
}

/* Remove event dots */
.fc-daygrid-event-dot {
    display: none !important;
}

.fc-event-title {
    font-weight: 500;
    font-size: 0.875rem;
    white-space: normal !important;
    word-wrap: break-word !important;
}

.fc-event-time {
    font-size: 0.75rem;
    font-weight: 500 !important;
    display: block !important;
}

/* Event Colors */
.fc-event.booking-confirmed {
    background-color: #10b981;
    border-color: #10b981;
}

.fc-event.booking-pending {
    background-color: #f59e0b;
    border-color: #f59e0b;
}

.fc-event.booking-cancelled {
    background-color: #ef4444;
    border-color: #ef4444;
    opacity: 0.6;
}

.fc-event.class-available {
    background-color: #6366f1;
    border-color: #6366f1;
}

/* Modal Animations */
#classModal {
    animation: fadeIn 0.2s ease-in-out;
}

#classModal > div {
    animation: slideUp 0.3s ease-out;
}

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

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Loading Spinner */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Class Card Styles */
.class-card {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    transition: all 0.2s;
}

.class-card:hover {
    border-color: #4f46e5;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Responsive Calendar */
@media (max-width: 768px) {
    .fc .fc-toolbar {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .fc .fc-toolbar-title {
        font-size: 1.25rem;
    }
    
    .fc .fc-button {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .fc-event-title {
        font-size: 0.75rem;
    }
    
    .fc-event-time {
        font-size: 0.625rem;
    }
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Stats Cards */
.stats-container {
    padding: 0 20px;
}

.stat-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
}

@media (max-width: 768px) {
    .stats-container {
        flex-direction: column;
    }
}
