/* assets/css/map.css
   Map page styles (loaded only by /themap/). Plain CSS - no Sass build needed.
   Layout follows the Vnukovo airport map: full-screen map, floating controls,
   bottom sheet on phones, sidebar on desktop, floating card for the selected place.
   Supersedes assets/css/style_partials/map.scss and list.scss for this page. */

body.map-page {
  --ink: #152233;
  --muted: #6B7686;
  --bg: #F4F5F8;
  --surface: #FFFFFF;
  --stroke: #E6E9F0;
  --blue: var(--blue-color, #3749F0);
  --blue-soft: #EEF0FE;
  --radius: 12px;
  --shadow: 0 1px 6px rgba(21, 34, 51, .06);
  --shadow-lg: 0 5px 16px rgba(21, 34, 51, .11);
  --peek: 128px;               /* collapsed sheet: grip + search + Places/Buses */
  --sheet-top-gap: 72px;       /* space above the sheet when fully open */

  margin: 0;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--bg);
  color: var(--ink);
}
html:has(body.map-page) { height: 100%; }

body.map-page .map-content {
  position: fixed;
  inset: 0;
  height: auto;
}

body.map-page .app {
  position: absolute;
  inset: 0;
  direction: ltr;              /* Hebrew mirrors the layout explicitly below */
}

