/* Shared pieces: sections, banners, dots, pills, switches, buttons, search */

.muted { color: var(--muted); }
.small { font-size: 12px; }

/* Panel sections are separated by hairlines, not boxed */
.section { padding: 18px 20px; }
.section + .section { border-top: 1px solid var(--border); }
.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.section-title small { font-size: 12px; font-weight: 400; color: var(--muted); }

/* Status banner, as at the top of a flood-agency station page */
.banner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--tone, var(--brand)) 11%, var(--surface));
  color: var(--text);
}
.banner svg { flex: none; width: 20px; height: 20px; margin-top: 1px; color: var(--tone, var(--brand)); }
.banner strong { display: block; font-size: 15px; font-weight: 600; line-height: 1.35; }
.banner span { display: block; margin-top: 2px; font-size: 13px; color: var(--text-2); }

.dot {
  display: inline-block;
  flex: none;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--tone, var(--neutral));
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px color-mix(in srgb, var(--tone, var(--neutral)) 35%, transparent);
}
.dot.ring { background: transparent; box-shadow: inset 0 0 0 2.5px var(--serious); width: 12px; height: 12px; }
.dot.hollow { background: transparent; box-shadow: inset 0 0 0 1.5px var(--stale); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--text);
  background: color-mix(in srgb, var(--tone, var(--neutral)) 13%, var(--surface));
}
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--tone, var(--neutral)); }

/* Material-style switch */
.switch { position: relative; flex: none; width: 34px; height: 20px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 3px 0; border-radius: 999px; background: var(--border-strong); transition: background 0.15s; pointer-events: none; }
.switch span::after {
  content: "";
  position: absolute;
  top: -3px; left: 0;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-1), 0 0 0 1px var(--border-strong);
  transition: transform 0.15s, background 0.15s;
}
.switch input:checked + span { background: color-mix(in srgb, var(--brand) 45%, var(--surface)); }
.switch input:checked + span::after { transform: translateX(14px); background: var(--brand); box-shadow: var(--shadow-1); }
.switch input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 3px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.btn:hover { background: var(--brand-soft); border-color: var(--brand); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn:disabled { opacity: 0.5; cursor: default; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: none;
  color: var(--text-2);
  cursor: pointer;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: none;
  background: none;
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.link-btn svg { width: 16px; height: 16px; }

.empty { margin: 0; padding: 36px 20px; text-align: center; color: var(--muted); }

.badge {
  min-width: 18px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
  color: #fff;
  background: var(--critical);
}

/* Station search in the app bar */
.search { position: relative; max-width: 460px; width: 100%; justify-self: start; }
.search input {
  width: 100%;
  height: 40px;
  padding: 0 14px 0 40px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--surface-3);
  outline: none;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { background: var(--surface); border-color: var(--border); box-shadow: var(--shadow-2); }
.search > svg { position: absolute; left: 14px; top: 11px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.search-results {
  position: absolute;
  top: 46px; left: 0; right: 0;
  z-index: 30;
  margin: 0;
  padding: 6px;
  list-style: none;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-3);
}
.search-results[hidden] { display: none; }
.search-results button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: var(--radius-sm);
  background: none;
  text-align: left;
  cursor: pointer;
}
.search-results button:hover, .search-results [aria-selected="true"] button { background: var(--surface-3); }
.search-results .sub { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }

/* Road-flood sensors: square, where gauges are round */
.dot.road-mark { border-radius: 3px; }
.dot.road-mark.hollow-road { background: var(--surface); box-shadow: inset 0 0 0 2px var(--good); }
