/* BRT تهران section (inc/brt.php, page-templates/template-brt.php, single-reylo_brt_*.php) */

/* ------------------------------------------------------------------ map */
.reylo-brt-map {
  position: relative;
  height: 360px;
  margin: 20px 0;
  border: 1.5px solid var(--rule);
  border-radius: var(--r-md);
  background: var(--paper-2);
  overflow: hidden;
}
.prose .reylo-brt-map { height: 340px; }
.brt-map--full {
  height: calc(100vh - var(--header-h) - 40px);
  min-height: 420px;
  max-height: 820px;
  margin: 0;
  border-radius: 0;
  border-inline: 0;
}
.brt-map__chips {
  position: absolute;
  inset-inline-end: 10px; /* the zoom controls sit at the other top corner */
  top: 10px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: calc(100% - 64px);
}
.brt-map__chip {
  --lc: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 8px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--rule);
  border-radius: 999px;
  cursor: pointer;
}
.brt-map__chip::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--lc);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
}
.brt-map__chip[aria-pressed='true'] {
  border-color: var(--lc);
  box-shadow: inset 0 0 0 1.5px var(--lc);
}
.brt-map__msg {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.9rem;
}
.brt-pop { font-family: var(--font); direction: rtl; text-align: right; min-width: 170px; }
.brt-pop b { display: block; font-size: 1rem; margin-bottom: 6px; }
.brt-pop .lbs { margin-bottom: 6px; }
.brt-pop p { margin: 4px 0; font-size: 0.85rem; color: var(--ink-2); }
.brt-pop a { color: var(--blue); font-weight: 700; }
.brt-pop__metro { display: inline-block; padding: 1px 6px; border-radius: 4px; background: var(--paper-2); font-size: 0.8rem; }
.reylo-brt-map .maplibregl-popup-content { border-radius: var(--r-md); padding: 12px 14px; box-shadow: var(--shadow); }

/* ------------------------------------------------------------------ hub */
.brt-hero {
  padding: 18px 0 40px;
  background: var(--paper);
  border-bottom: 1.5px solid var(--rule);
}
.brt-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 36px;
  align-items: start;
}
.brt-hero__title {
  margin: 10px 0 14px;
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
}
.brt-hero__title span {
  background: linear-gradient(transparent 62%, color-mix(in srgb, #7806f9 26%, transparent) 62%);
}
.brt-hero__sub { color: var(--ink-2); font-size: 1.05rem; max-width: 34em; }
.brt-hero__map .reylo-brt-map { margin: 0; height: 440px; }
.brt-find {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  margin: 22px 0 14px;
  padding: 14px;
  background: var(--surface);
  border: 1.5px solid var(--rule);
  border-radius: var(--r-md);
}
.brt-find .planner__field { flex: 1 1 220px; }
.brt-find .planner__error { flex-basis: 100%; margin: 0; }
.brt-hero__links { display: flex; flex-wrap: wrap; gap: 8px; }
.brt-split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 28px;
  align-items: start;
}
.brt-split .status-board { margin: 0; }
.brt-hours { width: 100%; border-collapse: collapse; background: var(--surface); }
.brt-hours th, .brt-hours td { padding: 10px 12px; border-bottom: 1px solid var(--rule); text-align: right; }
.brt-hours th { font-size: 0.85rem; color: var(--muted); }
.brt-note { margin-top: 14px; font-size: 0.86rem; color: var(--muted); }
.brt-card .line-card__meta { flex-wrap: wrap; }
.brt-card.is-alert { border-color: var(--red); }
.brt-card__alert { color: var(--red); font-weight: 700; }

/* ------------------------------------------------------------------ map page */
.brt-mappage__head { margin: 6px 0 16px; }
.brt-mappage__head h1 { margin: 6px 0; font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
.brt-mappage__head p { margin: 0; color: var(--ink-2); max-width: 52em; }
.brt-mappage .brt-cards { margin-top: 24px; }

/* ------------------------------------------------------------------ stations archive */
.brt-block { --lc: var(--ink); }
.brt-block .city-block__head h2 { display: flex; align-items: center; gap: 10px; }
.brt-stops {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 6px 18px;
  margin: 0;
  padding: 14px 18px 14px 0;
  border-inline-start: 4px solid var(--lc);
  list-style: none;
  counter-reset: stop;
}
.brt-stops li { counter-increment: stop; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; }
.brt-stops li::before { content: counter(stop, persian) '.'; color: var(--muted); font-size: 0.8rem; min-width: 1.6em; }
.brt-stops a { font-weight: 700; color: var(--ink); text-decoration: none; }
.brt-stops a:hover { text-decoration: underline; }
.brt-stops__tag { font-size: 0.74rem; padding: 0 6px; border-radius: 4px; background: var(--paper-2); color: var(--ink-2); }
.brt-stops__tag--metro { background: color-mix(in srgb, var(--red) 12%, transparent); }

@media (max-width: 980px) {
  .brt-hero__grid, .brt-split { grid-template-columns: 1fr; }
  .brt-hero__map .reylo-brt-map { height: 360px; }
}
@media (max-width: 640px) {
  .reylo-brt-map, .prose .reylo-brt-map { height: 300px; }
  .brt-map--full { height: 70vh; }
  .brt-map__chip { padding: 3px 8px 3px 6px; font-size: 0.76rem; }
}