/* ---------- map ---------- */
.mapShell {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.mapViewport {
  position: absolute;
  inset: 0;
  background: var(--bg);
  z-index: 1;
}
.leaflet-container {
  background: var(--bg);
  font: inherit;
  direction: ltr;
}
.floorSvg { width: 100%; height: 100%; }

/* ---------- floating controls ---------- */
.mapTopLeft {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  pointer-events: none;
}
.mapTopLeft > * { pointer-events: auto; }

/* phones: the logo sits straight on the map, no tile - a soft halo in the map colour keeps it clear of the lines */
.mapBrand {
  display: block;
  padding: 2px;
  margin: 2px 0 2px 2px;
  color: var(--blue);
  line-height: 0;
  filter: drop-shadow(0 0 1.5px var(--bg)) drop-shadow(0 0 3px var(--bg)) drop-shadow(0 0 6px var(--bg));
  transition: color .15s;
}
.mapBrand:hover { color: var(--ink); }
body.rtl .mapBrand { margin: 2px 2px 2px 0; }

.mapControls {
  position: absolute;
  top: 64px;                   /* below the language / menu buttons */
  right: 10px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.zoomControls {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ctrlBtn {
  position: relative;
  width: 44px;
  height: 44px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
  font-weight: 600; font-size: 18px; line-height: 1;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.ctrlBtn:hover { color: var(--blue); }
.ctrlBtn:disabled { opacity: .45; cursor: default; color: var(--muted); }

.ctrlBtn:focus-visible,
.mapBrand:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

/* ---------- place markers ---------- */
.poi { background: none; border: 0; }
.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, border-color .15s, background-color .15s;
}
.poiInner img { 
  width: 34px; /*20px; */
  height: 34px; 
  object-fit: contain; 
  transition: opacity .15s; }
.poi:hover .poiInner { transform: scale(calc(var(--poi-s, 1) * 1.1)); }
.poi--dim .poiInner { opacity: .35; transform: scale(calc(var(--poi-s, 1) * .85)); }
.poi--hit .poiInner { transform: scale(max(.8, var(--poi-s, 1))); }        /* search results stay readable */
.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);
}
/* zoomed far out: small dots instead of icons (the selected place and results keep theirs) */
.poi-far .poi:not(.poi--selected):not(.poi--hit) .poiInner {
  background: var(--blue);
  transform: scale(calc(var(--poi-s, 1) * .6));
}
.poi-far .poi:not(.poi--selected):not(.poi--hit) .poiInner img { opacity: 0; }
.poi-far .poi--dim:not(.poi--selected) .poiInner { background: var(--muted); }
/* bus stop and entrance tags ("8→12", "41"): assets/css/markers.css, shared with the mini maps */
.poiTip {
  font-weight: 600; font-size: 12px; line-height: 1.2;
  font-family: inherit;
  border-radius: 8px;
}

/* ---------- selected place card ---------- */
.placeCard {
  position: absolute;
  left: 10px;
  right: 66px;                 /* leave room for the control column */
  bottom: calc(var(--sheet-visible, 0px) + 10px);
  z-index: 600;
  transition: bottom .22s ease;
}
.placeCard[hidden] { display: none; }

.pcCard {
  position: relative;
  padding: 14px 44px 14px 16px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
body.rtl .pcCard { direction: rtl; padding: 14px 16px 14px 44px; }

.pcTitle { font-size: 17px; font-weight: 700; line-height: 1.25; }
.pcSub { margin-top: 3px; font-size: 13px; color: var(--muted); }
.pcFlag,
.pcNote {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}
.pcFlag { background: #FDECEC; color: #B42318; }
.pcNote { background: var(--bg); color: var(--muted); }
.pcDesc {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pcMore {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  border: 2px solid var(--stroke);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700; font-size: 14px; line-height: 1;
  font-family: inherit;
  cursor: pointer;
}
.pcMore:hover { border-color: var(--blue); color: var(--blue); }

.pcClose {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: var(--bg);
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
body.rtl .pcClose { right: auto; left: 8px; }
.pcClose:hover { background: var(--stroke); }

/* details dialog */
.placeDialog { position: fixed; inset: 0; z-index: 10000; }
.placeDialog[hidden] { display: none; }
.pdBackdrop { position: absolute; inset: 0; background: rgba(21, 34, 51, .45); }
.pdPanel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  box-sizing: border-box;          /* padding inside the width - it used to spill past the screen edges */
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100dvh - 96px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 24px 22px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  font-size: 15px;
  line-height: 1.5;
}
body.rtl .pdPanel { direction: rtl; }
.pdTitle { margin: 0 36px 4px 0; font-size: 22px; line-height: 1.25; }
body.rtl .pdTitle { margin: 0 0 4px 36px; }
.pdPanel h3 { margin: 18px 0 6px; font-size: 15px; }
.pdChip {
  display: inline-flex;
  gap: 10px;
  align-items: baseline;
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--bg);
}
.pdChip strong { font-size: 17px; }
.pcHours {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 14px;
  margin: 0;
  font-size: 14px;
}
.pcHours dt { color: var(--muted); }
.pcHours dd { margin: 0; }
.pdDesc { margin-top: 16px; }
.pdDesc img, .pdDesc iframe { max-width: 100%; }
.pdDesc iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; }
.pdLink {
  display: inline-block;
  margin-top: 16px;
  font-weight: 700;
  color: var(--blue);
  text-decoration: none;
}

/* ---------- bottom sheet (phones) ---------- */
.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 700;
  height: calc(100dvh - var(--sheet-top-gap));
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -2px 12px rgba(21, 34, 51, .07);
  transition: transform .25s cubic-bezier(.2, .9, .2, 1);
  will-change: transform;
}
.sheet.dragging { transition: none; }
body.rtl .sheet { direction: rtl; }

.sheetGrip {
  flex: none;
  display: grid;
  place-items: center;
  height: 22px;
  cursor: grab;
  touch-action: none;
}
.handle {
  width: 40px;
  height: 5px;
  border-radius: 3px;
  background: #CDD2DC;
}
.sheetBody {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.sheet[data-state="peek"] .sheetBody { overflow: hidden; }

/* ---------- list inside the sheet ---------- */
#panelRoot { padding: 0 16px 24px; }

.mlHeader {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 2px 0 10px;
  background: var(--surface);
}
.mlSearchRow {
  position: relative;
  display: flex;
  align-items: center;
}
.mlSearchIcon {
  position: absolute;
  left: 12px;
  display: flex;
  color: var(--muted);
  pointer-events: none;
}
body.rtl .mlSearchIcon { left: auto; right: 12px; }
.mlSearch {
  width: 100%;
  height: 46px;
  padding: 0 40px;
  border: 2px solid var(--stroke);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink);
  font-weight: 400; font-size: 16px; line-height: 1;      /* 16px stops iOS from zooming in */
  font-family: inherit;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.mlSearch::-webkit-search-cancel-button { display: none; }
.mlSearch:focus { border-color: var(--blue); background: var(--surface); }
.mlClear {
  position: absolute;
  right: 6px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
body.rtl .mlClear { right: auto; left: 6px; }
.mlClear[hidden] { display: none; }

.mlModes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-top: 8px;
  padding: 3px;
  border-radius: 10px;
  background: var(--bg);
}
.mlModeBtn {
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-weight: 600; font-size: 14px; line-height: 1;
  font-family: inherit;
  cursor: pointer;
}
.mlModeBtn.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(21, 34, 51, .07);
}

.mlTree { margin-top: 4px; }
.mlCat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 48px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 600; font-size: 16px; line-height: 1.2;
  font-family: inherit;
  text-align: start;
  cursor: pointer;
}
.mlCat:hover { color: var(--blue); }
.mlArrow { display: flex; color: var(--muted); transition: transform .2s; }
.mlSection.open .mlArrow { transform: rotate(180deg); }

