/* Academ: fluid footer and map workspace, 2026-10-21. */
body:has(#big_map) #footer.an-footer {
  width:100%; max-width:none; min-width:0; margin:0;
}
body:has(#big_map) #footer.an-footer > .wrapper {
  width:100%; max-width:1440px; min-width:0;
  margin:0 auto; padding:32px clamp(18px,3vw,48px) 28px;
}
body:has(#big_map) #footer.an-footer .footerBody {
  grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);
  border-top:0; gap:22px;
}
body:has(#big_map) #footer.an-footer .footerFirst,
body:has(#big_map) #footer.an-footer .footerSecond { min-width:0; }
@media(max-width:699px) {
  body:has(#big_map) #footer.an-footer .footerBody { grid-template-columns:minmax(0,1fr); gap:16px; }
  body:has(#big_map) #footer.an-footer > .wrapper { padding:24px 16px 80px; }
  body:has(#big_map) #footer.an-footer .footerThird { grid-column:1/-1; }
}
body:has(#big_map) #footer.an-footer .footerThird { grid-column:1/-1; }
/* Let the map shrink instead of pushing the cards out of the viewport. */
#big_map .content_searching {
  display:grid; grid-template-columns:270px minmax(0,1fr) 280px;
  width:100%; min-width:0; align-items:stretch;
}
#big_map .content_searching::after { display:none; }
#big_map .content_searching > #filter,
#big_map .content_searching > #big_map_container,
#big_map .content_searching > #found_variants {
  min-width:0; width:auto; float:none; box-sizing:border-box;
  height:calc(100vh - 117px); min-height:420px;
}
#big_map .content_searching > #filter { overflow:auto; text-align:left; }
#big_map .content_searching > #found_variants { overflow:auto; }
#big_map .content_searching > #big_map_container { overflow:hidden; }
#big_map #filter #filter_div { min-height:0; padding-bottom:16px; }
#big_map #filter .filter_col {
  box-sizing:border-box; width:100%; height:auto; float:none;
  margin:0; padding:12px; border:0;
}
#big_map #filter .filter_row { box-sizing:border-box; max-width:100%; }
#big_map #filter select,
#big_map #filter input[type="text"] { box-sizing:border-box; max-width:100%; }
#big_map #filter select { width:100%; }
#big_map #filter .filterBigMap_wrap .filterBigMap { max-width:100%; box-sizing:border-box; }
#big_map #filter .an-map-request-slot { clear:both; padding:8px 0 14px; }
#big_map #filter .an-map-request-slot #sendzayav {
  display:flex !important; align-items:center; justify-content:center;
  position:static !important; float:none !important;
  width:100% !important; max-width:100%; height:auto !important;
  min-height:46px; margin:0; padding:12px 14px; box-sizing:border-box;
  border:1px solid #8d1717; border-radius:8px;
  background:#ae1414 !important; color:#fff; box-shadow:none;
  font:600 15px/1.4 Arial,sans-serif; cursor:pointer; text-align:center;
}
#big_map #filter .an-map-request-slot #sendzayav::before { content:'Оставить заявку'; }
#big_map #filter .an-map-request-slot #sendzayav:focus-visible {
  outline:3px solid #d8b456; outline-offset:3px;
}
#big_map #filter #zayavka_new_wrap { height:auto; }
#big_map #filter #zayavka_new_wrap #zayavka {
  position:static; width:auto; margin:12px; height:auto;
}
#big_map #filter #zayavka_new_wrap #zayavka .btns { width:auto; }
@media(min-width:960px) and (max-width:1199px) {
  #big_map .content_searching { grid-template-columns:250px minmax(0,1fr) 240px; }
}
@media(min-width:600px) and (max-width:959px) {
  #big_map .content_searching { grid-template-columns:220px minmax(0,1fr); }
  #big_map .content_searching > #filter,
  #big_map .content_searching > #big_map_container { height:560px; min-height:0; }
  #big_map .content_searching > #found_variants {
    grid-column:1/-1; height:auto; min-height:0; max-height:560px;
    display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px;
  }
  #big_map #found_variants > .clear { display:none; }
  #big_map #found_variants .found_card { width:auto; float:none; margin:0; }
}
@media(max-width:599px) {
  #big_map .content_searching { grid-template-columns:minmax(0,1fr); }
  #big_map .content_searching > #filter,
  #big_map .content_searching > #found_variants { height:auto; min-height:0; overflow:visible; }
  #big_map .content_searching > #big_map_container { height:65vh; min-height:320px; }
}

/* Keep labels above controls so price and floor ranges stay on one line. */
#big_map #filter .filter_col .filter_name,
#big_map #filter .filter_col span.lbl {
  display:block; float:none; width:auto; margin:0 0 6px; line-height:1.4;
}
#big_map #filter .filter_row.an-map-range {
  display:grid; grid-template-columns:minmax(0,1fr) 12px minmax(0,1fr);
  align-items:center; column-gap:6px;
}
#big_map #filter .an-map-range > .filter_name { grid-column:1/-1; }
#big_map #filter .an-map-range > input[type="text"] {
  width:100%; min-width:0; height:34px; padding:5px 8px; margin:0;
}
#big_map #filter .an-map-range > span { text-align:center; }

/* Map navigation follows the full-width workspace without shrinking labels. */
@media(min-width:600px) {
  body:has(#big_map) #header .mainMenu { height:auto; }
  body:has(#big_map) #header .mainMenu > ul.left-menu {
    display:grid; grid-template-columns:repeat(8,minmax(0,1fr));
    width:100%; padding:0; margin:0; position:static; box-sizing:border-box;
  }
  body:has(#big_map) #header .mainMenu > ul.left-menu > li {
    float:none; width:auto; height:auto; min-width:0;
    font-size:clamp(14px,1.3vw,17px); line-height:1.35;
  }
  body:has(#big_map) #header .mainMenu > ul.left-menu > li::before { display:none; }
  body:has(#big_map) #header .mainMenu > ul.left-menu > li > a {
    display:flex; align-items:center; justify-content:center;
    box-sizing:border-box; height:100%; min-height:50px;
    margin:0; padding:12px 6px; font-size:inherit; line-height:1.35;
    text-align:center; white-space:normal; bottom:0;
  }
}
@media(min-width:600px) and (max-width:959px) {
  body:has(#big_map) #header .mainMenu > ul.left-menu {
    grid-template-columns:repeat(4,minmax(0,1fr));
  }
  body:has(#big_map) #header .mainMenu > ul.left-menu > li { font-size:15px; }
  body:has(#big_map) #header .mainMenu > ul.left-menu > li > a { min-height:46px; }
}
