* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; font-family: system-ui, sans-serif; }
body { display: flex; flex-direction: column; }
header { padding: 0.5rem 1rem; background: #1d70b8; color: white; }
header h1 { margin: 0; font-size: 1.25rem; }
header p { margin: 0.25rem 0 0; font-size: 0.85rem; opacity: 0.85; }
header p.status { font-variant-numeric: tabular-nums; }

/* Search control (postcode + GPS) */
.search-control {
  background: white;
  padding: 0.4rem;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  font-family: system-ui, sans-serif;
}
.search-control form { display: flex; gap: 0.25rem; align-items: center; margin: 0; }
.search-control input[type="text"] {
  padding: 0.3rem 0.5rem;
  border: 1px solid #b1b4b6;
  border-radius: 3px;
  width: 9em;
  font-size: 0.9rem;
  text-transform: uppercase;
}
.search-control input[type="text"]::placeholder { text-transform: none; opacity: 0.6; }
.search-control button {
  padding: 0.3rem 0.45rem;
  border: 1px solid #b1b4b6;
  background: #f3f2f1;
  cursor: pointer;
  border-radius: 3px;
  font-size: 0.95rem;
  line-height: 1;
}
.search-control button:hover { background: #e1e3e5; }
.search-msg {
  margin: 0.3rem 0 0;
  font-size: 0.75rem;
  color: #505a5f;
  min-height: 1em;
  text-align: center;
}
.search-pin { font-size: 24px; text-align: center; filter: drop-shadow(0 1px 1px rgba(0,0,0,0.4)); }
.search-pin span { display: block; }

/* Nearby-stations list */
.nearby-controls {
  padding: 0.35rem 0.1rem 0.25rem;
  font-size: 0.75rem;
  color: #505a5f;
  border-top: 1px solid #e5e5e5;
  margin-top: 0.35rem;
}
.nearby-count-row { font-weight: 600; margin-bottom: 0.25rem; color: #1d70b8; }
.nearby-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
}
.nearby-controls select { font-size: 0.75rem; padding: 0.1rem 0.15rem; }
.nearby-controls button {
  padding: 0.15rem 0.4rem;
  font-size: 0.75rem;
  border: 1px solid #b1b4b6;
  background: #f3f2f1;
  cursor: pointer;
  border-radius: 3px;
  line-height: 1.4;
}
.nearby-controls button:hover { background: #e1e3e5; }
.nearby-controls button#reset-btn { margin-left: auto; }
.nearby-list {
  max-height: 50vh;
  overflow-y: auto;
  margin-top: 0.25rem;
  border-top: 1px solid #e5e5e5;
}
.nearby-list .empty { padding: 0.5rem 0.25rem; font-size: 0.8rem; color: #505a5f; margin: 0; }
.nearby-row {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.35rem 0.4rem;
  border: 0;
  border-bottom: 1px solid #f0f0f0;
  background: white;
  cursor: pointer;
  font-family: inherit;
}
.nearby-row:hover { background: #f3f7fb; }
.nearby-row .brand {
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}
.nearby-row .meta { font-size: 0.7rem; color: #505a5f; font-variant-numeric: tabular-nums; }
.nearby-row .dist { font-weight: 600; color: #1d70b8; }
#map { flex: 1; min-height: 60vh; }
footer { padding: 0.5rem 1rem; background: #f3f2f1; color: #505a5f; font-size: 0.75rem; border-top: 1px solid #b1b4b6; }
footer a { color: #1d70b8; }
