/* -----------------------------------------------------------------------------
   "Near me" hub (/near-me) — location bar, tabs, results map and distance cards.
   Also used by the near-me results map on /events and the category directories.
   Bootstrap 4 is already loaded; this only adds what the hub needs.
   Palette matches the other hubs: #003366 primary, #1b8743 success accent.
----------------------------------------------------------------------------- */

/* ---- Location bar --------------------------------------------------------- */
.nm-locbar {
  background: #f4f8fb;
  border: 1px solid #d9e2ea;
  border-left: 4px solid #1b8743;
  border-radius: 8px;
  padding: 14px 16px;
  margin: 4px 0 16px;
}
.nm-locbar-empty { border-left-color: #f0ad4e; background: #fdf8ef; }

.nm-locbar-row {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
}
.nm-locbar-where { font-weight: 600; color: #003366; }
.nm-locbar-where i { color: #1b8743; margin-right: 4px; }

.nm-locform {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; margin-top: 10px;
}
.nm-locform .form-control { flex: 1 1 240px; min-width: 0; height: 40px; }
.nm-locform .btn { height: 40px; white-space: nowrap; }
.nm-clear { font-size: .86rem; color: #6c757d; text-decoration: underline; white-space: nowrap; }
.nm-clear:hover { color: #003366; }

.nm-locate-msg { font-size: .88rem; color: #6c757d; margin-top: 8px; min-height: 1em; }
.nm-locate-msg.err { color: #b71c1c; }
.nm-locate-msg:empty { margin-top: 0; }

/* ---- Tabs + filters ------------------------------------------------------- */
.nm-tabs { margin: 0 0 16px; flex-wrap: wrap; gap: 6px; }
.nm-tabs .nav-link {
  border: 1px solid #d6dade; border-radius: 999px;
  color: #003366; font-weight: 600; padding: .4rem .95rem;
}
.nm-tabs .nav-link:hover { background: #eef3f8; }
.nm-tabs .nav-link.active { background: #003366; border-color: #003366; color: #fff; }

.nm-filters {
  display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap;
  background: #fff; border: 1px solid #e3e7eb; border-radius: 8px;
  padding: 12px 14px; margin-bottom: 18px;
}
.nm-filter-field { flex: 1 1 220px; min-width: 0; }
.nm-filter-radius { flex: 0 0 130px; }
.nm-filters label {
  display: block; font-size: .78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .3px; color: #6c757d; margin-bottom: 4px;
}
.nm-filters .btn { height: 38px; }

/* ---- Map ------------------------------------------------------------------ */
.nm-map-card {
  border: 1px solid #d9e2ea; border-radius: 10px; overflow: hidden;
  margin-bottom: 20px; background: #fff;
}
.nm-map-bar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px;
  padding: 9px 14px; background: #f4f8fb; border-bottom: 1px solid #e3e7eb;
  font-size: .88rem; color: #495057;
}
.nm-map-hint { font-weight: 600; color: #003366; }
#nmMap { height: 380px; width: 100%; }
@media (max-width: 575.98px) { #nmMap { height: 280px; } }

.nm-legend { display: flex; align-items: center; gap: 6px; font-size: .82rem; color: #6c757d; }
.nm-key {
  display: inline-block; width: 11px; height: 11px; border-radius: 50%;
  margin-left: 8px; vertical-align: -1px; border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .18);
}
.nm-key-business   { background: #003366; }
.nm-key-restaurant { background: #d9822b; }
.nm-key-event      { background: #1b8743; }

/* Map popup */
.nm-pop { min-width: 170px; }
.nm-pop-name { font-family: 'Oswald', sans-serif; font-size: 1rem; font-weight: 600; margin: 0 0 2px; color: #003366; }
.nm-pop-meta { font-size: .82rem; color: #6c757d; margin: 0 0 6px; }
.nm-pop-dist { font-size: .82rem; font-weight: 600; color: #1b8743; }

/* ---- Result sections ------------------------------------------------------ */
.nm-section-h {
  display: flex; align-items: baseline; justify-content: space-between;
  flex-wrap: wrap; gap: 8px;
  font-size: 1.25rem; color: #003366; margin: 22px 0 10px;
  padding-bottom: 6px; border-bottom: 2px solid #eef1f4;
}
.nm-section-more { font-size: .86rem; font-weight: 600; white-space: nowrap; }

.nm-results { display: flex; flex-direction: column; gap: 8px; margin-bottom: 6px; }

.nm-card {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border: 1px solid #e3e7eb; border-radius: 8px;
  background: #fff; color: inherit; text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.nm-card:hover, .nm-card:focus {
  text-decoration: none; color: inherit;
  border-color: #b9c8d6; box-shadow: 0 2px 8px rgba(0, 0, 0, .07); transform: translateY(-1px);
}
.nm-card.is-active { border-color: #1b8743; box-shadow: 0 0 0 2px rgba(27, 135, 67, .18); }

.nm-card-img {
  flex: 0 0 56px; width: 56px; height: 56px; border-radius: 6px;
  object-fit: contain; background: #f7f9fb; border: 1px solid #eef1f4;
}
.nm-card-img-ph {
  display: flex; align-items: center; justify-content: center;
  color: #fff; border: 0; font-size: 1.15rem;
}

.nm-card-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.nm-card-title {
  font-family: 'Oswald', sans-serif; font-size: 1.02rem; font-weight: 600; color: #003366;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nm-card-meta { font-size: .86rem; color: #495057; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nm-card-sub  { font-size: .8rem;  color: #8a949e; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.nm-tier {
  display: inline-block; font-size: .62rem; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; background: #003366; color: #fff;
  padding: 2px 6px; border-radius: 3px; margin-right: 6px; vertical-align: 2px;
}

.nm-card-dist {
  flex: 0 0 auto; font-size: .84rem; font-weight: 700; color: #1b8743; white-space: nowrap;
}
.nm-card-dist i { opacity: .7; }

@media (max-width: 575.98px) {
  .nm-card { flex-wrap: wrap; }
  .nm-card-dist { flex-basis: 100%; padding-left: 68px; }
}

/* ---- Empty states + footnote --------------------------------------------- */
.nm-empty {
  text-align: center; padding: 30px 20px; margin-bottom: 20px;
  background: #f7f9fb; border: 1px solid #e3e7eb; border-radius: 10px;
}
.nm-empty i { font-size: 2.1rem; color: #b9c8d6; margin-bottom: 10px; display: block; }
.nm-empty h2 { font-size: 1.2rem; color: #003366; margin-bottom: 8px; }
.nm-empty p  { color: #6c757d; max-width: 460px; margin: 0 auto 8px; }
.nm-empty-prompt { background: #fdf8ef; border-color: #f3e2c2; }
.nm-empty-prompt i { color: #e0a44a; }
.nm-empty-sub { font-size: .84rem; }

.nm-foot { font-size: .84rem; color: #8a949e; margin: 18px 0 8px; }

/* ---- Compact variant: the results map dropped into /events and the
        category directories, where the hub chrome isn't wanted. ------------- */
.nm-inline-map { height: 300px; width: 100%; border: 1px solid #d9e2ea; border-radius: 8px; margin-bottom: 18px; }
.nm-nearbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #f4f8fb; border: 1px solid #d9e2ea; border-radius: 8px;
  padding: 10px 14px; margin-bottom: 14px; font-size: .9rem;
}
.nm-nearbar .nm-nearbar-label { font-weight: 600; color: #003366; }
.nm-nearbar select { max-width: 110px; }
