/* Arete's own additions to the SolverTech.MapLibre.Core map chrome.

   Everything here is keyed off `arete-` class names the adapter's JS emits, and reuses the
   package's own custom properties (--solver-map-*) so a panel Arete adds sits next to the
   package's controls without looking bolted on. solver-map.css declares those properties on
   :root, so they resolve wherever the map is mounted. */

/* ---- Vehicle-type filter / legend for avoid overrides ----

   Bottom-left. Every other corner is taken: the package owns bottom-right (zoom row, layers
   control, compact attribution), MapRenderer puts its geometry buttons top-right, and top-left is
   where MapRenderer draws the marker hover tooltip — two stacked boxes at margin 10px and
   margin-left 270px (MapRenderer.razor). Top-left would not merely look crowded, it would be
   COVERED: those tooltips are grid items with z-index 2 sitting outside the map container, whose
   own z-index:1 traps everything inside it, this panel included.

   Caveat for later: MapLibreAdapterOptions.LayersControlPosition is configurable and would collide
   here if it were ever set to bottom-left.

   Sized to the longest vehicle type name rather than fixed, and capped so a long list scrolls
   instead of covering the map. */
.arete-map-override-filter {
    position: absolute;
    bottom: 10px;
    left: 10px;
    z-index: var(--solver-map-z-panel);
    max-width: 220px;
    max-height: calc(100% - 20px);
    overflow-y: auto;
    padding: 6px;
    box-sizing: border-box;
    background: var(--solver-map-color-surface);
    border: 1px solid var(--solver-map-color-border);
    border-radius: var(--solver-map-panel-radius);
    box-shadow: var(--solver-map-panel-shadow);
    font-family: var(--solver-map-font);
    font-size: 12px;
    line-height: 1.35;
}

.arete-map-override-filter-title {
    padding: 2px 6px 4px;
    font-weight: 600;
    color: var(--solver-map-color-muted-text);
}

.arete-map-override-filter-item {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 4px 6px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--solver-map-color-dark-text);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.arete-map-override-filter-item:hover {
    background: rgba(148, 163, 184, 0.18);
}

.arete-map-override-filter-item--active {
    background: rgba(148, 163, 184, 0.28);
    font-weight: 600;
}

.arete-map-override-filter-swatch {
    flex-shrink: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 0 1px var(--solver-map-color-border-strong);
}

/* "Show all" stands for every colour at once, so it gets none of them. */
.arete-map-override-filter-swatch--all {
    background: linear-gradient(135deg, var(--solver-map-color-faint) 50%, transparent 50%);
}

.arete-map-override-filter-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
