
/* IA 19.10 w4 (Astra 2.8 #7): one scroll level, the page under the map does not scroll (the column and the sheet do) */
html:has(> body > main.mp) { overflow: hidden; }
.mp { --mp-top: 120px; --mp-col: 380px; position: relative; display: grid; grid-template-columns: var(--mp-col) minmax(0, 1fr); height: calc(100vh - var(--mp-top)); height: calc(100dvh - var(--mp-top)); min-height: 480px; border-top: 1px solid var(--line); }
/* the column scrolls as one: filters on top, the head of the results sticks while the list scrolls under it */
.mp-panel { min-height: 0; overflow-y: auto; overscroll-behavior: contain; border-right: 1px solid var(--line); background: #fff; }
.mp-filters { padding: 18px 20px 12px; border-bottom: 1px solid var(--line); }
.mp-filters-head { display: none; }
.mp-h1 { margin: 0; font: 600 20px/1.25 var(--sans); letter-spacing: -.01em; color: var(--ink); }
.mp-layers { display: flex; gap: 4px; margin: 12px 0 0; padding: 4px; border-radius: 999px; background: var(--soft); }
.mp-layers a { flex: 1; display: grid; place-items: center; min-height: 40px; border-radius: 999px; color: var(--text); font: 600 14px var(--sans); text-decoration: none; }
.mp-layers a:hover, .mp-layers a:focus-visible { color: var(--accent); }
.mp-layers a[aria-current] { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(20,20,40,.14); }
.mp .sf--live { margin-top: 12px; }
.mp .sf-input { height: 48px; font-size: 16px; padding-left: 46px; }
/* IA 28: an empty field has no clear button, the placeholder gets the whole width */
.mp .sf-input:placeholder-shown { padding-right: 14px; }
.mp .sf-ico-search { left: 16px; }
.mp .sf-clear { top: 2px; }
.mp .sf-go { height: 48px; padding: 0 18px; font-size: 15px; }
/* IA 19.10 W1: in the 380 px column «Найти» is the icon (as on a phone, aria-label stays), the placeholder fits whole */
.mp .sf-go { width: 48px; padding: 0; flex: none; }
.mp .sf-go svg { display: block; }
.mp .sf-go span { display: none; }
.mp .sf-filters { gap: 6px; margin-top: 12px; }
.mp .sf-fbtn, .mp .sf-allbtn { min-height: 38px; padding: 0 12px 0 14px; font-size: 14px; }
.mp .ps-active { margin-top: 10px; }
.mp-notice { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.mp-results { position: relative; }
.mp-results-head { position: sticky; top: 0; z-index: 3; background: #fff; }
.mp-sheet-handle { display: none; }
.mp-sum { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 20px 6px; }
.mp-count { margin: 0; font: 600 16px var(--sans); color: var(--ink); }
.mp-count small { display: block; margin-top: 2px; font: 400 13px var(--sans); color: var(--muted); }
.mp-tolist { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border: 1px solid #c9ccd4; border-radius: 999px;
  color: var(--ink); font: 600 14px var(--sans); text-decoration: none; background: #fff; }
.mp-tolist:hover, .mp-tolist:focus-visible { border-color: var(--accent); color: var(--accent); }
.mp-inview { margin: 0; padding: 0 20px 10px; font-size: 14px; color: var(--muted); }
.mp-scroll { padding: 0 12px 16px; }
.mp-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.mp-card { position: relative; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.mp-card:hover { border-color: #c9ccd4; }
.mp-card.is-active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.mp-card h3 { margin: 0; font: 600 15px/1.35 var(--sans); color: var(--ink); }
.mp-card h3 a { color: inherit; text-decoration: none; }
.mp-card h3 a:hover, .mp-card h3 a:focus-visible { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.mp-card p { margin: 3px 0 0; font-size: 13px; color: var(--muted); }
.mp-card .mp-meta { color: var(--text); }
.mp-card-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 6px; }
.mp-card-acts a, .mp-card-acts button { min-height: 32px; padding: 0; border: 0; background: none; color: var(--accent-dark); font: 600 13px var(--sans); text-decoration: none; cursor: pointer; }
.mp-card-acts a:hover, .mp-card-acts button:hover, .mp-card-acts a:focus-visible, .mp-card-acts button:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
.mp-more { display: block; width: 100%; margin-top: 10px; justify-content: center; }
.mp-mapbox { position: relative; isolation: isolate; min-width: 0; }
.mp .ps-map { display: block; position: absolute; inset: 0; z-index: 0; height: auto; border: 0; }
.mp .ps-map .c-map { margin: 0; height: 100%; border: 0; border-radius: 0; }
.mp .ps-map .c-map-el { height: 100%; }
.mp .ps-map-close { display: none !important; }
.mp .ps-map .c-pin.is-hl { transform: scale(1.3); background: var(--ink); }
.mp-mtools { display: none; }
/* Vlad 19.10 11:49: the base filters live in the left column, so does «Все фильтры»: the panel covers the column, not the map */
@media (min-width: 1000px) {
  .mp .sf-drawer { top: var(--mp-top); left: 0; right: auto; width: var(--mp-col); box-shadow: 24px 0 60px -30px rgba(18,20,26,.4); transform: translateX(-100%); }
  .mp .sf-drawer.is-open { transform: none; }
  .mp .sf-backdrop { top: var(--mp-top); left: var(--mp-col); background: rgba(18,20,26,.18); }
}
@media (max-width: 999px) {
  .mp { display: block; height: calc(100vh - var(--mp-top)); height: calc(100dvh - var(--mp-top)); }
  .mp-panel { display: contents; }
  .mp-mapbox { position: absolute; inset: 0; }
  .mp-mtools { display: flex; gap: 8px; position: absolute; top: 12px; left: 12px; right: 12px; z-index: 5; pointer-events: none; }
  .mp-mtools > * { pointer-events: auto; box-shadow: 0 6px 18px -6px rgba(20,20,40,.4); }
  .mp-mtools .mp-tolist { height: 44px; margin-left: auto; }
  .mp-mlayers { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: #fff; }
  .mp-mlayers a { display: grid; place-items: center; min-height: 38px; padding: 0 12px; border-radius: 999px; color: var(--text); font: 600 14px var(--sans); text-decoration: none; }
  .mp-mlayers a[aria-current] { background: var(--accent); color: #fff; }
  .mp-fbtn { height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--ink); color: #fff; font: 600 14px var(--sans); cursor: pointer; }
  /* «Искать в этой области» goes under the tools row */
  .mp .ps-map .c-area { top: 66px; }
  .mp .ps-map .leaflet-top.leaflet-left { top: 60px; }
  .mp { overflow: hidden; }
  .mp-filters { display: none; position: fixed; inset: 0; z-index: 80; overflow: auto; padding: 0 18px 24px; border: 0; background: #fff; }
  .mp.is-filters .mp-filters { display: block; }
  .mp-filters-head { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 32; margin: 0 -18px 4px; padding: 10px 18px; background: #fff; border-bottom: 1px solid var(--line); }
  .mp-filters-head b { font: 600 17px var(--sans); color: var(--ink); }
  .mp .sf-bar { position: static; margin: 0; padding: 0; background: none; backdrop-filter: none; }
  .mp-results { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; max-height: 64px; border-radius: 18px 18px 0 0; background: #fff;
    box-shadow: 0 -10px 30px -12px rgba(20,20,40,.35); transition: max-height .25s; padding-bottom: env(safe-area-inset-bottom); }
  .mp.is-sheet .mp-results { max-height: 66vh; max-height: 66dvh; }
  .mp-results { display: flex; flex-direction: column; }
  .mp-scroll { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; }
  .mp-results-head { position: static; }
  .mp-sheet-handle { display: flex; align-items: center; justify-content: center; gap: 10px; flex: none; width: 100%; min-height: 64px; padding: 8px 18px; border: 0; background: none;
    color: var(--ink); font: 600 15px var(--sans); cursor: pointer; }
  .mp-sheet-handle::before { content: ""; position: absolute; top: 7px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: #d5d8df; }
  .mp-sheet-handle small { font: 400 13px var(--sans); color: var(--muted); }
  .mp-mtools .mp-fbtn, .mp-mtools .mp-tolist { padding: 0 14px; }
  .mp-mlayers a { padding: 0 10px; }
  .mp-sum { padding-top: 0; }
  html.mp-lock { overflow: hidden; }
}
/* a phone: «Списком» moves from the tools row into the list sheet */
@media (min-width: 480px) and (max-width: 999px) { .mp-sum .mp-tolist { display: none; } }
@media (max-width: 479px) { .mp-mtools .mp-tolist { display: none; } }
@media (max-width: 999px) and (prefers-reduced-motion: reduce) { .mp-results { transition: none; } }
