* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

body {
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: relative;
}

.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
}

.sidebar {
    width: 360px;
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #dee2e6;
    overflow-y: auto;
    position: absolute;
    z-index: 90;
    height: calc(100% - 40px);
    left: 20px;
    top: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 90vh;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* New sidebar-header styles */
.sidebar-header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.sidebar-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.sidebar-header h1 .title-line {
    display: block;
}

.header-subtitle {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 0.25rem;
}

.header-data-source {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: 0.5rem;
}

.header-data-source a {
    color: white;
    text-decoration: underline;
    opacity: 0.9;
}

.header-data-source a:hover {
    opacity: 1;
}

.control-panel, .analysis-panel {
    padding: 1rem;
}

.control-panel {
    border-bottom: 1px solid #dee2e6;
}

h2 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    color: #2c3e50;
}

.filter-group {
    margin-bottom: 0.75rem;
}

.filter-group label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
    color: #495057;
}

.filter-group-label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #495057;
}

/* Dropdown Filter Styles */
.dropdown-filter {
    position: relative;
    width: 100%;
    margin-bottom: 10px;
}

.dropdown-toggle {
    width: 100%;
    padding: 0.5rem;
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.9rem;
    text-align: left;
    cursor: pointer;
    position: relative;
}

.dropdown-toggle::after {
    content: '▼';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    width: 100%;
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid #ced4da;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 100;
    padding: 0.5rem;
    margin-top: 2px;
}

/* Add a subtle separator between items */
.dropdown-content .checkbox-container:not(:last-child) {
    border-bottom: 1px solid rgba(222, 226, 230, 0.4);
    padding-bottom: 0.25rem;
}

.dropdown-filter.active .dropdown-content {
    display: block;
}

.dropdown-filter.active .dropdown-toggle::after {
    content: '▲';
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    font-size: 0.8rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    padding: 0.15rem 0.25rem;
    border-radius: 3px;
    background-color: transparent;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
    width: 100%;
}

.checkbox-container:hover {
    background-color: rgba(233, 236, 239, 0.5);
}

.checkbox-container input[type="checkbox"] {
    margin-right: 0.5rem;
    accent-color: #2c3e50;
}

.checkbox-container input[type="checkbox"]:checked + span {
    font-weight: 600;
    color: #2c3e50;
}

/* Severity-specific background colors */
.checkbox-container input[name="crash-severity"][value="K"] + span,
.checkbox-container input[name="crash-severity"][value="K"]:checked ~ span {
    color: #333333;
}

.checkbox-container input[name="crash-severity"][value="A"] + span,
.checkbox-container input[name="crash-severity"][value="A"]:checked ~ span {
    color: #e45d51;
}

.checkbox-container input[name="crash-severity"][value="B"] + span,
.checkbox-container input[name="crash-severity"][value="B"]:checked ~ span {
    color: #ef9b4f;
}

.checkbox-container input[name="crash-severity"][value="C"] + span,
.checkbox-container input[name="crash-severity"][value="C"]:checked ~ span {
    color: #f8cb50;
}

.filter-select {
    width: 100%;
    padding: 0.375rem 0.5rem;
    border-radius: 4px;
    border: 1px solid #ced4da;
    background-color: white;
    font-size: 0.9rem;
}

/* Remove the multi-select styles */
.filter-select[multiple] {
    height: auto;
    padding: 0;
}

.filter-select[multiple] option {
    padding: 0.5rem;
    border-bottom: 1px solid #f1f3f5;
}

.filter-select[multiple] option:hover, 
.filter-select[multiple] option:focus {
    background-color: #e9ecef;
}

.filter-select[multiple] option:checked {
    background-color: #2c3e50;
    color: white;
}

.layer-toggles {
    position: absolute;
    top: 60px;
    left: 400px;
    z-index: 10;
    background-color: white;
    padding: 8px 12px;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: left 0.3s ease;
    transform: translateZ(0);
}

.toggle-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    white-space: nowrap;
}

.layer-toggle-checkbox {
    margin-right: 0.5rem;
}

.toggle-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #2c3e50;
}

/* Move the layer-toggles along with the sidebar when it's hidden */
.sidebar.hidden ~ .map-container .layer-toggles {
    left: 70px;
}

.tab-container {
    margin-top: 0.5rem;
}

.tab-header {
    display: flex;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #dee2e6;
}

