/* ROUND 112 — Mobile filters (inc/round112.php). Loads after r80-filters.css, r101.css and r103.css on the
   Gallery, Plans and House & Land pages; tablet + phone (<= 1023px) only. */
@media (max-width:1023px){
  /* 1. The bar (button, and the chips under it) stays put under the header while the page scrolls. The
        header's live bottom edge is --sh-r112-nav (r80-filters.js); 16px gap below it. */
  .sh-r112 .sh-r80-bar{position:sticky;top:calc(var(--sh-r112-nav,63px) + 16px);z-index:20}

  /* 2. Applied count: the header's saved-count dot (home.css .nav__save-count / r98) on the button's
        top-right corner; the button itself keeps the same inset both sides of the label. */
  .sh-r112 .sh-r80-open-wrap{position:relative;display:inline-flex}
  .sh-r112 .sh-r80-open__count{display:none}
  .sh-r112 .sh-r80-open__badge{position:absolute;top:-6px;right:-6px;display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 4px;box-sizing:border-box;border-radius:999px;background:var(--amber);color:var(--off-white);font:600 10px/1 var(--sans);letter-spacing:0;pointer-events:none}
  .sh-r112 .sh-r80-open__badge[hidden]{display:none}

  /* 3. Gallery: the Featured Sentinel Builds switch is in the pop-up, above Category, left-aligned, with the
        accordion's rule beneath it; the copy under the button goes. */
  .sh-r112.sh-r80-on .gal__grid-wrap > .gal__toggle{display:none}
  .sh-r112 .sh-r80-switch{padding:16px 0;border-bottom:1px solid rgba(66,64,64,.1)}
  .sh-r112 .sh-r80-switch .gal__toggle{position:static;display:flex;align-items:center;justify-content:flex-start;gap:10px;margin:0;padding:0}

  /* 4. House & Land: "Filter by Area" dropdown (chevron on the right, same button otherwise) */
  .sh-r112 .sh-r80-bar--dropdown .sh-r80-open-wrap{align-self:flex-start}
  .sh-r112 .sh-r80-open__chev{display:inline-flex;width:16px;height:16px;flex:0 0 16px;transition:transform .3s var(--ease-soft)}
  .sh-r112 .sh-r80-open__chev svg{width:16px;height:16px;display:block}
  .sh-r112 .is-menu-open .sh-r80-open__chev{transform:rotate(180deg)}
  .sh-r112 .sh-r80-menu{position:absolute;left:0;top:calc(100% + 8px);z-index:30;min-width:100%;width:max-content;max-width:min(320px,calc(100vw - 48px));max-height:min(60vh,420px);overflow-y:auto;margin:0;padding:8px 0;list-style:none;background:var(--white);border-radius:16px;box-shadow:0 1px 2px rgba(0,0,0,.08),0 18px 40px -12px rgba(66,64,64,.24)}
  .sh-r112 .sh-r80-menu[hidden]{display:none}
  .sh-r112 .sh-r80-menu__item{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;padding:10px 20px;font:400 15px/1.3 var(--sans);color:var(--charcoal);cursor:pointer;white-space:nowrap;-webkit-tap-highlight-color:transparent}
  .sh-r112 .sh-r80-menu__item:hover,.sh-r112 .sh-r80-menu__item:focus-visible{background:var(--cream);outline:none}
  .sh-r112 .sh-r80-menu__item[aria-selected="true"]{font-weight:600}
  .sh-r112 .sh-r80-menu__item[aria-selected="true"]::after{content:"";flex:none;width:16px;height:16px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3 8.5l3 3 7-7' stroke='%237a917f' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat}
}
@media (max-width:767px){
  /* phones centre the button (r101): the list opens centred under it */
  .sh-r112 .sh-r80-bar--dropdown .sh-r80-open-wrap{align-self:center}
  .sh-r112 .sh-r80-menu{left:50%;transform:translateX(-50%)}
}
@media (prefers-reduced-motion: reduce){
  .sh-r112 .sh-r80-open__chev{transition:none}
}
