/* Custom styles for the interactive map */

#map {
    width: 100%;
    height: 600px;
    min-height: 400px;
}

/* Custom marker styles */
.custom-marker {
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.custom-marker:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

.marker-fatal {
    background-color: #ef4444;
}

.marker-injured {
    background-color: #f97316;
}

.marker-warning {
    background-color: #eab308;
}

/* Popup styles */
.leaflet-popup-content {
    font-size: 14px;
    line-height: 1.4;
}

.leaflet-popup-content h4 {
    margin: 0 0 8px 0;
    color: #1f2937;
    font-size: 16px;
    font-weight: 600;
}

.leaflet-popup-content p {
    margin: 4px 0;
    color: #4b5563;
}

.leaflet-popup-content .date {
    font-weight: 500;
    color: #2563eb;
}

.leaflet-popup-content .category {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin-top: 8px;
}

.category-fatal {
    background-color: #fef2f2;
    color: #dc2626;
}

.category-injured {
    background-color: #fff7ed;
    color: #ea580c;
}

.category-warning {
    background-color: #fefce8;
    color: #ca8a04;
}

/* Timeline styles */
.timeline-item {
    border-left: 3px solid #e5e7eb;
    padding-left: 16px;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 8px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background-color: #3b82f6;
    border: 2px solid #fff;
}

.timeline-item.fatal::before {
    background-color: #ef4444;
}

.timeline-item.injured::before {
    background-color: #f97316;
}

.timeline-item.warning::before {
    background-color: #eab308;
}

.timeline-item h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
}

.timeline-item p {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
}

/* Loading spinner */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #map {
        height: 400px;
    }
    
    .timeline {
        max-height: 300px;
    }
}

/* Smooth transitions */
.filter-section {
    transition: all 0.3s ease;
}

.filter-section:hover {
    background-color: #f9fafb;
}

/* Custom scrollbar for timeline */
#timeline::-webkit-scrollbar {
    width: 6px;
}

#timeline::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#timeline::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

#timeline::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}