/* public/css/guest-nearest.css (release 6.66.95, Release 7 "Search and Nearest")
 * The Nearest row and sheet, and the Nearby rows as buttons (F8). Linked from the guest page; the page's own style block does not
 * grow (route-controls guard RG-04). Targets: 44 px on phones, 48 px on a kiosk (WCAG 2.5.8 asks 24 px). */
.nearest-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  padding: 6px 12px 8px; background: var(--color-white, #fff); border-bottom: 1px solid #d0d5dd;
  flex-shrink: 0; position: relative; z-index: 998;
}
.nearest-row[hidden] { display: none; }
.nearest-row__label { font-size: 0.8125rem; font-weight: 600; color: var(--color-text-charcoal, #1f2933); margin-right: 2px; }
.nearest-btn {
  min-height: 44px; padding: 6px 12px; border: 1px solid #98a2b3; border-radius: 22px;
  background: var(--color-white, #fff); color: var(--color-text-charcoal, #1f2933); font: inherit; font-size: 0.875rem; cursor: pointer;
}
.nearest-btn:focus-visible, .nearest-item:focus-visible, .nearest-sheet__close:focus-visible, button.nearby-item:focus-visible {
  outline: 3px solid var(--color-warning, #b45309); outline-offset: 2px;
}
.nearest-sheet {
  position: fixed; left: 10px; right: 10px; bottom: 60px; z-index: 1001; max-height: 60vh; overflow-y: auto;
  background: var(--color-white, #fff); border-radius: 12px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2); padding: 10px 14px 12px;
}
.nearest-sheet[hidden] { display: none; }
.nearest-sheet__title { font-size: 1rem; margin: 4px 40px 6px 0; color: var(--color-text-charcoal, #1f2933); }
.nearest-sheet__note { font-size: 0.875rem; margin: 0 0 6px; color: var(--color-text-subtle, #475467); }
.nearest-sheet__note[hidden] { display: none; }
.nearest-sheet__close {
  position: absolute; top: 6px; right: 8px; min-width: 44px; min-height: 44px;
  background: none; border: 0; font-size: 22px; color: var(--color-text-subtle, #475467); cursor: pointer;
}
.nearest-sheet__list { list-style: none; margin: 0; padding: 0; }
.nearest-item {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; width: 100%; min-height: 44px; padding: 8px 4px;
  background: none; border: 0; border-bottom: 1px solid #eaecf0; font: inherit; text-align: left; cursor: pointer;
  color: var(--color-text-charcoal, #1f2933);
}
.nearest-item__name { font-weight: 600; }
.nearest-item__dist { font-size: 0.8125rem; color: var(--color-text-subtle, #475467); }
button.nearby-item { width: 100%; background: none; border: 0; border-bottom: 1px solid #eaecf0; font: inherit; text-align: left; color: inherit; min-height: 44px; }
body.kiosk-mode .nearest-btn, body.kiosk-mode .nearest-item, body.kiosk-mode .nearest-sheet__close { min-height: 48px; font-size: 1.125rem; }
body.kiosk-mode .nearest-row__label { font-size: 1rem; }
/* 6.66.95: the active search option (#e8f0fe) needs a darker grey for 4.5:1 (axe found 4.1:1 once aria-activedescendant made it
 * reachable). The category text sets its color inline from the variable, so the row redefines the variable (no !important). */
.search-result.kb-focus { --color-text-subtle: #4B5563; --color-text-placeholder: #4B5563; }
/* 6.66.121 (docs/SPEC-6.66.121-more-map-on-phones.md section 3): on a phone the row fades away on map use and comes back when the
 * search box gets focus (public/js/guest-nearest-fade.js). Fading: opacity 0 and no taps; away: out of the layout, the tab order
 * and the reading order. The hidden attribute stays renderRow's "no Nearest group on this map". */
.nearest-row { --nearest-fade-ms: 250ms; transition: opacity var(--nearest-fade-ms) ease; }
.nearest-row.nearest-row--fading { opacity: 0; pointer-events: none; }
.nearest-row.nearest-row--away { display: none; }
@media (prefers-reduced-motion: reduce) { .nearest-row { transition: none; } }
