/* Контейнер календаря */
#calendar {
    max-width: 100%;
    margin: 0 auto;
}

/* Стили для календаря */
.fc {
    font-size: 0.75em;
}

/* Компактная карточка */
.card-body {
    padding: 0.5rem !important;
}

/* Заголовок календаря */
.fc .fc-toolbar-title {
    font-size: 1.1em;
    margin: 0.3em 0;
}

/* Заголовки дней недели */
.fc .fc-col-header-cell-cushion {
    padding: 2px 4px;
    font-weight: 500;
    font-size: 0.85em;
}

/* Основной контейнер календаря */
#calendar {
    font-size: 0.9em;
    min-height: 600px;
}

/* Заголовок календаря */
.fc .fc-toolbar-title {
    font-size: 1.2em;
    margin: 0.5em 0;
}

/* Ячейки времени */
.fc-timegrid-slot {
    height: 30px;
    border-bottom: 1px solid #ddd;
}

.fc-timegrid-slot-label {
    font-size: 0.8em;
    padding: 2px 4px;
    line-height: 1.2;
    white-space: nowrap;
}

/* Дни недели */
.fc-col-header-cell {
    padding: 4px 0;
    font-weight: 500;
}

.fc-col-header-cell-cushion {
    padding: 4px;
    font-size: 0.85em;
    white-space: nowrap;
}

/* Стили для событий */
.fc-event {
    cursor: pointer !important;
    border: none;
    border-radius: 2px;
    margin: 0 1px;
    padding: 0 1px;
    font-size: 0.8em;
    pointer-events: all !important;
    line-height: 1.2;
}

/* Заголовок события */
.fc-event-title {
    padding: 1px 2px;
    font-size: 0.85em;
}

/* Доступное время */
.fc-event-available,
.fc-event.fc-event-available {
    background-color: #28a745 !important; /* Зеленый */
    border-color: #28a745 !important;
    color: white !important;
    opacity: 1 !important;
}

/* Занятое время */
.fc-event-booked,
.fc-event.fc-event-booked {
    background-color: #dc3545 !important; /* Красный */
    border-color: #dc3545 !important;
    color: white !important;
    opacity: 1 !important;
}

/* Недоступное время */
.fc-event-unavailable {
    background-color: #f5f5f5 !important;
    color: #999 !important;
    pointer-events: none;
}

/* Текущее время */
.fc-timegrid-now-indicator-arrow {
    margin-top: -4px;
}

.fc-timegrid-now-indicator-line {
    border-width: 2px 0 0;
}

/* Выделение текущего дня */
.fc-timegrid-col.fc-day-today {
    background-color: rgba(255, 220, 40, 0.1);
}

/* Компактные ячейки */
.fc-timegrid-slot-minor {
    border-top-style: none;
}

/* Уменьшаем отступы в колонках */
.fc-timegrid-axis {
    width: 35px !important;
}

/* Уменьшаем отступы в колонках дней */
.fc-col-header-cell {
    padding: 3px 0;
}

/* Компактные линии времени */
.fc-timegrid-slot-lane {
    /* Высота рассчитывается автоматически */
}

/* Уменьшаем padding в теле календаря */
.fc-timegrid-body {
    min-height: 300px;
}

/* Компактное отображение колонок */
.fc-timegrid-col {
    min-width: 60px;
}

/* Уменьшаем отступы между событиями */
.fc-timegrid-event-harness {
    margin: 0 !important;
}

/* Убираем лишние отступы */
.fc-scrollgrid-sync-inner {
    padding: 1px 2px;
}

/* Кнопки навигации */
.fc-button {
    padding: 0.2em 0.5em !important;
    font-size: 0.9em !important;
}

/* Уменьшаем отступы в toolbar */
.fc-toolbar {
    margin-bottom: 0.5em !important;
}

/* Адаптивность */
@media (max-width: 768px) {
    .fc-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .fc-toolbar-chunk {
        margin-bottom: 3px;
    }
    
    .fc .fc-toolbar-title {
        font-size: 0.95em;
    }
    
    .fc-event {
        font-size: 0.65em;
    }
}
