/* /neighborhood: an ink panel of places beside the map (wireframe). On phones the list
 * comes first; a Map toggle opens the map below it. */

.nb { display: grid; grid-template-columns: minmax(340px, 30%) minmax(0, 1fr); height: min(86svh, 800px); min-height: 560px; margin: 0 var(--gutter); }
.nb-panel { display: flex; flex-direction: column; min-height: 0; padding: 28px 26px 18px; background: var(--ink); color: #fff; }
.nb-panel h2 { font-size: clamp(30px, 2.8vw, 42px); letter-spacing: -0.04em; line-height: 1; margin: 0 0 18px; color: #fff; }
.nb-panel :focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.location-map-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.location-map-filters button {
  display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 10px; font-size: 12px; color: #fff;
  border: 1px solid var(--line-dark); background: transparent; cursor: pointer;
  transition-property: background-color, border-color, color; transition-duration: 0.15s; transition-timing-function: ease-out;
}
.location-map-filters button svg { flex: none; }
.location-map-filters button:hover { border-color: #fff; }
.location-map-filters button[aria-pressed="true"] { color: var(--ink); background: #fff; border-color: #fff; }
.location-map-search { display: block; }
.location-map-search input { width: 100%; border: 0; border-bottom: 1px solid var(--ink-soft); border-radius: 0; background: transparent; color: #fff; font: inherit; font-size: 14px; padding: 11px 0; }
.location-map-search input::placeholder { color: var(--ink-soft); opacity: 1; }
.location-map-reset { align-self: flex-start; min-height: 36px; padding: 0; margin-top: 6px; background: none; border: 0; border-bottom: 1px solid var(--ink-soft); font-size: 12px; color: #fff; cursor: pointer; }
.location-map-reset[hidden], .nb-empty[hidden], .nb-more[hidden] { display: none; }
.nb-empty { margin: 14px 0 0; font-size: 14px; color: var(--ink-soft); }
.location-place-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-dark) transparent; margin-top: 8px; }
.location-place-list button {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 8px 6px 8px 2px; text-align: left; background: none; border: 0;
  border-bottom: 1px solid var(--line-dark); font-size: 14px; line-height: 1.3; color: #fff; cursor: pointer; transition: background-color 0.15s ease-out;
}
.location-place-list button:hover { background: var(--ink-2); }
.location-place-list button > span:first-child { flex: none; width: 16px; display: grid; place-items: center; color: var(--ink-soft); }
.location-place-list button > span:first-child svg { display: block; }
.location-place-list button[aria-pressed="true"] { background: var(--ink-2); font-weight: 600; }
.location-place-list button[aria-pressed="true"] > span:first-child { color: #fff; }
.location-place-list button:focus-visible { outline-offset: -2px; }
.place-name { flex: 1 1 auto; min-width: 0; }
.location-place-list .place-mi { flex: none; font-size: 12px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.location-place { flex: none; margin-top: 12px; padding-top: 4px; font-size: 13px; animation: place-reveal 0.35s var(--ease-out); }
.location-place small { font-size: 12px; color: var(--ink-soft); }
.location-place h3 { font-size: 18px; font-weight: 400; margin: 4px 0 6px; color: #fff; }
.location-place p { line-height: 1.5; margin: 0 0 2px; color: var(--ink-soft); }
.location-place-links { display: flex; flex-wrap: wrap; gap: 0 20px; }
.location-place-links a { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; font-size: 13px; }
.location-place a { color: #fff; }
@keyframes place-reveal { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.nb-more { display: block; width: 100%; min-height: 44px; margin-top: 12px; border: 1px solid var(--ink-soft); background: none; color: #fff; font-size: 13px; cursor: pointer; }
.nb-map { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--ink-2); }
.nb-map[hidden] { display: none; }
.nb-map-box { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.location-map-canvas { position: absolute; inset: 0; }
.nb-map-toggle, .nb-selection { display: none; }
.nb-status { position: absolute; left: 12px; bottom: 12px; z-index: 2; margin: 0; font-size: 13px; color: #fff; }
.nb-status:empty { display: none; }
.nb-note { margin-top: 14px; margin-bottom: 58px; }

.location-map-marker {
  border: 1px solid var(--line-dark);
  border-radius: 50%;
  background: var(--ink-2);
  color: #fff;
  width: 40px;
  height: 40px;
  cursor: pointer;
  font-size: 16px;
  font-family: Satoshi, Arial, sans-serif;
  padding: 0;
}
.location-map-marker:not(.is-home) { display: grid; place-items: center; }
.location-map-marker:not(.is-home) svg { display: block; }
.location-map-marker.is-home { border-radius: 0; width: 46px; height: 46px; display: grid; place-items: center; background: #fff; }

.location-map-marker.is-selected { background: #fff; color: var(--ink); outline: 5px solid #ffffff22; z-index: 5; }
.location-map-marker[hidden] { display: none; }
/* MapLibre positions each marker with an inline transform on this element, so
   it must never get a transform or a transform transition of its own (that is
   what made pins trail the map while panning). Hover grows the icon inside. */
.location-map-marker { transition: background-color 0.2s, border-color 0.2s, color 0.2s; }
.location-map-marker svg { transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1); }
.location-map-marker.is-hovered:not(.is-selected) { background: var(--accent); border-color: #fff; z-index: 4; }
.location-map-marker.is-hovered:not(.is-selected):not(.is-home) svg { transform: scale(1.15); }
/* Hover preview card (Idlewild pattern): sits beside its pin, above the shield. */
.map-peek {
  position: absolute; top: 0; left: 0; z-index: 6; width: 264px; padding: 18px 20px 14px;
  background: #fff; color: var(--ink); box-shadow: 0 18px 40px -18px rgba(30, 45, 48, 0.55);
  opacity: 0; transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.map-peek[data-shown="true"] { opacity: 1; }
.map-peek[hidden] { display: none; }
.map-peek small { font-size: 9px; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; }
.map-peek h3 { font-size: 17px; font-weight: 400; line-height: 1.3; margin: 8px 0 6px; }
.map-peek p { font-size: 12.5px; line-height: 1.55; margin: 0; color: var(--muted); }
.map-peek-links { display: flex; flex-wrap: wrap; gap: 0 18px; margin-top: 10px; }
.map-peek-links a { font-size: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.map-peek-links a:hover { border-bottom-color: var(--ink); }
@media (hover: none) { .map-peek { display: none; } }
@media (prefers-reduced-motion: reduce) { .map-peek, .location-map-marker, .location-map-marker svg { transition: none; } }

.nb-map .maplibregl-ctrl-group { border-radius: 0; }
.nb-map .maplibregl-ctrl-group button { width: 40px; height: 40px; }

@media (max-width: 760px) {
  .nb { display: block; height: auto; min-height: 0; margin: 0; }
  .nb-panel { padding: 26px 22px 22px; }
  .location-map-search input { font-size: 16px; }
  .location-map-filters button { min-height: 44px; }
  .location-place-list { overflow: visible; }
  .location-place-list button { min-height: 48px; }
  .location-place { display: none; }
  .nb-map-toggle { display: flex; width: calc(100% - 44px); margin: 18px 22px; justify-content: center; }
  .nb-map { height: auto; }
  .nb-map-box { flex: none; height: 62svh; min-height: 380px; }
  .nb-selection { display: block; padding: 14px 22px 8px; background: var(--paper); color: var(--ink); font-size: 14px; }
  .nb-selection:empty { display: none; }
  .nb-selection p { margin: 0 0 2px; color: var(--muted); }
  .nb-selection .nb-sel-name { display: flex; justify-content: space-between; gap: 12px; color: var(--ink); font-size: 16px; }
  .nb-selection .location-place-links a { min-height: 44px; }
  .nb-note { margin: 16px 22px 48px; }
}

@media (prefers-reduced-motion: reduce) {
  .location-place { animation: none; }
}
