/* Map: Leaflet control theming, street labels, garage markers, loading message. */

.leaflet-container { background: var(--map-ground); font-family: var(--font-ui); }
.leaflet-bar { border: 1px solid var(--line) !important; box-shadow: 0 2px 8px rgba(0, 0, 0, .12) !important; }
.leaflet-bar a, .leaflet-bar a:hover { background: var(--panel); color: var(--fg); border-bottom-color: var(--line); }
.leaflet-control-attribution { background: color-mix(in srgb, var(--panel) 85%, transparent) !important; color: var(--muted); }
.leaflet-control-attribution a { color: var(--muted); }
/* locate me: icon-only square button like the zoom buttons */
.map-locate a { display: grid !important; place-items: center; padding: 0; }
.map-locate a svg { color: #1a73e8; }
.map-locate a.is-busy svg { animation: locate-pulse 1s ease-in-out infinite; }
@keyframes locate-pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .map-locate a.is-busy svg { animation: none; opacity: .5; } }

/* show/hide garages: pressed = shown (blue P), off = grey P and muted text */
.map-toggle a { display: flex !important; align-items: center; gap: 7px; width: auto !important; height: 32px !important; padding: 0 11px 0 6px; font-size: 12.5px; font-weight: 700; line-height: 1; }
.map-toggle b {
  display: grid; place-items: center; width: 20px; height: 20px; border-radius: 4px;
  background: var(--status-permit); color: #fff; box-shadow: inset 0 0 0 1.5px #fff;
}
.map-toggle .p-glyph, .garage-marker .p-glyph { display: block; width: 100%; height: 100%; }
.map-toggle a[aria-pressed="true"] b { background: var(--sign-blue); }
.map-toggle a[aria-pressed="false"] span { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1.5px; }

.street-label {
  position: absolute; left: 0; top: 0; white-space: nowrap; pointer-events: none;
  color: var(--map-label); font-weight: 600; letter-spacing: .02em;
  text-shadow: 0 0 2px var(--map-halo), 0 0 2px var(--map-halo), 0 0 3px var(--map-halo), 0 0 4px var(--map-halo);
}

.garage-marker-anchor { background: none; border: 0; }
.garage-marker {
  position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 4px;
  padding: 1px 6px 1px 1px; border-radius: 6px; background: var(--sign-blue); color: #fff; white-space: nowrap; cursor: pointer;
  box-shadow: inset 0 0 0 1.5px #fff, 0 1px 4px rgba(0, 0, 0, .35);
}
.garage-marker b { display: block; width: 20px; height: 20px; }
.garage-marker span { font-family: var(--font-num); font-size: 11px; font-weight: 600; line-height: 1; }
.garage-marker.is-compact { padding: 1px; }
.garage-marker.is-compact span { display: none; }
.garage-marker.has-ring { box-shadow: inset 0 0 0 1.5px #fff, 0 0 0 3px var(--ring), 0 1px 4px rgba(0, 0, 0, .35); }
/* selected marker: same colour as its price class, thicker ring, slightly larger */
.garage-marker.is-selected {
  transform: translate(-50%, -50%) scale(1.15);
  box-shadow: inset 0 0 0 1.5px #fff, 0 0 0 5px var(--ring, var(--sign-blue)), 0 2px 8px rgba(0, 0, 0, .4);
}

/* bottom centre keeps messages clear of the controls in the top corners */
.map-message {
  position: absolute; left: 50%; bottom: 30px; z-index: 800; transform: translateX(-50%);
  box-sizing: border-box; width: max-content; max-width: calc(100% - 32px);
  padding: 7px 14px 5px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel);
  font-size: 13px; font-weight: 600; text-align: center; box-shadow: 0 2px 10px rgba(0, 0, 0, .15);
}
