/* Aviation Map Styling */

/* Map container */
#aviation-map {
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* OpenStreetMap tiles are colourful; the route, highlighted segments, labels and ADEP/ADES
   markers were designed for a muted basemap. Filter the tile pane only, never the overlays. */
.leaflet-container .leaflet-tile-pane {
    filter: grayscale(70%) contrast(90%) brightness(105%);
}

/* Dark theme (MainLayout sets theme-dark on the layout): invert the tiles and rotate the hues back. */
.theme-dark .leaflet-container {
    background: #1e293b;
}

.theme-dark .leaflet-container .leaflet-tile-pane {
    filter: invert(100%) hue-rotate(180deg) grayscale(60%) brightness(90%) contrast(90%);
}

/* Airport marker custom styles */
.airport-marker {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.airport-marker:hover {
    transform: scale(1.3);
    z-index: 1000 !important;
}

/* Airport popup styling */
.airport-popup {
    font-family: 'Roboto', sans-serif;
    min-width: 200px;
}

.airport-popup h4 {
    margin: 0 0 8px 0;
    color: #1976d2;
    font-size: 16px;
    font-weight: 500;
    border-bottom: 2px solid #1976d2;
    padding-bottom: 4px;
}

.airport-popup p {
    margin: 4px 0;
    font-size: 13px;
    color: #424242;
}

.airport-popup p strong {
    color: #212121;
}

/* Leaflet control customization for aviation theme */
.leaflet-control-zoom a {
    background-color: #1976d2 !important;
    color: white !important;
}

.leaflet-control-zoom a:hover {
    background-color: #1565c0 !important;
}

/* Responsive adjustments */
@media (max-width: 960px) {
    #aviation-map {
        height: 400px !important;
    }

    .airport-popup {
        min-width: 150px;
    }

    .airport-popup h4 {
        font-size: 14px;
    }

    .airport-popup p {
        font-size: 12px;
    }
}

/* Route marker styling for subtle appearance */
.route-airport-marker,
.route-waypoint-marker {
    transition: all 0.2s ease;
    cursor: pointer;
}

.route-airport-marker:hover,
.route-waypoint-marker:hover {
    transform: scale(1.15);
    z-index: 1000 !important;
}

.route-airport-marker div,
.route-waypoint-marker div {
    transition: all 0.2s ease;
}

.route-airport-marker:hover div,
.route-waypoint-marker:hover div {
    filter: brightness(1.1);
}

/* Flight plan panel scrollbar styling */
.mud-paper::-webkit-scrollbar {
    width: 8px;
}

.mud-paper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.mud-paper::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.mud-paper::-webkit-scrollbar-thumb:hover {
    background: #555;
}
