/* Route navigation, one results-pane toggle, card hearts, desktop popup clearance, and return from chat. */
body.eh9:has(#eh9-map) .eh9-map-control-dock { max-width:calc(100vw - 16px) !important; box-sizing:border-box !important; }
body.eh9:has(#eh9-map) .eh9-map-control-primary { min-width:0 !important; max-width:100% !important; flex-wrap:wrap !important; }
body.eh9:has(#eh9-map) .eh9-map-control-primary .eh9-restore-results { white-space:nowrap !important; }
body.eh9:has(#eh9-map) #eh9-mobile-view { display:none !important; }
body.eh9:has(#eh9-map) .eh9-view-switch a { white-space:nowrap; }
body.eh9:has(#eh9-map) .eh9-map-column .eh9-map-control-dock { z-index:1200 !important; }
body.eh9:has(#eh9-map) .ehqc-mobile-portal .ehqc-panel > header { display:grid !important; grid-template-columns:minmax(0,1fr) auto !important; gap:8px !important; align-items:center !important; }
body.eh9:has(#eh9-map) .ehqc-mobile-portal .ehqc-panel > header > div:first-child { min-width:0 !important; }
body.eh9:has(#eh9-map) .ehqc-mobile-portal .ehqc-panel > header h2 { margin:0 !important; font-size:18px !important; line-height:1.18 !important; overflow-wrap:anywhere !important; }
body.eh9:has(#eh9-map) .ehqc-mobile-portal .ehqc-window-actions { flex:0 0 auto !important; gap:6px !important; }
body.eh9:has(#eh9-map) .ehqc-mobile-portal .ehqc-minimize { width:auto !important; min-width:112px !important; max-width:none !important; padding:0 10px !important; font-size:0 !important; font-weight:700 !important; white-space:nowrap !important; }
body.eh9:has(#eh9-map) .ehqc-mobile-portal .ehqc-minimize::after { content:"Back to map"; font-size:12px !important; }
body.eh9:has(#eh9-map) .ehqc-mobile-portal .ehqc-close { flex:0 0 44px !important; }
.eh9-card-photo { position:relative; }
.eh9-card-photo > .eh9-card-save-overlay { position:absolute !important; z-index:8 !important; top:10px !important; right:10px !important; display:inline-flex !important; align-items:center !important; justify-content:center !important; width:42px !important; height:42px !important; min-width:42px !important; min-height:42px !important; max-width:42px !important; max-height:42px !important; padding:0 !important; border:1px solid #fff !important; border-radius:50% !important; background:#fff !important; color:#a81031 !important; box-shadow:0 2px 10px #17223445 !important; font-size:0 !important; line-height:1 !important; overflow:hidden !important; }
.eh9-card-photo > .eh9-card-save-overlay::after { content:"♡"; font-size:24px !important; line-height:1 !important; }`r`n.eh9-card-photo > .eh9-card-save-overlay[aria-pressed="true"] { background:#a81031 !important; color:#fff !important; }`r`n.eh9-card-photo > .eh9-card-save-overlay[aria-pressed="true"]::after { content:"♥"; }
.eh9-card-actions { align-items:center; }
.eh9-card-actions .eh92-save { min-height:40px; }
.eh92-save[data-saved="true"] { color:#a81031; }
/* Popup cards must clear the real sticky search controls on desktop as well as the phone dock. */
.maplibregl-popup.eh910-cluster-popup,
.maplibregl-popup:has(.eh9-preview) { z-index:1300 !important; }
.maplibregl-popup-content { position:relative; }
@media (max-width:800px) {
  body.eh9:has(#eh9-map) .eh9-view-switch { display:flex !important; flex:0 0 auto !important; align-items:center !important; justify-content:center !important; gap:2px !important; width:max-content !important; max-width:100% !important; margin:3px 0 5px auto !important; padding:2px !important; background:#f6f7f9 !important; border:1px solid #d9dfe6 !important; border-radius:8px !important; }
  body.eh9:has(#eh9-map) .eh9-view-switch a { display:inline-flex !important; min-height:30px !important; align-items:center !important; justify-content:center !important; padding:5px 9px !important; color:#273343 !important; font-size:11px !important; font-weight:650 !important; text-decoration:none !important; }
  body.eh9:has(#eh9-map) .eh9-view-switch a:first-child::after { content:"Map search"; }
  body.eh9:has(#eh9-map) .eh9-view-switch a:last-child::after { content:"List search"; }
  body.eh9:has(#eh9-map) .eh9-view-switch a { font-size:0 !important; }
  body.eh9:has(#eh9-map) .eh9-view-switch a::after { font-size:11px !important; }
  body.eh9:has(#eh9-map) .eh9-view-switch a[aria-current] { border-radius:6px !important; background:#a81031 !important; color:#fff !important; }
  body.eh9:has(#eh9-map) .eh9-map-control-dock { right:max(8px,env(safe-area-inset-right)) !important; left:max(8px,env(safe-area-inset-left)) !important; width:auto !important; }
  body.eh9:has(#eh9-map) .eh9-map-control-primary { gap:5px !important; }
  body.eh9:has(#eh9-map) .eh9-map-control-primary .eh9-restore-results { min-width:96px !important; max-width:128px !important; font-size:11px !important; }
  body.eh9:has(#eh9-map) .ehqc-mobile-portal .ehqc-panel:not([hidden]) { height:100dvh !important; }
  body.eh9:has(#eh9-map) .ehqc-mobile-portal .ehqc-panel > header { min-height:68px !important; padding:8px 10px !important; }
  body.eh9:has(#eh9-map) .ehqc-mobile-portal .ehqc-minimize { min-width:116px !important; min-height:44px !important; }
}
@media (max-width:390px) {
  body.eh9:has(#eh9-map) .eh9-view-switch { margin-top:2px !important; }
  body.eh9:has(#eh9-map) .eh9-view-switch a { padding-inline:7px !important; }
  body.eh9:has(#eh9-map) .ehqc-mobile-portal .ehqc-panel > header h2 { font-size:16px !important; }
  body.eh9:has(#eh9-map) .ehqc-mobile-portal .ehqc-minimize { min-width:104px !important; padding-inline:7px !important; }
}

/* Keep route navigation distinct and reachable; hide the duplicate pane toggle. */
@media (max-width:800px) {
  body.eh9:has(#eh9-map) .eh9-searchbar .eh9-filter-row > .eh9-view-switch { position:sticky !important; right:0 !important; z-index:31 !important; flex:0 0 auto !important; margin-left:auto !important; box-shadow:-8px 0 10px #fff !important; }
}
body.eh9:has(#eh9-map) .eh9-results-heading #eh9-collapse { display:none !important; }
