/* Urbiax AdSense + floating controls fix — 2026-08-07 */

/* AdSense is intentionally full-width between listing cards rather than pretending to be a property. */
body.urbiax-modern-home-v1 #listingsGrid .ubx-adsense-feed-shell{
  grid-column:1 / -1 !important;
  position:relative !important;
  width:100% !important;
  min-width:0 !important;
  min-height:108px !important;
  margin:4px 0 8px !important;
  padding:22px 8px 8px !important;
  box-sizing:border-box !important;
  border-radius:18px !important;
  overflow:hidden !important;
  background:linear-gradient(180deg,rgba(255,255,255,.88),rgba(248,251,255,.76)) !important;
  border:1px solid rgba(148,163,184,.18) !important;
  box-shadow:0 8px 22px rgba(15,23,42,.045) !important;
}
body.urbiax-modern-home-v1 #listingsGrid .ubx-adsense-feed-label{
  position:absolute !important;
  top:6px !important;
  left:12px !important;
  color:#8a94a6 !important;
  font-size:9px !important;
  line-height:1 !important;
  font-weight:800 !important;
  letter-spacing:.08em !important;
  text-transform:uppercase !important;
}
body.urbiax-modern-home-v1 #listingsGrid ins.ubx-adsense-feed-unit{
  display:block !important;
  width:100% !important;
  min-height:78px !important;
}
/* If Google reports the unit as unfilled, do not leave a large empty panel. */
body.urbiax-modern-home-v1 #listingsGrid .ubx-adsense-feed-shell:has(ins[data-ad-status="unfilled"]){
  display:none !important;
}

@media (max-width:768px){
  body.urbiax-modern-home-v1 #listingsGrid .ubx-adsense-feed-shell{
    min-height:102px !important;
    margin:2px 0 7px !important;
    padding:20px 5px 5px !important;
    border-radius:16px !important;
  }
  body.urbiax-modern-home-v1 #listingsGrid ins.ubx-adsense-feed-unit{
    min-height:72px !important;
  }

  /* Keep Chat to the LEFT of Back-to-top. A later mobile UI rule had moved it back onto the arrow. */
  body.urbiax-modern-home-v1 #ubxMobileChatJump.ubx-mobile-chat-jump,
  body.urbiax-modern-home-v1 .ubx-mobile-chat-jump#ubxMobileChatJump{
    right:max(88px, calc(env(safe-area-inset-right) + 88px)) !important;
    bottom:max(12px, calc(env(safe-area-inset-bottom) + 12px)) !important;
  }
  body.urbiax-modern-home-v1 .back-to-top{
    right:max(12px, calc(env(safe-area-inset-right) + 12px)) !important;
  }
}

@media (max-width:390px){
  body.urbiax-modern-home-v1 #ubxMobileChatJump.ubx-mobile-chat-jump,
  body.urbiax-modern-home-v1 .ubx-mobile-chat-jump#ubxMobileChatJump{
    right:max(82px, calc(env(safe-area-inset-right) + 82px)) !important;
  }
}
