/**
 * TMD Calendar Styles
 *
 * Custom styles for the TMD events calendar.
 */

/* Calendar container */
.tmd-calendar-container {
    position: relative;
    margin-bottom: 2rem;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 0.75rem;
}

@media (min-width: 768px) {
    .tmd-calendar-container {
        padding: 1rem;
    }
}

@media (min-width: 992px) {
    .tmd-calendar-container {
        padding: 1.5rem;
    }
}

/* Event type legend */
.calendar-legend-container {
    background: #f8f9fb;
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    border: 1px solid #e9ecef;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.calendar-legend-container h5 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.legend-items {
    gap: 0.75rem;
}

.legend-item {
    display: flex;
    align-items: center;
    white-space: nowrap;
    padding: 0.15rem 0.35rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #e9ecef;
}

.legend-color {
    width: 1rem;
    height: 1rem;
    border-radius: 0.25rem;
    margin-right: 8px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.legend-label {
    font-size: 0.875rem;
    color: #495057;
    font-weight: 500;
}

.fc .fc-toolbar.fc-header-toolbar {
    margin-bottom: 1rem;
    padding: 0.25rem 0.5rem;
    background: #f8f9fb;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
}

.fc .fc-toolbar-title {
    font-size: 1.1rem;
    font-weight: 700;
}

.fc .fc-button-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
    box-shadow: none;
}

.fc .fc-button-primary:hover,
.fc .fc-button-primary:focus {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

.fc-theme-standard td,
.fc-theme-standard th {
    border-color: #e9ecef;
}

.fc-daygrid-day-number {
    color: #495057;
    font-weight: 600;
}

/* Event type filter */
#event-type {
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

#event-type:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.reset-filters {
    font-size: 0.875rem;
}

/* Loading indicator */
.calendar-loading {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    background: rgba(255, 255, 255, 0.8);
    padding: 1rem;
    border-radius: 0.25rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Error message */
.calendar-error-message {
    margin-bottom: 1rem;
}

/* Event styles */
.fc-event {
    cursor: pointer;
    transition: transform 0.1s ease;
}

.fc-event:hover {
    transform: scale(1.02);
}

/* Featured event styling */
.badge-featured {
    background-color: #e63946;
    color: white;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

/* Event tooltip */
.fc-event-tooltip {
    max-width: 250px;
}

.fc-event-tooltip p {
    margin: 0.25rem 0;
}

/* Media queries for responsive layout */
@media (max-width: 768px) {
    .calendar-filters-container .form-inline {
        flex-direction: column;
        align-items: flex-start;
    }

    .calendar-filters-container .form-group {
        margin-bottom: 0.5rem;
        width: 100%;
    }

    .calendar-filters-container select {
        width: 100%;
    }

    .fc-header-toolbar {
        flex-direction: column;
    }

    .fc-toolbar-chunk {
        margin-bottom: 0.5rem;
    }
}