/* WaggleTails web - the map picker (conventions 14.1, map-picker.js) as a form field: the search row, the map frame, the
   status line and the address line. Leaflet's own classes stay in lib/leaflet/leaflet.css; they are only scoped under the
   picker here so the controls and the attribution follow the theme tokens. */

.wt-map-picker {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

/* SelectLocationPage.xaml:29-51 - search bar with the brand-gradient pill button at its side */
.wt-map-picker__search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.wt-map-picker__search .wt-input {
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 22px;
  font-size: 14px;
}
.wt-map-picker__button {
  width: auto;
  min-height: 42px;
  padding: 8px 16px;
  border-radius: 21px;
  font-size: 14px;
  box-shadow: none;
}

/* The map frame - rounded like the inputs around it; a fixed height is the one dimension a map needs. Its own stacking
   context keeps Leaflet's panes (z 200-700) and controls (z 1000) under the sticky page head, the dock, modals and the banner. */
.wt-map-picker__map {
  position: relative;
  z-index: 0;
  height: 260px;
  border: 1px solid var(--wt-border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--wt-surface-muted);
}
@media (min-width: 768px) {
  .wt-map-picker__map {
    height: 320px;
  }
}

/* SelectLocationPage search alerts, shown as a line under the map instead of a dialog */
.wt-map-picker__status {
  font-size: 12px;
  line-height: 1.4;
  color: var(--wt-text-secondary);
  overflow-wrap: anywhere;
}
.wt-map-picker__status:empty {
  display: none;
}

/* SelectLocationPage.xaml:75 - the reverse-geocoded line (13 px, wraps) */
.wt-map-picker__address {
  font-size: 13px;
  line-height: 1.45;
  color: var(--wt-text);
  overflow-wrap: anywhere;
}

/* Leaflet chrome on the theme tokens */
.wt-map-picker .leaflet-container {
  font-family: var(--wt-font);
  background: var(--wt-surface-muted);
}
.wt-map-picker .leaflet-control-attribution {
  background: var(--wt-glass);
  color: var(--wt-text-secondary);
  font-size: 10px;
}
.wt-map-picker .leaflet-control-attribution a {
  color: var(--wt-primary);
}
.wt-map-picker .leaflet-bar a {
  background: var(--wt-card);
  color: var(--wt-text);
  border-bottom-color: var(--wt-border);
}
.wt-map-picker .leaflet-bar a:hover {
  background: var(--wt-surface-muted);
}
[data-theme=dark] .wt-map-picker .leaflet-tile-pane {
  filter: brightness(.82) contrast(1.05);
}
