/* map: the site look (black, white, bold Inter, sharp corners) around a dark map. */

[hidden] {
  display: none !important;
}

.mapage {
  max-width: 1100px;
  padding-top: 24px;
}

.top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

h1 {
  margin: 0;
  font-size: clamp(32px, 8vw, 48px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.stamp {
  color: var(--dim);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.modes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.mode {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 14px;
  background: #000;
  color: var(--dim);
  border: 1px solid var(--faint);
  border-radius: 0;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.mode:hover { border-color: #777; }

.mode[aria-pressed="true"] {
  background: #fff;
  color: #000;
  border-color: #fff;
}

.mode .count {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.mode .count:empty { display: none; }

#map {
  width: 100%;
  height: min(74vh, 780px);
  min-height: 420px;
  background: #000;
  border: 1px solid var(--faint);
}

.notice {
  margin: 10px 0 0;
  color: #fbbf24;
  font-size: 14px;
}

.linebox {
  margin-top: 12px;
}

.linebox summary {
  color: var(--dim);
  font-size: 14px;
  cursor: pointer;
}

.linebox summary:hover { color: var(--fg); }

.linechips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.linechip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: #000;
  color: var(--fg);
  border: 1px solid var(--faint);
  border-radius: 0;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.linechip i {
  display: block;
  width: 10px;
  height: 10px;
}

.linechip[aria-pressed="false"] { color: #555; }
.linechip[aria-pressed="false"] i { opacity: 0.25; }
.linechip:hover { border-color: #777; }

.closures {
  margin-top: 12px;
}

.closures summary {
  color: #fbbf24;
  font-size: 14px;
  cursor: pointer;
}

.closurelist {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  font-size: 14px;
}

.closurelist li {
  padding: 8px 0;
  border-top: 1px solid var(--faint);
  color: #ccc;
  line-height: 1.4;
}

.closurelist li:last-child { border-bottom: 1px solid var(--faint); }

.closurelist i {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 8px;
}

.closurelist b { color: var(--fg); }

.note {
  margin: 12px 0 0;
  color: var(--dim);
  font-size: 13px;
  max-width: 70ch;
}

.credits {
  margin: 12px 0 0;
  max-width: 70ch;
}

.credits a { text-decoration: underline; }

/* MapLibre controls and popups restyled to match the site. */

.maplibregl-map { font-family: inherit; }

.maplibregl-ctrl-group {
  background: #000;
  border: 1px solid var(--faint);
  border-radius: 0;
  box-shadow: none !important;
}

.maplibregl-ctrl-group button + button { border-top: 1px solid var(--faint); }
.maplibregl-ctrl-icon { filter: invert(1); }

.maplibregl-ctrl-attrib {
  background: rgba(0, 0, 0, 0.7) !important;
  color: var(--dim);
  font-size: 11px;
}

.maplibregl-ctrl-attrib a { color: var(--dim); }

.maplibregl-popup-content {
  padding: 10px 12px;
  background: #000;
  color: var(--fg);
  border: 1px solid #555;
  border-radius: 0;
  box-shadow: none;
  font-size: 14px;
  line-height: 1.35;
}

.maplibregl-popup-content .p-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}

.maplibregl-popup-content .p-line i {
  display: block;
  width: 10px;
  height: 10px;
}

.maplibregl-popup-content .p-sub {
  margin-top: 2px;
  color: var(--dim);
  font-weight: 700;
}

.maplibregl-popup-close-button {
  color: var(--dim);
  font-size: 18px;
  padding: 0 6px;
}

.maplibregl-popup-anchor-top .maplibregl-popup-tip,
.maplibregl-popup-anchor-top-left .maplibregl-popup-tip,
.maplibregl-popup-anchor-top-right .maplibregl-popup-tip { border-bottom-color: #555; }
.maplibregl-popup-anchor-bottom .maplibregl-popup-tip,
.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip,
.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip { border-top-color: #555; }
.maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color: #555; }
.maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color: #555; }

/* Follow a bus route */

.busform {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.busform label {
  color: var(--dim);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.busform input {
  flex: 1 1 160px;
  min-width: 0;
  max-width: 260px;
  padding: 10px 12px;
  background: #000;
  color: var(--fg);
  border: 1px solid var(--faint);
  border-radius: 0;
  font: inherit;
  font-size: 15px;
}

.busform input:hover { border-color: #777; }

.busform .btn {
  font: inherit;
  font-size: 14px;
  padding: 10px 16px;
  border-radius: 0;
  cursor: pointer;
  background: #fff;
  color: #000;
  border: 1px solid #fff;
  font-weight: 800;
}

.busform .btn-ghost {
  background: #000;
  color: var(--fg);
  border: 1px solid var(--faint);
  font-weight: 700;
}

.busform .btn-ghost:hover { border-color: #fff; }

.busnote {
  margin: -4px 0 12px;
  color: var(--dim);
  font-size: 14px;
}
