/* Map page filter drawer --------------------------------------------------- */
.filter-drawer {
  z-index: 2000;
  top: var(--nav-h);
  right: 0;
  bottom: 0;
  left: auto;
  width: min(26rem, 100vw);
  max-width: 100%;
  transform: translateX(100%);
  border-left: 1px solid var(--border);
  box-shadow: -16px 0 40px color-mix(in srgb, var(--ink-900) 16%, transparent);
}

.filter-drawer-body {
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overscroll-behavior: contain;
}

.filter-drawer .filters,
.filter-drawer .filter-group,
.filter-drawer .filter-group > .stack,
.filter-drawer .field,
.filter-drawer .filter-row,
.filter-drawer .filter-row > * {
  min-width: 0;
}

.filter-drawer .filter-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.filter-drawer input:not([type="checkbox"]),
.filter-drawer select,
.filter-drawer textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.filter-drawer select {
  text-overflow: ellipsis;
}

.filter-drawer-foot > * {
  min-width: 0;
}

@media (max-width: 640px) {
  .filter-drawer {
    inset: 0;
    width: 100%;
    max-width: none;
    border-left: 0;
    box-shadow: none;
  }
}

.zip-status {
  min-height: 1.25rem;
  margin-top: var(--sp-2);
  color: var(--text-soft);
  font-size: var(--fs-xs);
  line-height: 1.35;
}

.zip-status.is-success {
  color: var(--teal-700);
}

.zip-status.is-error {
  color: var(--ember-700);
}

.your-location-icon {
  background: none;
  border: 0;
}

.your-location-target {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 4px solid #fff;
  border-radius: 50%;
  background: #7c3aed;
  box-shadow:
    0 0 0 4px rgb(124 58 237 / 32%),
    0 4px 14px rgb(37 20 68 / 38%);
}

.your-location-target > span {
  width: 8px;
  height: 8px;
  border: 2px solid #7c3aed;
  border-radius: 50%;
  background: #fff;
}

.zip-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

/* Leaflet uses stacking levels up to 1000. Keep the map page's mobile
   navigation and action bar above it, with the filter drawer above both. */
body[data-page="map"] .site-header {
  z-index: 1600;
}

body[data-page="map"] .mobile-bar {
  z-index: 1500;
}

@media (max-width: 860px) {
  body[data-page="map"] .nav-links {
    max-height: calc(100dvh - var(--nav-h));
    overflow-y: auto;
  }
}

/* Leaflet ships `.leaflet-container a { color: #0078A8 }` — a class+element
   selector that outranks our single-class .btn-primary, so the popup's
   "View page" button rendered in Leaflet blue on the coral fill (unreadable).
   Re-assert button colours for anchors inside the map. */
.leaflet-container a.btn-primary,
.leaflet-container a.btn-primary:hover { color: #fff; }
.leaflet-container a.btn-outline,
.leaflet-container a.btn-ghost { color: var(--text); }
.leaflet-container .map-popup a:not(.btn) { color: var(--link); }