.tab-button {
    padding: 0.5rem 1rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 0.9rem;
    color: #6c757d;
}

.tab-button.active {
    color: #2c3e50;
    border-bottom: 2px solid #2c3e50;
    font-weight: 600;
}

.tab-pane {
    display: none;
    padding: 0.5rem 0;
}

.tab-pane.active {
    display: block;
}

.placeholder-text {
    color: #6c757d;
    font-style: italic;
    font-size: 0.9rem;
}

/* Active filters display */
.active-filters {
    background-color: #f8f9fa;
    padding: 8px 10px;
    margin-bottom: 15px;
    border-radius: 4px;
    border-left: 3px solid #2c3e50;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.active-filters p {
    margin: 5px 0;
    font-size: 0.85rem;
    color: #495057;
}

/* Filter value pill styling */
.filter-value {
    display: inline-block;
    background-color: #e9ecef;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 500;
    margin: 0 2px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Type-specific styling */
.filter-value.pedestrian {
    background-color: rgba(78, 115, 223, 0.15);
    color: #4e73df;
}

.filter-value.cyclist {
    background-color: rgba(54, 185, 204, 0.15);
    color: #36b9cc;
}

/* Severity-specific styling */
.filter-value.severity-k {
    background-color: rgba(51, 51, 51, 0.15);
    color: #333333;
    font-weight: 600;
}

.filter-value.severity-a {
    background-color: rgba(228, 93, 81, 0.15);
    color: #e45d51;
}

.filter-value.severity-b {
    background-color: rgba(239, 155, 79, 0.15);
    color: #ef9b4f;
}

.filter-value.severity-c {
    background-color: rgba(248, 203, 80, 0.15);
    color: #c19723;
}

/* Statistics display */
.stat-summary {
    margin-bottom: 15px;
    text-align: center;
    width: 100%;
}

.stat-summary p {
    font-size: 1.1rem;
    color: #2c3e50;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.stats-table th, .stats-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.stats-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.stats-table tr:hover {
    background-color: rgba(233, 236, 239, 0.4);
}

.map-container {
    flex: 1;
    position: relative;
    width: 100%;
}

#map {
    width: 100%;
    height: 100%;
}

.legend {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px;
    border-radius: 4px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
    font-size: 0.8rem;
    z-index: 5;
    width: auto;
    max-width: 200px;
}

.legend h3 {
    margin: 0 0 8px;
    font-size: 0.9rem;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.legend-color {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 5px;
    border-radius: 50%;
}

.legend-color.fatal {
    background-color: #212121; /* Fatality - darker black */
}

.legend-color.serious {
    background-color: #d9404a; /* Serious - more red than orange */
}

.legend-color.minor {
    background-color: #f18f2c; /* Minor - more orange */
}

.legend-color.possible {
    background-color: #ffd966; /* Possible - more saturated yellow */
}

.legend-label {
    font-size: 0.8rem;
}

/* Map Styling */
.mapboxgl-popup {
    max-width: 350px;
}

.mapboxgl-popup-content {
    padding: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

/* Fix close button position */
.mapboxgl-popup-close-button {
    padding: 4px 8px;
    font-size: 18px;
    color: white;
    background: transparent;
    right: 5px;
    top: 3px;
    z-index: 10;
}

.popup-container {
    display: flex;
    flex-direction: column;
}

.popup-header {
    background-color: #2c3e50;
    color: white;
    font-weight: 600;
    padding: 10px 30px 10px 15px;
    font-size: 1rem;
    position: relative;
    word-wrap: break-word;
}

/* Severity-based header colors */
.popup-header.k {
    background-color: #212121; /* Fatal */
}

.popup-header.a {
    background-color: #d9404a; /* Serious */
}

.popup-header.b {
    background-color: #f18f2c; /* Minor */
}

.popup-header.c {
    background-color: #ffd966; /* Possible */
    color: #333; /* Darker text for better contrast on yellow */
}

/* Also style the h4 headers in the sidebar with the same colors */
h4.k {
    background-color: #212121;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
}

h4.a {
    background-color: #d9404a;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
}

h4.b {
    background-color: #f18f2c;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
}

h4.c {
    background-color: #ffd966;
    color: #333;
    padding: 8px 12px;
    border-radius: 4px;
}

.popup-content {
    padding: 15px;
    font-size: 0.9rem;
}

.popup-content .crash-date,
.popup-content .crash-location {
    margin-bottom: 8px;
    font-size: 0.85rem;
    color: #2c3e50;
}

.popup-content .crash-details {
    margin: 8px 0;
}

.popup-content .crash-conditions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 8px 0;
}

.popup-content .crash-factors {
    font-size: 0.75rem;
    color: #6c757d;
    line-height: 1.3;
    margin-top: 8px;
}

/* Table styling for statistics */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    margin: 0.5rem 0;
}