.mlList { list-style: none; margin: 0; padding: 0 0 8px; }
.mlList li { margin: 0; }
.mlLink {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 42px;
  padding: 0 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font-weight: 400; font-size: 15px; line-height: 1.2;
  font-family: inherit;
  text-align: start;
  cursor: pointer;
}
.mlLink:hover { background: var(--bg); color: var(--blue); }
.mlLinkName { flex: 1; }
.mlCount { color: var(--muted); font-weight: 400; }          /* right after the name: "Synagogues (2)" */
.mlIcon { 
  flex: none; 
  width: 30px; /*22px; */
  height: 30px; 
  object-fit: contain; }

/* an opened group: title + close (x) on one line, stuck under the search header while the list scrolls */
.mlGroupHead {
  position: sticky;
  top: var(--ml-head-h, 104px);
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0 8px;
  background: var(--surface);
}
.mlGroupTitle { flex: 1; min-width: 0; margin: 0 2px; font-size: 18px; font-weight: 700; line-height: 1.3; }
.mlClose {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
  transition: background-color .15s, color .15s;
}
.mlClose:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .mlClose:hover { background: #E4E7EE; } }

.mlPlaces { list-style: none; margin: 0; padding: 0; }
.mlPlaces li { margin: 0; border-bottom: 1px solid var(--stroke); }
.mlPlaces li:last-child { border-bottom: 0; }
.mlPlaceBtn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 6px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  text-align: start;
  cursor: pointer;
}
.mlPlaceBtn:hover { background: var(--bg); }
.mlPlace.selected .mlPlaceBtn { background: var(--blue-soft); }
.mlPlaceText { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mlPlaceName { font-size: 15px; font-weight: 600; }
.mlPlaceSub { font-size: 12px; color: var(--muted); }
.mlPlaceSub em { font-style: normal; color: #B26B00; }

.empty {
  margin-top: 12px;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--muted);
  text-align: center;
}

.mlBusWrap .bus-grid { height: auto; overflow: visible; display: grid; gap: 6px; }
.mlBusWrap .bus-card-mini {
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: var(--surface);
}
.mlBusWrap .bus-card-mini:hover { border-color: var(--blue); }

/* ---------- header (language + menu) and footer on the map page ---------- */
body.map-page .map-footer {
  position: absolute;
  bottom: 10px;
  right: 10px;
  z-index: 750;
  display: none;
  gap: 10px;
  font-size: 11px;
}
body.map-page .map-footer a:hover { opacity: .5; }
body.map-page #cookie-banner {
  bottom: calc(var(--sheet-visible, 0px) + 10px);
  left: 10px;
  right: 10px;
  z-index: 900;
}

