
/* Floating Map | Filters pill (founder 2026-10-17). Phones only: every existing map and filter control is reused, never rebuilt.
   On a phone the filters toolbar becomes a bottom sheet and the map panel becomes a full-screen map; desktop keeps its current controls. */
#ch-fp, #ch-fp-back { display: none; }
body.ch-fp-on #ch-fp {
  display: flex; position: fixed; left: 50%; transform: translateX(-50%); z-index: 950;
  bottom: calc(var(--ch-dock-h, 0px) + var(--ch-demo-b, 0px) + 16px + env(safe-area-inset-bottom, 0px));
  align-items: stretch; background: var(--ch-surface,#fff); border: 1px solid var(--border); border-radius: 100px; box-shadow: 0 6px 22px rgba(26,43,74,.22); overflow: hidden;
}
#ch-fp button { min-height: 48px; min-width: 104px; padding: 0 22px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; background: transparent; color: var(--bark); font: 600 15px 'Figtree', sans-serif; cursor: pointer; }
#ch-fp button:focus-visible, .ch-fp-done:focus-visible { outline: 3px solid #14A3A3; outline-offset: -3px; }
#ch-fp button[aria-pressed="true"] { background: var(--terra-pale, #e6f4f4); color: var(--terra, #0D7A7A); }
#ch-fp .ch-fp-div { width: 1px; background: var(--border); align-self: stretch; margin: 10px 0; }
#ch-fp svg { width: 18px; height: 18px; flex: none; }
#ch-fp .ch-fp-n { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--terra, #0D7A7A); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
#ch-fp .ch-fp-n:empty { display: none; }
body.ch-fp-on { padding-bottom: 84px; }
/* Demo mode only (ch-demo-actions-on, added by chShowDemoBanner): the fixed bottom action bar and the floating Map pill above it. */
#ch-demo-actions { position: fixed; left: 0; right: 0; bottom: 0; z-index: 940; background: #1A2B4A; border-top: 2px solid #14A3A3; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); }
#ch-demo-actions .ch-da-in { max-width: 64rem; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (min-width: 640px) { #ch-demo-actions .ch-da-in { display: flex; flex-wrap: wrap; justify-content: flex-start; } }
/* ZootPro pill buttons (same hex values as web/src/app/globals.css --zp-*): sky #31A8D2, sky-strong #237F9F. Secondary = sky outline + white text; primary (Continue, last) = sky fill + navy text. */
#ch-demo-actions a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border: 2px solid #31A8D2; border-radius: 999px; background: transparent; color: #fff; font: 600 14px 'Figtree', system-ui, sans-serif; text-decoration: none; transition: background-color .15s, border-color .15s; }
#ch-demo-actions a:hover { background: #237F9F; border-color: #237F9F; }
#ch-demo-actions a:last-child { background: #31A8D2; color: #1A2B4A; }
#ch-demo-actions a:last-child:hover { background: var(--ch-surface,#fff); border-color: #fff; }
#ch-demo-actions a:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { #ch-demo-actions a { transition: none; } }
body.ch-demo-actions-on { padding-bottom: calc(var(--ch-demo-b, 0px) + 8px); }
body.ch-demo-actions-on.ch-fp-on { padding-bottom: calc(84px + var(--ch-demo-b, 0px)); }
body.ch-demo-actions-on .demo-toast { bottom: calc(90px + var(--ch-demo-b, 0px)); }
.demo-toast.show button { pointer-events: auto; }
/* Search License demo frame (meta ch-sp-frame=license), wide screens: the same floating pill shows only its Map button; the toolbar Map toggle steps aside. */
body.ch-sl-fab #ch-fp, body.ch-demo-fab:not(.ch-fp-on) #ch-fp { display: flex; position: fixed; left: 50%; transform: translateX(-50%); z-index: 950; bottom: calc(16px + env(safe-area-inset-bottom, 0px) + var(--ch-demo-b, 0px)); background: var(--ch-surface,#fff); border: 1px solid var(--border); border-radius: 100px; box-shadow: 0 6px 22px rgba(26,43,74,.22); overflow: hidden; }
body.ch-sl-fab #ch-fp #ch-fp-filters, body.ch-sl-fab #ch-fp .ch-fp-div, body.ch-demo-fab:not(.ch-fp-on) #ch-fp #ch-fp-filters, body.ch-demo-fab:not(.ch-fp-on) #ch-fp .ch-fp-div { display: none; }
body.ch-sl-fab .ch-sp-maptoggle, body.ch-demo-fab:not(.ch-fp-on) .ch-sp-maptoggle { display: none !important; }
html:has(meta[name="ch-sp-frame"][content="license"]) .ch-sp-map-x { min-height: 44px; min-width: 44px; }
body.ch-fp-on.ch-fp-sheet-open #ch-fp, body.ch-fp-on.ch-fp-kbd #ch-fp { display: none; }
body.ch-fp-on.ch-fp-sheet-open { overflow: hidden; }
/* filters: the existing toolbar becomes the sheet */
body.ch-fp-on .filters-toolbar { display: none !important; }
body.ch-fp-on.ch-fp-sheet-open .filters-toolbar {
  display: flex !important; flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 14px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 970;
  max-height: 80vh; overflow-y: auto; -webkit-overflow-scrolling: touch; box-sizing: border-box; background: var(--ch-surface,#fff); border: 0; border-radius: 20px 20px 0 0;
  padding: 16px 16px calc(20px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -8px 30px rgba(26,43,74,.28);
}
body.ch-fp-on.ch-fp-sheet-open #ch-fp-back { display: block; position: fixed; inset: 0; z-index: 960; background: rgba(26,43,74,.4); }
.ch-fp-head, .ch-fp-sort { display: none; }
body.ch-fp-on .ch-fp-head { display: flex; align-items: center; justify-content: space-between; }
.ch-fp-title { font: 700 17px 'Figtree', sans-serif; color: var(--bark); }
.ch-fp-done { min-height: 44px; min-width: 64px; padding: 0 16px; border: 0; border-radius: 100px; background: var(--ch-fill-navy,var(--bark)); color: #fff; font: 600 14px 'Figtree', sans-serif; cursor: pointer; }
body.ch-fp-on .ch-fp-sort { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
body.ch-fp-on .ch-fp-sort .hh-strip-fit-toggle { background: transparent; padding: 0; gap: 8px; }
body.ch-fp-on .ch-fp-sort .hh-strip-fit-toggle button { border: 1px solid var(--border); background: var(--ch-surface,#fff); color: var(--bark); font-size: 13.5px; font-weight: 600; padding: 0 16px; }
body.ch-fp-on .ch-fp-sort .hh-strip-fit-toggle button.active { background: var(--terra-pale, #e6f4f4); border-color: var(--terra, #0D7A7A); color: var(--terra, #0D7A7A); }
body.ch-fp-on .ch-fp-sort .hh-strip-info-icon { color: var(--bark); }
body.ch-fp-on .filters-toolbar .filter-bar { gap: 10px; }
body.ch-fp-on .filter-bar-label { display: none; }
body.ch-fp-on .filters-toolbar .fbtn, body.ch-fp-on .filters-toolbar .rf-btn, body.ch-fp-on .filters-toolbar .filter-chip, body.ch-fp-on .ch-fp-sort .filter-chip, body.ch-fp-on .filters-toolbar .sort-select, body.ch-fp-on .filters-toolbar .fbtn-clear-all { min-height: 44px; }
body.ch-fp-on .filters-toolbar .fbtn { flex-wrap: wrap; }
body.ch-fp-on .filters-toolbar .fbtn:has(.fpop.open) { flex: 1 1 100%; }
body.ch-fp-on .filters-toolbar .fpop { flex: 1 1 100%; }
body.ch-fp-on .filters-toolbar .fpop { position: static; margin-top: 8px; box-shadow: none; min-width: 0; }
body.ch-fp-on .ch-sp-maptoggle { display: none !important; }
/* map: opens full screen from the pill; the map's own Hide map button and the pill's Map button both close it */
body.ch-fp-on.ch-sp-map-open .ch-sp-shell .map-panel, body.ch-fp-on.ch-fp-map-open .map-panel, body.ch-demo-fab-pg.ch-fp-map-open .map-panel {
  display: block !important; position: fixed !important; inset: var(--ch-nav-h, 56px) 0 var(--ch-demo-b, 0px) 0 !important; z-index: 900; width: auto !important; height: auto !important; max-width: none !important; margin: 0 !important; border: 0 !important; border-radius: 0 !important; order: 0;
}
/* Demo mode, wide screens, the scrolling search page (not the IDX rail): the map starts closed behind the floating Map pill (same full-screen map the phone uses). */
body.ch-demo-fab-pg:not(.ch-fp-map-open) .map-panel { display: none !important; }
body.ch-demo-fab-pg:not(.ch-fp-map-open) .results-layout { grid-template-columns: 1fr !important; }
body.ch-demo-fab-pg.ch-fp-map-open .map-panel { top: calc(60px + var(--ch-demo-h, 0px)) !important; } /* the full-screen map starts below the top bar and the demo marker */
/* Wide screens: the map opens and closes from one floating Map pill across the page (navy, bottom centre), not from a button inside the map. */
body:not(.ch-fp-on) .ch-sp-maptoggle { position: fixed !important; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px) + var(--ch-demo-b, 0px)); transform: translateX(-50%); z-index: 1000; margin: 0 !important; min-height: 44px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--ch-navy, #1A2B4A); color: #fff; font-weight: 700; box-shadow: 0 6px 20px rgba(26,43,74,.35); }
/* Standard search toggle sits at the bottom of the results, beside the Map button (founder 2026-11-11); on phones it lives in the filter sheet. */
body:not(.ch-fp-on) #std-toggle { position: fixed; left: calc(50% + 70px); bottom: calc(20px + env(safe-area-inset-bottom, 0px) + var(--ch-demo-b, 0px)); z-index: 1000; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--border, #DBE4ED); background: var(--ch-surface, #fff); color: var(--bark, #1A2B4A); font: 600 14px Figtree, sans-serif; box-shadow: 0 6px 20px rgba(26,43,74,.22); cursor: pointer; }
body:not(.ch-fp-on) #std-toggle.active { background: var(--ch-fill-navy, #1A2B4A); border-color: var(--ch-fill-navy, #1A2B4A); color: #fff; }
body:not(.ch-fp-on) .ch-sp-maptoggle:hover { background: #2C4A7A; }
body:not(.ch-fp-on) .ch-sp-maptoggle:focus-visible { outline: 3px solid #14A3A3; outline-offset: 3px; }
body:not(.ch-fp-on) .ch-sp-map-x { display: none !important; }