table th, table td {
    padding: 0.25rem;
    border-bottom: 1px solid #dee2e6;
    text-align: left;
}

table th {
    font-weight: 600;
    color: #2c3e50;
}

/* Hotspot styling */
.hotspots-list {
    margin-top: 0.5rem;
}

.hotspot-item {
    margin-bottom: 15px;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    background-color: white;
}

.hotspot-item h4 {
    margin: 0;
    padding: 10px 15px;
    color: white;
    font-size: 1rem;
    background-color: #2c3e50;
}

.hotspot-content {
    padding: 12px;
}

.hotspot-details {
    margin-bottom: 10px;
}

.hotspot-details p {
    margin: 5px 0;
    font-size: 0.9rem;
}

.crash-severity-breakdown {
    margin: 10px 0;
}

.crash-severity-breakdown p {
    margin: 5px 0;
    font-size: 0.9rem;
}

.focus-hotspot-btn {
    margin-top: 10px;
    padding: 6px 12px;
    background-color: white;
    color: #2c3e50;
    border: 1px solid #2c3e50;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    display: block;
    width: 100%;
    transition: background-color 0.2s, color 0.2s;
}

.focus-hotspot-btn:hover {
    background-color: #f1f5f8;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    .sidebar {
        width: 85%;
        height: 100%;
        max-height: none;
        border-top: none;
        border-right: 1px solid #dee2e6;
        left: 0;
        top: 0;
        border-radius: 0;
        box-shadow: 0 0 12px rgba(0, 0, 0, 0.2);
    }
    
    .sidebar-header {
        border-radius: 0;
    }
    
    .sidebar.hidden {
        transform: translateX(-100%);
    }
    
    .legend {
        left: auto;
        right: 20px;
        bottom: 20px;
        max-width: 180px;
    }
    
    .layer-toggles {
        top: 20px;
        right: 20px;
        left: auto;
    }
    
    /* Hide heatmap toggle on mobile */
    .sidebar .layer-toggles {
        display: none;
    }
    
    /* Hide Show Hotspots button on mobile - more specific selector */
    .map-container .map-control-button {
        display: none !important;
    }
    
    .sidebar.hidden ~ .map-container .layer-toggles {
        left: auto;
        right: 20px;
    }
    
    /* Stack buttons vertically on mobile */
    .map-credits {
        bottom: 20px;
        left: 20px;
        right: auto;
        font-size: 0.8rem;
        max-width: 180px;
        width: auto;
    }
    
    .subscribe-btn {
        bottom: 70px;
        left: 20px;
        right: auto;
        font-size: 0.85rem;
        max-width: 180px;
        width: auto;
    }
    
    .sidebar-show-btn {
        top: 20px;
        left: 20px;
        z-index: 50;
    }
}

/* Hotspot Overview Styling */
.map-control-button {
    position: absolute;
    top: 20px;
    left: 400px;
    background: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #2c3e50;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    transition: left 0.3s ease;
}

.map-control-button .analysis-icon {
    margin-left: 5px;
    font-size: 1.1rem;
    font-weight: bold;
}

.sidebar.hidden ~ .map-container .map-control-button {
    left: 70px;
}

.map-control-button:hover {
    background-color: #f8f9fa;
}

.map-control-button.active {
    background-color: #2c3e50;
    color: white;
}