/* ---------- desktop: sidebar on the left ---------- */
@media (min-width: 980px) {
  body.map-page .app {
    display: grid;
    grid-template-columns: 380px 1fr;
    grid-template-rows: minmax(0, 1fr);   /* lets the sidebar list scroll */
  }
  .sheet {
    position: relative;
    grid-column: 1;
    grid-row: 1;
    height: 100%;
    min-height: 0;
    transform: none !important;
    border-radius: 0;
    box-shadow: 1px 0 0 var(--stroke);
    z-index: 700;
  }
  body.rtl .sheet { box-shadow: -1px 0 0 var(--stroke); }  /* RTL grid already puts column 1 on the right */
  .sheetGrip { display: none; }
  .sheet[data-state] .sheetBody { overflow: auto; }
  .sheetBrand { display: flex; }
  .mapBrand { display: none; }
  /* top gap lives inside the sticky header, so nothing scrolls away
     above it and the logo-to-search distance stays fixed */
  #panelRoot { padding: 0 20px 24px; }
  #panelRoot > :first-child:not(.mlHeader) { margin-top: 16px; }
  .mlHeader { padding-top: 20px; }

  .mapShell {
    position: relative;
    grid-column: 2;
    grid-row: 1;
    inset: auto;
    min-height: 0;
  }
  .placeCard {
    left: 16px;
    right: auto;
    width: 380px;
    bottom: 16px;
  }
  body.map-page .map-footer { display: flex; }
  body.map-page #cookie-banner { left: 396px; right: 16px; bottom: 16px; }
  body.map-page.rtl #cookie-banner { left: 16px; right: 396px; }
  body.rtl .placeCard { left: auto; right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .sheet, .placeCard, .poiInner, .mlArrow { transition: none; }
}


/* ---------- logo at the top of the sidebar (desktop) ---------- */
.sheetBrand {
  display: none;                /* shown on desktop, see media query */
  flex: none;
  align-items: center;
  gap: 10px;
  padding: 16px 20px 4px;
  color: var(--blue);
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
}
.sheetBrand span { color: inherit; }     /* name and icon share the colour */
.sheetBrand:hover { color: var(--ink); }

/* ---------- place card in a popup under the marker ---------- */
.leaflet-tooltip.pcTip {
  width: min(300px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  white-space: normal;
  font-family: inherit;
  cursor: default;
}
.leaflet-tooltip-bottom.pcTip::before {
  border-bottom-color: var(--surface);
}
.pcTip .pcCard { box-shadow: none; }

/* ---------- news strip at the top of the panel ---------- */
.mlNews { margin: 4px 0 8px; }
.mlNewsTitle {
  margin: 0 2px 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.mlNewsTrack {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 6px;
  scrollbar-width: thin;
}
.mlNewsCard {
  flex: 0 0 min(260px, 78%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  scroll-snap-align: start;
}
.mlNewsCard:hover { border-color: var(--blue); }
.mlNewsImg {
  display: block;
  height: 96px;
  background: var(--bg) center / cover no-repeat;
}
.mlNewsText { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px 12px; }
.mlNewsMain { font-size: 14px; font-weight: 700; line-height: 1.3; }
.mlNewsSub { font-size: 12px; color: var(--muted); }

@media (min-width: 980px) {
  .sheetBrand { display: flex; }
}

/* ---------- Hebrew: mirror the map chrome ---------- */
body.map-page.rtl .app { direction: rtl; }
body.map-page.rtl .mapShell { direction: ltr; }          /* Leaflet needs LTR */
body.rtl .mapTopLeft { left: auto; right: 10px; align-items: flex-end; }
body.rtl .mapControls { right: auto; left: 10px; }
body.rtl .placeCard { left: 66px; right: 10px; }
body.map-page.rtl .map-footer { right: auto; left: 10px; }

/* header buttons: assets/css/header.css (shared with every page) */

/* ---------- platform card: bus lines leaving from it ---------- */
.pcLinesTitle {
  margin: 12px 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.pcLines {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 220px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}
.pcLines li { margin: 0; }
.pcLine {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 6px;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
}
.pcLine:hover { background: var(--bg); }
.pcLine .bus-list-line { min-width: 38px; font-size: 16px; }
.pcLineCity { font-size: 14px; }
.pcLinesEmpty { margin-top: 10px; color: var(--muted); font-size: 13px; }
.pcLinePf { margin-inline-start: auto; flex: none; color: var(--muted); font-size: 12px; font-weight: 700; white-space: nowrap; }   /* bus stop card: platform of each line */

/* ---------- compass (north is down on the plans) ---------- */
.mapCompass {
  position: absolute;
  right: 12px;                                   /* under the zoom / floor column */
  bottom: calc(var(--sheet-visible, 0px) + 12px);
  z-index: 500;
  width: 40px;
  height: 40px;
  color: var(--ink);
  pointer-events: auto;
  transition: bottom .22s ease;
  /* sits on the map like the floor label: no island, a soft halo keeps it readable over lines */
  filter: drop-shadow(0 0 2px var(--bg)) drop-shadow(0 0 3px var(--bg));
}
.mapCompass svg { display: block; }
body.rtl .mapCompass { right: auto; left: 12px; }   /* the control column is on the left in Hebrew */


/* markers are clickable: pointer, not Leaflet's grab hand */
.leaflet-container .poi,
.leaflet-container .poi * { cursor: pointer; }

/* details window: phones - a card floating over the dimmed map, not a page */
@media (max-width: 600px) {
  .pdPanel { padding: 20px 18px; border-radius: 20px; }
  .pdPanel img, .pdPanel iframe, .pdPanel video { max-width: 100%; height: auto; }
  .pdPanel iframe { aspect-ratio: 16 / 9; width: 100%; }
}

/* ---------- after the list: latest blog posts + add a place ---------- */
.sheetExtras { padding: 8px 16px 24px; }
.sheetExtras[hidden] { display: none; }
@media (min-width: 980px) { .sheetExtras { padding: 0 20px 28px; } }
/* add a place: soft blue panel, no border, blue text (like a "partners" call-out) */
.sxAddPlace {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--blue-soft);
  color: var(--blue);
  text-decoration: none;
  transition: background-color .15s;
}
.sxAddPlace:hover { background: #E2E6FD; }
.sxAddPlace:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.sxAddPlace strong { font-size: 15px; font-weight: 700; }
.sxAddPlace small { color: var(--blue); opacity: .8; font-size: 13px; line-height: 1.35; }
.sxAddIcon {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
}

/* latest post: loudspeaker + title (replaces the "Updates" heading and date) */
.sxNews {                                         /* the latest post: one soft card (same family as "Add a place") */
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0 12px;
  padding: 14px 16px 12px;
  border-radius: var(--radius);
  background: var(--bg);
  transition: background-color .15s;
}
.sxNews:hover { background: #ECEEF3; }
.sxHead { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.sxLabel { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.sxDate { margin-inline-start: auto; font-family: var(--font-mono, monospace); font-size: 12px; }
.sxNews .sxTitle {
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
  display: -webkit-box;                        /* up to two lines, then "…" */
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sxNews .sxTitle::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }   /* the whole card opens the post */
.sxNews .sxTitle:focus-visible { outline: none; }
.sxNews:has(.sxTitle:focus-visible) { outline: 3px solid var(--blue); outline-offset: 2px; }
.sxAll { position: relative; z-index: 1; align-self: flex-start; color: var(--blue); font-size: 13px; font-weight: 600; text-decoration: none; }
.sxAll:hover { text-decoration: underline; }

/* phones: the cookie notice stays just above the search panel (bottom: --sheet-visible, see above), never over it */

/* bus search: result found by a town on the route ("via Bnei Brak", script.js findBusLines) */
.bus-via { color: var(--blue, #3749F0); font-weight: 600; }

/* details window: open / closed right now (placeCard.js statusNow) */
.pdStatus { display: inline-flex; align-items: center; gap: 8px; margin: 14px 0 4px; padding: 6px 12px; border-radius: 999px; font-size: 15px; font-weight: 700; }
.pdStatus.is-open { background: #E3F6EA; color: #136B37; }
.pdStatus.is-closed { background: #FDE7E4; color: #A8261B; }
.pdDot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }

/* ---------- current floor's name: plain text under the logo, top corner of the map (app.js renderFloors) ---------- */
.floorChip {
  max-width: min(300px, calc(100vw - 90px));   /* clear of the button column */
  padding: 0 4px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 0 3px var(--bg), 0 0 6px var(--bg), 0 0 10px var(--bg);   /* readable over the plan's lines */
}
/* the logo halo matches the map background */
body.map-page { --h-halo: var(--bg, #F4F5F8); }

/* ---------- text on the plans: street names (database.js mapLabels, MapController.setLabels) ---------- */
.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 */

/* ---------- isometric mode: the whole building instead of one flat floor (BuildingView.js) ----------
   Fills the map area under the map controls. The stack is the same idea as in the floor picker, bigger,
   with each floor's number and name beside it. Sizes (--w, --gap, --top, --cx) come from JS;
   .bvWorld carries the pan / zoom. */
.ctrlBtn--all { display: grid; place-items: center; }
.ctrlBtn--all.is-on { border-color: var(--blue); color: var(--blue); }
.bView {
  position: absolute;
  inset: 0 0 var(--sheet-visible, 0px) 0;
  z-index: 400;                                /* over the plan and its markers, under the map controls */
  overflow: hidden;
  background: var(--bg);                       /* same grey as the flat map */
  cursor: grab;
  touch-action: none;                          /* drag / pinch are handled in JS */
  user-select: none;
  animation: bvIn .2s ease-out;
}
.bView[hidden] { display: none; }
.bView.is-dragging { cursor: grabbing; }
.bView.is-closing { animation: bvOut .16s ease-in forwards; }
@keyframes bvIn { from { opacity: 0; } }
@keyframes bvOut { to { opacity: 0; } }
.mapCompass .cmpIso { display: none; }       /* compass: the isometric arrow only in isometric mode */
body.iso-mode .mapCompass .cmpIso { display: inline; }
body.iso-mode .mapCompass .cmpFlat { display: none; }
.bvWorld { position: absolute; inset: 0; transform-origin: 0 0; }
.bvWorld.is-easing { transition: transform .25s cubic-bezier(.2, .8, .2, 1); }
.bvStack { position: absolute; inset: 0; --h: calc(var(--w) * 1.148); direction: ltr; }

.bvSlab {
  --lift: 0px;
  position: absolute;
  left: calc(var(--cx) - var(--w) / 2);
  top: calc(var(--top) + var(--i) * var(--gap) - var(--h) / 2 - var(--lift));
  width: var(--w);
  height: var(--h);
  transform: rotateX(60deg) rotateZ(-45deg);
  transform-style: preserve-3d;                /* the pins stand up out of the plan */
  cursor: pointer;
  transition: top .35s cubic-bezier(.2, .8, .2, 1);
}
.bvSlab img { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; filter: drop-shadow(0 0 1.5px var(--bg)) drop-shadow(0 0 1.5px var(--bg)); }
body.iso-mode .bView:has(.bvPin) .bvSlab:not(.has-res) img { opacity: .35; }   /* results: their floors stand out */

/* pins: a result, standing on its floor (counter-rotated so it faces the viewer) */
.bvPins { position: absolute; inset: 0; transform-style: preserve-3d; pointer-events: none; }
.bvPin {
  --p: calc(var(--w) * .045);                  /* pin size in --w units, like everything else here */
  position: absolute;
  width: var(--p);
  height: calc(var(--p) * 1.6);
  margin: calc(var(--p) * -1.6) 0 0 calc(var(--p) / -2);   /* the tip sits on the place */
  padding: 0;
  border: 0;
  background: none;
  transform-origin: 50% 100%;
  transform: rotateZ(45deg) rotateX(-60deg);
  pointer-events: auto;
  cursor: pointer;
}
.bvPin span {
  position: absolute;
  inset: 0 0 auto 0;
  height: var(--p);
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 calc(var(--p) * .15) #fff;
}
.bvPin::after { content: ""; position: absolute; left: calc(50% - var(--p) * .06); top: calc(var(--p) * .95); width: calc(var(--p) * .12); height: calc(var(--p) * .65); background: var(--blue); }
.bvPin:hover span, .bvPin:focus-visible span { background: var(--ink); }

/* opening: the floors start packed together and spread apart */
.bView.is-packed .bvSlab { transition: none; }
.bView.is-packed .bvSlab { top: calc(var(--top) + (var(--n) - 1) * var(--gap) / 2 - var(--h) / 2); }

}
@media (prefers-reduced-motion: reduce) {
  .bView, .bView.is-closing { animation: none; }
  .bvSlab, .bvWorld.is-easing { transition: none; }
}

/* isometric mode: the floor number beside each slab (just right of its corner) */
.bvNum {
  position: absolute;
  left: calc(var(--cx) + var(--w) * .66);                 /* the plans leave the slab corner empty: tuck in */
  top: calc(var(--top) + var(--i) * var(--gap));
  transform: translateY(-50%);
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: calc(var(--w) * .16);                       /* only in --w units: the sharp redraw after a zoom must not change it */
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: top .35s cubic-bezier(.2, .8, .2, 1), opacity .3s;
}
.bvNum:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
.bView.is-packed .bvNum { transition: none; opacity: 0; }
@media (prefers-reduced-motion: reduce) { .bvNum { transition: none; } }

/* isometric mode: sizes are re-applied after a zoom (sharp redraw) - no transitions for that step */
.bView.is-baking .bvSlab, .bView.is-baking .bvNum, .bView.is-baking .bvWorld { transition: none !important; }

/* ---------- floor up / down: right column, between zoom and the isometric button ---------- */
.floorStep { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.floorStep .ctrlBtn { display: grid; place-items: center; }
.floorStepNum {
  width: 44px;
  padding: 2px 0;
  color: var(--ink);
  font-family: var(--font-mono, monospace);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-shadow: 0 0 3px var(--bg), 0 0 6px var(--bg);   /* readable over the plan's lines */
}

/* ---------- desktop hover: search box and the Places / Buses switch (mouse only, not touch) ---------- */
.mlSearch, .mlModeBtn, .mlClear { transition: border-color .15s, background-color .15s, color .15s; }
@media (hover: hover) and (pointer: fine) {
  .mlSearch:hover:not(:focus) { border-color: #CDD3DE; background: #EEF0F4; }
  .mlModeBtn:not(.active):hover { background: rgba(255, 255, 255, .55); color: var(--ink); }
  .mlClear:hover { background: var(--bg); color: var(--ink); }
}

/* ---------- platform / bus stop card: the lines leaving from it ----------
   Leaflet colours every link on the map (.leaflet-container a { color: #0078A8 }) - take that back,
   then: line number as a mono tag with the operator's colour underneath, destination in plain text */
.leaflet-container .pcLine, .pcLine { color: var(--ink); }
.pcLine .bus-list-line {
  flex: none;
  min-width: 46px;
  padding: 4px 6px 3px;
  border-radius: 6px 6px 2px 2px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-mono, monospace);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}
.pcLineText { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }   /* destination, platform under it */
.pcLineCity { color: var(--ink); font-size: 14px; line-height: 1.35; }
.pcLine .pcLinePf { margin: 0; color: var(--muted); font-size: 12px; font-weight: 500; }
.pcLine:hover .pcLineCity { color: var(--blue); }

/* ---------- joined controls: + / - and floor up / number / down are one white block each,
   with thin dividers - like the Places / Buses switch ---------- */
.ctrlGroup {
  gap: 0;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.ctrlGroup .ctrlBtn { border-radius: 0; background: transparent; box-shadow: none; }
.ctrlGroup .ctrlBtn + .ctrlBtn,
.ctrlGroup .floorStepNum + .ctrlBtn,
.ctrlGroup .ctrlBtn + .floorStepNum { border-top: 1px solid var(--stroke); }
@media (hover: hover) and (pointer: fine) {
  .ctrlGroup .ctrlBtn:not(:disabled):hover { background: var(--bg); }
}
.floorStep .floorStepNum { padding: 6px 0; text-shadow: none; }   /* inside the white block now */

/* pinned ("Featured") places: first in the lists, with a small label (database.js "pinned": true) */
.mlFeatured {
  display: inline-block;
  margin-inline-start: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #F9DF6D;
  color: #140D8A;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
  vertical-align: 2px;
}
