/* PMC ZIP navigation: separate from the wastewater map styles. */
#location-tools {
  flex: 0 0 auto;
  padding: 9px 10px;
  border-top: 1px solid #e5e7eb;
  background: #f8fafc;
  color: #111827;
  font: 13px/1.35 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
#location-tools [hidden] { display: none !important; }
#location-tools .location-row, #zip-form, #location-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}
#location-tools .location-row { justify-content: space-between; gap: 8px 14px; }
#zip-form { margin: 0; }
#zip-form label { font-weight: 750; white-space: nowrap; }
#location-tools input, #location-tools select, #location-tools button {
  box-sizing: border-box;
  min-height: 36px;
  border: 1px solid #9ca3af;
  border-radius: 5px;
  background: #ffffff;
  color: #111827;
  padding: 6px 10px;
  font: inherit;
}
#location-tools button { cursor: pointer; font-weight: 650; }
#location-tools button:hover:not(:disabled) { background: #f1f5f9; }
#location-tools button:disabled { opacity: .55; cursor: default; }
#location-tools :is(input, select, button, summary):focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 2px;
}
#zip-input { width: 108px; font-variant-numeric: tabular-nums; }
#zip-input[aria-invalid="true"] { border: 2px solid #b91c1c; }
#location-tools #zip-submit { background: #172554; border-color: #172554; color: white; }
#location-tools #zip-submit:hover:not(:disabled) { background: #1e3a8a; }
#location-tools #county-manual-toggle { background: transparent; border-color: transparent; text-decoration: underline; font-weight: 500; }
#location-tools #location-message { margin: 7px 0 0; color: #334155; }
#location-tools #location-message:empty { display: none; }
#location-tools #location-error { color: #991b1b; margin: 7px 0 0; font-weight: 650; }
#zip-county-wrap { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 7px; }
#zip-county-wrap label { font-weight: 650; }
#zip-county-select { max-width: 100%; }
#county-manual-panel { padding: 9px 0 2px; }
#county-manual-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin: 0; }
#county-manual-form label { display: flex; flex-direction: column; gap: 3px; font-weight: 650; }
#county-state { width: 190px; }
#county-select { width: min(290px, 100%); max-width: 100%; }
#location-tools #share-fallback { margin-top: 7px; }
#share-fallback label { font-weight: 650; display: block; margin-bottom: 3px; }
#location-tools #share-url { width: min(700px, 100%); }
#zip-about { margin-top: 5px; font-size: 11px; color: #475569; }
#zip-about summary { cursor: pointer; width: fit-content; }
#zip-about p { margin: 5px 0; max-width: 950px; }
#zip-about a { color: #1d4ed8; }
#location-tools .visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
/* Keep location controls visible on phones; let short screens scroll naturally. */
@media (max-width: 720px) {
  html, body { overflow: auto; height: auto; min-height: 100%; }
  body { min-height: 100dvh; }
  #dashboard-title { font-size: 17px; }
  #location-tools { padding: 8px 7px; }
  #location-tools .location-row { align-items: stretch; }
  #zip-form { width: 100%; gap: 6px; }
  #zip-form label { font-size: 12px; }
  #zip-input { width: 88px; min-width: 70px; }
  #location-tools #zip-submit { flex: 1 1 auto; }
  #location-tools input, #location-tools select, #location-tools button { min-height: 42px; }
  #location-tools input, #location-tools select { font-size: 16px; }
  #location-actions { width: 100%; gap: 5px; }
  #location-actions button { padding: 6px 8px; font-size: 12px; }
  #location-tools #location-message { margin-top: 6px; font-size: 12px; }
  #zip-county-select { width: 100%; }
  #county-manual-form label { flex: 1 1 100%; }
  #county-state, #county-select { width: 100%; }
  #dashboard-topbar { max-height: none; overflow: visible; grid-template-columns: 1fr; gap: 6px; }
  #dashboard-topbar .date-column { display: flex; gap: 8px; align-items: baseline; }
  #dashboard-topbar .date-column .header-title { margin-bottom: 0; }
  #map-shell { flex: 1 0 auto; display: flex; flex-direction: column; min-height: 540px; overflow: visible; }
  #map { flex: 0 0 340px; height: 340px; min-height: 340px; width: 100%; }
  #county-info { flex: 1 0 auto; width: 100%; height: auto; min-height: 190px; overflow: visible; }
  #county-info .small-label { display: block; margin-bottom: 5px; }
  #county-history-title, #county-history-subtitle, #county-history-chart { display: block !important; }
  #county-history-title[style*="none"], #county-history-subtitle[style*="none"], #county-history-chart[style*="none"] { display: none !important; }
  #clear-selection { display: inline-block !important; }
  #clear-selection[style*="none"] { display: none !important; }
  #county-info-content { font-size: 13px; }
  #map-footnote { margin-top: auto; }
}
@media (min-width: 721px) and (max-height: 600px) {
  html, body { overflow: auto; }
  #map-shell { flex: 1 0 350px; min-height: 350px; }
}