/* Hotspot Sidebar */
.hotspot-sidebar {
    position: absolute;
    top: 0;
    right: -400px;
    width: 380px;
    height: 100%;
    background: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 50;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.hotspot-sidebar.open {
    right: 0;
}

.hotspot-sidebar-header {
    padding: 15px;
    background-color: #2c3e50;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hotspot-sidebar-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.hotspot-sidebar-header button {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
}

.hotspot-sidebar-content {
    padding: 15px;
    max-height: calc(100% - 65px); /* Account for header height */
    overflow-y: auto;
}

/* Hotspot Stats */
.hotspot-summary {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    margin-top: 10px;
}

.hotspot-stat {
    text-align: center;
    width: 30%;
}

.hotspot-stat-value {
    font-size: 1.8rem;
    font-weight: 600;
    color: #2c3e50;
}

.hotspot-stat-label {
    font-size: 0.8rem;
    color: #6c757d;
}

/* Chart Styling - Updated for consistency between stats and hotspots */
.chart-container {
    margin-bottom: 15px;
    width: 100%;
    overflow: hidden;
}

.chart-container h5 {
    margin: 0 0 10px 0;
    font-size: 0.95rem;
    color: #2c3e50;
    font-weight: 600;
}

/* Year Breakdown styling */
.chart-container + .chart-container {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.bar-chart {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.chart-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    width: 100%;
}

.chart-label {
    width: 85px;
    font-size: 0.85rem;
    color: #495057;
    flex-shrink: 0;
}

.chart-bar-container {
    flex: 1;
    height: 12px;
    background-color: #f1f3f5;
    border-radius: 6px;
    overflow: hidden;
    min-width: 50px;
}

.chart-bar-fill {
    height: 100%;
    border-radius: 6px;
}

.chart-bar-fill.fatal {
    background-color: #212121;
}

.chart-bar-fill.serious {
    background-color: #d9404a;
}

.chart-bar-fill.minor {
    background-color: #f18f2c;
}

.chart-bar-fill.possible {
    background-color: #ffd966;
}

.chart-bar-fill.pedestrian {
    background-color: #4e73df;
}

.chart-bar-fill.cyclist {
    background-color: #36b9cc;
}

.chart-bar-fill.speed-low {
    background-color: #28a745;
}

.chart-bar-fill.speed-medium {
    background-color: #ffc107;
}

.chart-bar-fill.speed-high {
    background-color: #fd7e14;
}

.chart-bar-fill.speed-very-high {
    background-color: #dc3545;
}

.chart-bar-fill.speed-unknown {
    background-color: #6c757d;
}

.chart-description {
    font-size: 0.85rem;
    color: #6c757d;
    margin: -5px 0 10px 0;
    font-style: italic;
}

.chart-value {
    width: 55px;
    text-align: left;
    font-size: 0.8rem;
    color: #495057;
    white-space: nowrap;
    flex-shrink: 0;
    padding-left: 2px;
}

/* Specific styles for hotspot charts */
.hotspot-item .chart-container {
    margin: 5px 0 8px 0;
}

.hotspot-item .bar-chart {
    gap: 4px;
}

.hotspot-item .chart-bar {
    gap: 5px;
}

/* Crash List */
.crash-list {
    margin-top: 10px;
    border-top: 1px solid #dee2e6;
}

.crash-item {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #dee2e6;
}

.crash-severity {
    width: 60px;
    text-align: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: white;
    padding: 4px;
    border-radius: 4px;
    height: fit-content;
}

.crash-severity.fatal {
    background-color: #212121;
}

.crash-severity.serious {
    background-color: #d9404a;
}

.crash-severity.minor {
    background-color: #f18f2c;
}

.crash-severity.possible {
    background-color: #ffd966;
    color: #333;
}

.crash-info {
    margin-left: 10px;
    flex: 1;
}

.crash-date {
    font-size: 0.8rem;
    font-weight: 600;
    color: #2c3e50;
}

.crash-details {
    font-size: 0.8rem;
    margin: 4px 0;
}

.crash-type {
    display: inline-block;
    background-color: #f1f3f5;
    padding: 2px 6px;
    border-radius: 3px;
    margin-right: 5px;
}

.crash-type.pedestrian {
    background-color: #4e73df;
    color: white;
}

.crash-type.cyclist {
    background-color: #36b9cc;
    color: white;
}

.crash-location {
    color: #6c757d;
}

.crash-factors {
    font-size: 0.75rem;
    color: #6c757d;
    line-height: 1.3;
    margin-top: 4px;
}

.crash-list-footer {
    text-align: center;
    font-size: 0.8rem;
    color: #6c757d;
    padding: 8px 0;
}

/* Crash list details styling */
.crash-speed-limit {
    display: inline-block;
    background-color: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
    margin-top: 4px;
    font-size: 0.9em;
    color: #495057;
}

.crash-speed {
    margin: 3px 0;
    font-size: 0.9em;
}

.popup-content .crash-speed-limit {
    display: block;
    margin: 4px 0;
    margin-left: 0;
}

.crash-conditions {
    margin: 4px 0;
    font-size: 0.8rem;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.crash-weather,
.crash-light-condition,
.crash-intersection {
    display: inline-block;
    background-color: #e9ecef;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.75rem;
    color: #495057;
}

.crash-light-condition {
    background-color: #f0e6f6;
}

.crash-intersection {
    background-color: #e6f3f6;
}

/* Don't add any content or "Yes" labels */
.crash-info::after,
.crash-info::before,
.crash-details::after,
.crash-details::before,
.crash-conditions::after,
.crash-conditions::before {
    content: none !important;
}

.analysis-panel {
    padding: 1rem;
    overflow-x: hidden;
}

.sidebar.hidden {
    transform: translateX(-400px);
    opacity: 0;
    pointer-events: none;
}

.sidebar-toggle {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    font-size: 20px;
    color: white;
    transition: background-color 0.2s;
}

.sidebar-toggle:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

.sidebar-show-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    background-color: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    font-size: 24px;
    color: #2c3e50;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.sidebar-show-btn.visible {
    opacity: 1;
    pointer-events: auto;
}

.map-credits {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 5;
    font-size: 0.8rem;
    background-color: rgba(40, 44, 52, 0.95);
    padding: 8px 12px;
    border-radius: 4px;
    display: inline-block;
    width: auto;
    text-align: left;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.map-credits a {
    color: #c3e84e;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    display: inline-block;
}

.map-credits a:hover {
    text-decoration: underline;
}

.subscribe-btn {
    position: absolute;
    bottom: 70px;
    left: 20px;
    background-color: #2e8b57; /* Forest green */
    color: white !important;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: background-color 0.2s ease;
    z-index: 5;
    text-align: left;
    width: auto;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    line-height: 1.3;
}

.subscribe-btn:hover {
    background-color: #3cb371; /* Lighter green on hover */
    color: white !important;
}

.sidebar.hidden ~ .map-container .map-credits {
    left: 20px;
}

.sidebar.hidden ~ .map-container .subscribe-btn {
    left: 20px;
}

.hotspot-help-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 30px 20px;
    margin: 20px 0;
}

.hotspot-help-message h4 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 1.2rem;
}

.hotspot-help-message p {
    margin-bottom: 10px;
    color: #495057;
    font-size: 0.95rem;
    line-height: 1.5;
}

.help-icon {
    margin-top: 20px;
    opacity: 0.6;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    color: #2c3e50;
    user-select: none;
}

.filter-toggle {
    background: none;
    border: none;
    font-size: 0.9rem;
    color: #6c757d;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.filter-toggle-icon {
    transition: transform 0.3s ease;
}

.filter-content {
    overflow: visible;
    position: relative;
    transition: max-height 0.3s ease;
}

.filter-content.collapsed {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.filter-toggle.collapsed .filter-toggle-icon {
    transform: rotate(-90deg);
}

.fatality-chart {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.hotspot-location {
    margin-bottom: 16px;
}

.hotspot-location h4 {
    margin-bottom: 4px;
    font-size: 1rem;
}

.hotspot-location p {
    font-size: 0.95rem;
    color: #2c3e50;
    margin: 0;
}

.speed-related-stats {
    margin: 15px 0;
}

.speed-related-stats .stat-summary {
    display: flex;
    justify-content: space-between;
    text-align: center;
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
}

.speed-related-stats .stat-summary div {
    flex: 1;
    padding: 0 10px;
}

.speed-related-stats h3 {
    font-size: 1.8rem;
    margin: 0 0 5px 0;
    color: #dc3545;
    font-weight: 600;
}

.speed-related-stats p {
    font-size: 0.9rem;
    margin: 0;
    color: #495057;
}

.speed-related-actions {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

.speed-filter-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.speed-filter-btn:hover {
    background-color: #c82333;
}

.speed-filter-btn.reset {
    background-color: #6c757d;
}

.speed-filter-btn.reset:hover {
    background-color: #5a6268;
}

.speed-filter-indicator {
    background-color: #dc3545;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    text-align: center;
}

.speed-filter-indicator p {
    margin: 0;
} 