/* assets/css/places.css
   Place lists (/places...) and breadcrumbs on place pages. Plain CSS, no Sass build. */

.places-page {
  --ink: #152233;
  --muted: #6B7686;
  --bg: #F4F5F8;
  --stroke: #E6E9F0;
  --blue: var(--blue-color, #3749F0);
  --blue-soft: #EEF0FE;
  color: var(--ink);
}

/* ---------- breadcrumbs ---------- */
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 0;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
  font-size: 14px;
  line-height: 1.4;
}
.breadcrumbs li { margin: 0; color: var(--muted); }
.breadcrumbs li + li::before {
  content: "›";
  display: inline-block;
  margin: 0 8px;
  color: #A7AFBC;
}
body.rtl .breadcrumbs li + li::before { content: "‹"; }
.breadcrumbs a { color: var(--ink); text-decoration: none; }
.breadcrumbs a:hover { color: var(--blue); text-decoration: underline; }
.breadcrumbs [aria-current="page"] { color: var(--muted); }

/* ---------- place page extras ---------- */
.places-page--place { margin-bottom: 8px; }
.plMapButton {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 2px solid var(--stroke);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.plMapButton:hover { border-color: var(--blue); color: var(--blue); }

/* ---------- list page ---------- */
.plTitle { margin: 0 0 4px; font-size: 32px; line-height: 1.2; }
.plCount { margin: 0 0 18px; color: var(--muted); }

/* search */
.plSearch {
  position: relative;
  display: flex;
  gap: 8px;
  max-width: 640px;
  margin: 14px 0 6px;
}
.plSearchIcon {
  position: absolute;
  top: 50%;
  inset-inline-start: 14px;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.plSearchInput {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding-inline: 42px 40px;
  border: 2px solid var(--stroke);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;                 /* 16px stops iOS from zooming in */
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.plSearchInput::-webkit-search-cancel-button { display: none; }
.plSearchInput:focus { border-color: var(--blue); }
.plSearchClear {
  position: absolute;
  top: 50%;
  inset-inline-end: 104px;         /* just inside the input, before the button */
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  text-decoration: none;
}
.plSearchClear:hover { background: var(--bg); color: var(--ink); }
.plSearchBtn {
  flex: none;
  width: 92px;
  height: 48px;
  border: 0;
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.plSearchBtn:hover { filter: brightness(1.1); }
.plEmpty a { color: var(--blue); font-weight: 600; }

.plFilters { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.plFilterRow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.plFilterLabel { margin-inline-end: 4px; color: var(--muted); font-size: 13px; font-weight: 600; }

.plChip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border: 2px solid var(--stroke);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.plChip:hover { border-color: var(--blue); color: var(--blue); }
.plChip.is-on { border-color: var(--blue); background: var(--blue); color: #fff; }
.plChipCount { font-weight: 400; opacity: .7; }
.plChip--small { min-width: 36px; justify-content: center; padding: 0 10px; }
.plReset { align-self: flex-start; font-size: 14px; color: var(--blue); }

.plGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
  margin: 0 0 40px;
  padding: 0;
  list-style: none;
}
.plCard {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.plCard:hover { border-color: var(--blue); box-shadow: 0 1px 6px rgba(21, 34, 51, .05); }
.plIcon { flex: none; width: 28px; height: 28px; object-fit: contain; }
.plBody { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.plName {
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
}
/* the whole card is clickable (name link stretched over it) */
.plName::after { content: ""; position: absolute; inset: 0; border-radius: 14px; }
.plName:focus-visible { outline: none; }
.plCard:has(.plName:focus-visible) { outline: 3px solid var(--blue); outline-offset: 2px; }
.plGroup { color: var(--ink); font-size: 13px; }
.plMeta { color: var(--muted); font-size: 13px; }
.plMapLink {
  position: relative;               /* above the stretched card link */
  z-index: 1;
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
}
.plMapLink:hover { background: var(--blue-soft); color: var(--blue); }
.plEmpty { padding: 20px; border-radius: 14px; background: var(--bg); color: var(--muted); }

@media (max-width: 600px) {
  .plTitle { font-size: 26px; }
  .plFilterRow { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .plFilterRow::-webkit-scrollbar { display: none; }
}

/* ---------- mini map on place pages ---------- */
.miniMap {
  --ink: #152233;
  --muted: #6B7686;
  --bg: #F4F5F8;
  --surface: #fff;
  --blue: var(--blue-color, #3749F0);
  position: relative;
  height: clamp(300px, 52vh, 480px);
  margin: 18px 0 24px;
  overflow: hidden;
  border: 1px solid #E6E9F0;
  border-radius: 18px;
  background: var(--bg);
  isolation: isolate;
}
.miniMap[hidden] { display: none; }
.miniMapViewport { position: absolute; inset: 0; z-index: 1; background: var(--bg); }
.miniMap .leaflet-container { background: var(--bg); font: inherit; direction: ltr; }
.miniMap .floorSvg { width: 100%; height: 100%; }

.miniMapChip {
  position: absolute;
  top: 12px;
  inset-inline-start: 14px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  font-size: 14px;
  line-height: 1.25;
  text-shadow: 0 0 3px var(--bg), 0 0 6px var(--bg);
  pointer-events: none;
}
.miniMapChip strong { font-size: 17px; }
.miniMapChip span { color: var(--muted); }

.miniMapZoom {
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.miniMapZoom button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 6px rgba(21, 34, 51, .06);
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
}
.miniMapZoom button:hover { color: var(--blue); }
.miniMapZoom button:disabled { opacity: .45; cursor: default; color: var(--muted); }

.miniMapOpen {
  position: absolute;
  bottom: 14px;
  inset-inline-end: 14px;
  z-index: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  box-shadow: 0 2px 8px rgba(55, 73, 240, .18);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}
.miniMapOpen:hover { filter: brightness(1.1); color: #fff; }

.miniMapNote {
  position: absolute;
  bottom: 14px;
  inset-inline-start: 14px;
  z-index: 500;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--surface);
  color: #B26B00;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 1px 6px rgba(21, 34, 51, .06);
}

/* place markers - same look as on /themap (assets/css/map.css) */
.miniMap .poi { background: none; border: 0; }
.miniMap .poiInner {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--surface);
  box-shadow: 0 1px 3px rgba(21, 34, 51, .17);
  transform: scale(var(--poi-s, 1));            /* --poi-s: set from the zoom (MapController) */
  transition: transform .15s, opacity .15s, background-color .15s;
}
.miniMap .poiInner img { width: 20px; height: 20px; object-fit: contain; transition: opacity .15s; }
.miniMap .poi:hover .poiInner { transform: scale(calc(var(--poi-s, 1) * 1.1)); }
.miniMap .poi--dim .poiInner { opacity: .35; transform: scale(calc(var(--poi-s, 1) * .85)); }
.miniMap .poi-far .poi:not(.poi--selected) .poiInner { background: var(--blue); transform: scale(calc(var(--poi-s, 1) * .6)); }
.miniMap .poi-far .poi:not(.poi--selected) .poiInner img { opacity: 0; }
.miniMap .poi--selected .poiInner {
  border-color: var(--blue);
  transform: scale(max(1.15, calc(var(--poi-s, 1) * 1.3)));
  box-shadow: 0 0 0 6px rgba(55, 73, 240, .18), 0 2px 5px rgba(21, 34, 51, .18);
}
.miniMap .poiTip { font-family: inherit; font-size: 12px; font-weight: 600; border-radius: 8px; }
.miniMap .poiTip--selected { font-size: 14px; font-weight: 700; color: var(--ink); }

@media (max-width: 600px) {
  .miniMap { height: 320px; border-radius: 14px; margin-inline: -4px; }
  .miniMapOpen { inset-inline: 12px; justify-content: center; }
  .miniMapNote { bottom: 70px; inset-inline: 12px; text-align: center; }
}

/* ---------- platform page: bus lines leaving from it ---------- */
.plLines { margin: 8px 0 24px; }
.plLines h2 { margin: 0 0 10px; font-size: 20px; }
.plLinesList {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.plLinesList li { margin: 0; }
.plLinesList a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #E6E9F0;
  border-radius: 12px;
  background: #fff;
  color: #152233;
  text-decoration: none;
}
.plLinesList a:hover { border-color: var(--blue-color, #3749F0); }
.plLinesList .bus-list-line { min-width: 40px; font-size: 18px; }

/* ---------- line page: "?" next to Section, with the sections diagram ---------- */
#map-container.svg-container { overflow: visible; position: relative; z-index: 20; }  /* was clipping the popover; stays above the mini map */
#directions .help-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-inline-start: 6px;
  padding: 0;
  vertical-align: middle;
  font-size: 15px;
  line-height: 1;
}
#directions .help-window {
  top: calc(100% + 10px);
  right: -10px;
  left: auto;
  box-sizing: border-box;
  width: min(380px, calc(100vw - 32px));
  padding: 12px;
  border: 0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(21, 34, 51, .11);
  color: #152233;
  cursor: default;
}
body.rtl #directions .help-window { right: auto; left: -10px; }
#directions .help-window img { display: block; width: 100%; height: auto; }

/* ---------- compass in the mini map (north is down) ---------- */
.miniMap .mapCompass {
  position: absolute;
  bottom: 70px;                                  /* above "Switch to map view" */
  inset-inline-end: 14px;
  z-index: 500;
  width: 40px;
  height: 40px;
  color: var(--ink);
  filter: drop-shadow(0 0 2px var(--bg)) drop-shadow(0 0 3px var(--bg));   /* on the map, like the floor label */
}
.miniMap .mapCompass svg { display: block; }
@media (max-width: 600px) {
  .miniMap .mapCompass { bottom: 68px; inset-inline-end: 12px; }
  .miniMapNote { inset-inline-end: 64px; }       /* keep the note clear of the compass */
}

/* mini map markers are clickable (they open the place page) */
.miniMap .leaflet-container .poi,
.miniMap .leaflet-container .poi * { cursor: pointer; }

/* ---------- line page: header (title, operator, "via ...") ---------- */
.lineHead h1 { margin: 0; font-size: 1.5em; line-height: 1.25; }
.lineSub {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  margin: 8px 0 0;
  font-size: 15px;
}
.lineOperator { font-weight: 700; padding-bottom: 1px; }
.lineVia { color: #6B7686; text-decoration: none; }
.lineVia:hover { color: var(--blue-color, #3749F0); text-decoration: underline; }
.lineMap .miniMap { margin: 14px 0 16px; }

/* ---------- line page: stops on the route (inc/line_stops.php) ---------- */
.lineStops { margin: 8px 0 40px; }
.lineStops h2 { margin: 0 0 4px; font-size: 20px; }
.lsSummary { margin: 0 0 12px; color: var(--muted); }
.lsJump { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; }
.lsGroup { scroll-margin-top: 90px; }            /* fixed header */
.lsCity {
  position: relative;
  margin: 0;
  padding: 10px 0 6px;
  padding-inline-start: 30px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .02em;
  color: var(--ink);
}
.lsStops { margin: 0; padding: 0; list-style: none; }
.lsStop {
  position: relative;
  margin: 0;
  padding: 7px 0;
  padding-inline-start: 30px;                    /* room for the route line and dots */
}
/* the route line (also through the city headings, but not above the first stop)... */
.lsStop::before,
.lsGroup + .lsGroup .lsCity::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: 6px;
  width: 3px;
  background: var(--blue);
  opacity: .25;
}
.lsGroup:first-of-type .lsStop--first::before { top: 50%; }
.lsStop--last::before { bottom: 50%; }
/* ...and a dot per stop */
.lsStop::after {
  content: "";
  position: absolute;
  top: 50%;
  inset-inline-start: 2px;
  width: 11px;
  height: 11px;
  margin-top: -5.5px;
  box-sizing: border-box;
  border: 3px solid var(--blue);
  border-radius: 50%;
  background: #fff;
}
.lsStop--first::after, .lsStop--last::after {
  width: 15px; height: 15px; margin-top: -7.5px;
  inset-inline-start: 0;
  background: var(--blue);
}
.lsBody { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.lsName { font-size: 15px; font-weight: 600; line-height: 1.3; }
.lsStop--first .lsName, .lsStop--last .lsName { font-weight: 800; }
.lsMeta { display: flex; flex-wrap: wrap; gap: 0 10px; color: var(--muted); font-size: 12.5px; }
.lsSign { unicode-bidi: isolate; }
.lsTag { color: #B26B00; font-weight: 600; }
.lsNote { margin: 16px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--bg); color: var(--muted); font-size: 13px; line-height: 1.5; }

@media (max-width: 600px) {
  .lsJump { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .lsJump::-webkit-scrollbar { display: none; }
}

/* maps inside a page: "Ctrl + scroll to zoom" / "two fingers" hint (MapController cooperative gestures) */
.mapHint {
  position: absolute;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(21, 34, 51, .45);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s;
}
.mapHint.is-on { opacity: 1; }

/* place page: its number in yellow boxes, like the shop-number signs (and the /join form) */
.plNumber { display: flex; align-items: center; gap: 6px; margin: 12px 0 0; }
body.rtl .plNumber { justify-content: flex-end; }
.plDigit {
  display: grid;
  place-items: center;
  width: 44px;
  height: 52px;
  border-radius: 6px;
  background: #F9DF6D;
  color: #140D8A;
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
}
.plDigitSep { color: #140D8A; font-size: 26px; font-weight: 800; }

/* street names on the mini map: same style as the big map (map.css) */
.mapLabels { pointer-events: none; }
.mapLabels.is-tiny { visibility: hidden; }             /* zoomed out too far to read */
.mapLabel {
  fill: #7C8596;
  stroke: var(--bg, #F4F5F8);                          /* halo: readable over the plan's lines */
  stroke-width: 4px;
  stroke-linejoin: round;
  paint-order: stroke;
  font-size: 15px;                                     /* plan units - grows and shrinks with the map */
  font-weight: 600;
}
.mapLabel--street { text-transform: uppercase; letter-spacing: .14em; }
:lang(he) .mapLabel--street { letter-spacing: 0; font-size: 16px; }   /* no spacing between Hebrew letters */

/* compass: the isometric arrow is only for the big map's isometric mode (map.css) */
.mapCompass .cmpIso { display: none; }

/* pinned ("Featured") places: first on /places, with a small label (database.js "pinned": true) */
.plNameRow { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }   /* name + "Featured" on one line */
.plFeatured {
  display: inline-block;
  flex: none;
  padding: 1px 6px;
  border-radius: 4px;
  background: #F9DF6D;
  color: #140D8A;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
}
