/* properties.do search page: the map is the whole window. Only two things sit on top of it as a
   header, the logo and the search pill; the home card, the tools and the List/Map switch float.
   Loaded after site.css (colours, buttons and the pill's basics come from there). */
body.app { height: 100dvh; overflow: hidden; background: var(--sea); }

/* The floating header: logo left, pill centred on the window */
.app-bar { position: fixed; z-index: 30; inset: 0 0 auto 0; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: start; gap: 12px; padding: 14px max(14px, 1.4vw) 0; pointer-events: none; }
.app-bar > * { pointer-events: auto; }
.app-logo { justify-self: start; display: inline-flex; align-items: center; height: 62px; padding: 0 16px; border-radius: 31px; background: rgba(255, 255, 255, .9); -webkit-backdrop-filter: blur(16px) saturate(1.5); backdrop-filter: blur(16px) saturate(1.5); box-shadow: 0 10px 30px rgba(0, 20, 50, .2); }
.app-logo .brand-logo { height: 36px; }
.app .band { flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 0; padding: 8px; border-radius: 31px; max-width: min(1040px, 100%); background: rgba(8, 35, 82, .84); -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6); box-shadow: 0 18px 50px rgba(0, 20, 50, .4); }
/* A hairline of light around the pill */
.app .band::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: linear-gradient(115deg, rgba(255, 255, 255, .5), rgba(255, 196, 0, .75) 28%, rgba(255, 255, 255, .08) 55%, rgba(255, 196, 0, .55) 82%, rgba(255, 255, 255, .35)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); pointer-events: none; }
.band-controls { display: flex; align-items: center; gap: 8px; }
.app .pill { flex: 0 0 auto; }
.app .pill select { field-sizing: content; min-width: 112px; font-size: 14.5px; }
@supports not (field-sizing: content) { .app .pill select { width: 150px; } }
.pill-place input { height: 100%; width: 190px; border: 0; border-radius: 23px; background: transparent; padding: 0 14px 0 40px; font: 600 14.5px var(--font); color: var(--ink); }
.pill-place input::placeholder { color: var(--ink); opacity: 1; }
.pill-place input:focus { outline: 2px solid var(--gold); outline-offset: 2px; }
.icon-btn { position: relative; width: 46px; height: 46px; flex: none; border-radius: 50%; border: 0; background: var(--white); color: var(--palm-deep); display: grid; place-items: center; cursor: pointer; }
.icon-btn:hover, .icon-btn[aria-expanded="true"] { background: var(--mist); }
.more-count { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--gold); color: var(--white); font: 600 11px var(--mono); display: grid; place-items: center; }
.more-count[hidden] { display: none; }
.app .go-btn { width: 46px; padding: 0; border-radius: 50%; }

.band .more { display: flex; flex-wrap: wrap; gap: 14px 36px; align-items: flex-end; margin-top: 8px; padding: 16px 20px; border-radius: 23px; background: var(--white); color: var(--ink); }
.band .more[hidden] { display: none; }
.more fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 20px; max-width: 620px; }
.more legend { padding: 0; margin-bottom: 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--soft); }
.more label { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; font-size: 15px; cursor: pointer; }
.more input { width: 18px; height: 18px; accent-color: var(--palm); }
.more .sort { display: flex; flex-direction: column; align-items: stretch; gap: 3px; width: 210px; }
.more .sort > span { font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--soft); }
.more .sort select { appearance: none; -webkit-appearance: none; height: 44px; padding: 0 34px 0 14px; border-radius: 22px; border: 1px solid var(--line-strong); background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231F4A36' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 14px center; font: 600 14px var(--font); color: var(--ink); }
.more-end { flex-basis: 100%; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; border-top: 1px solid var(--line); padding-top: 8px; }
.langs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.langs a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid transparent; }
.langs a:hover { background: var(--mist); }
.langs a[aria-current] { background: var(--mist); border-color: var(--palm); }
.langs .flag { border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 36, 77, .14); }
.link-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 8px 0; font: 700 14.5px var(--font); color: var(--palm); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Place suggestions */
.place-list { position: absolute; z-index: 40; top: calc(100% + 12px); left: 0; min-width: 300px; max-height: min(380px, 60dvh); overflow-y: auto; margin: 0; padding: 6px; list-style: none; background: var(--white); border-radius: 18px; box-shadow: 0 18px 44px rgba(0, 36, 77, .28); color: var(--ink); }
.place-list[hidden] { display: none; }
.place-option { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-radius: 12px; font: 600 15px var(--font); cursor: pointer; }
.place-option svg { color: var(--palm); flex: none; }
.place-option small { margin-left: auto; padding-left: 12px; color: var(--soft); font-weight: 500; font-size: 13px; }
.place-option:hover, .place-option[aria-selected="true"] { background: var(--mist); }
.place-none { padding: 10px 12px; color: var(--muted); font-size: 14px; }

/* The map */
.map-stage { position: fixed; inset: 0; background: var(--sea); overflow: hidden; }
.search-map { position: absolute; inset: 0; container-type: size; }
div.live-map, div.live-map.maplibregl-map { position: absolute; inset: 0; z-index: 0; }
.is-live .fallback { display: none !important; }
.maplibregl-ctrl-attrib, .maplibregl-ctrl-attrib a { font-family: var(--font); }
.stage-wrap { position: absolute; inset: 0; display: grid; place-items: center; z-index: 1; background: var(--sea); }
.stage { position: relative; width: min(100cqw, 140.29cqh); aspect-ratio: 640 / 456.2; }
.stage > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.pin { position: absolute; transform: translate(-50%, -50%); border: 0; background: none; padding: 4px; cursor: pointer; }
.pin span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--palm); color: var(--white); font: 600 13px var(--mono); box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--gold-light), 0 2px 8px rgba(0, 36, 77, .3); }
.osm { position: absolute; right: 90px; bottom: 10px; z-index: 2; font-size: 11px; color: #33474C; background: rgba(255, 255, 255, .88); padding: 2px 6px; border-radius: 3px; }
.noscript-note { position: fixed; z-index: 50; left: 16px; bottom: 16px; padding: 10px 14px; border-radius: 12px; background: var(--white); color: var(--muted); }

/* Pins: a white price pill with a green house, the chosen one large and dark green; groups of
   homes as green rounded counts */
.price-pin { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px 0 6px; border: 0; border-radius: 22px; background: var(--white); color: var(--ink); box-shadow: 0 4px 14px rgba(0, 36, 77, .22); font: 800 16px var(--font); letter-spacing: -0.01em; cursor: pointer; margin-bottom: 10px; transform-origin: 50% 100%; }
.price-pin::after { content: ""; position: absolute; left: 50%; bottom: -9px; margin-left: -9px; border: 9px solid transparent; border-bottom: 0; border-top: 10px solid var(--white); filter: drop-shadow(0 3px 2px rgba(0, 36, 77, .12)); }
.pin-house { width: 32px; height: 32px; border-radius: 50%; background: var(--palm-deep); color: var(--white); display: grid; place-items: center; }
.price-pin:hover, .price-pin.is-active { background: var(--palm-deep); color: var(--white); }
.price-pin:hover::after, .price-pin.is-active::after { border-top-color: var(--palm-deep); }
.price-pin:hover .pin-house, .price-pin.is-active .pin-house { background: var(--white); color: var(--palm-deep); }
.price-pin.is-active { height: 54px; font-size: 20px; padding-right: 20px; border-radius: 27px; box-shadow: 0 0 0 6px rgba(255, 196, 0, .35), 0 8px 22px rgba(0, 36, 77, .35); }
.price-pin.is-active .pin-house { width: 40px; height: 40px; }
.cluster-pin { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 16px 0 13px; border: 3px solid var(--white); border-radius: 22px; background: var(--palm); color: var(--white); box-shadow: 0 4px 14px rgba(0, 36, 77, .3); font: 800 17px var(--font); cursor: pointer; }
.cluster-pin:hover { background: var(--palm-deep); }

/* The floating card: a chosen home, or a short note (no homes yet, no matches) */
.map-card { position: absolute; z-index: 4; left: max(14px, 1.4vw); top: 96px; width: min(400px, calc(100% - 28px)); max-height: calc(100% - 190px); overflow-y: auto; border-radius: 22px; scrollbar-width: none; }
.map-card:empty { display: none; }
.home-card { position: relative; border-radius: 22px; overflow: hidden; background: var(--white); box-shadow: 0 18px 50px rgba(0, 36, 77, .25); }
.home-card .photo { position: relative; aspect-ratio: 16 / 10; background: var(--mist); border: 6px solid var(--white); border-bottom: 0; border-radius: 22px 22px 0 0; overflow: hidden; }
.home-card .photo > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 16px; }
.verified-badge { position: absolute; left: 12px; top: 12px; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px 0 8px; border-radius: 16px; background: var(--palm-deep); color: var(--white); font-weight: 700; font-size: 14px; }
.verified-badge svg { background: #3DAA6A; border-radius: 50%; padding: 2px; stroke-width: 3; }
.home-card .save { position: absolute; right: 12px; top: 12px; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .95); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.home-card .save[aria-pressed="true"] svg path { fill: var(--heart); stroke: var(--heart); }
.home-card .nav { position: absolute; top: 50%; margin-top: -21px; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.home-card .nav.prev { left: 10px; } .home-card .nav.next { right: 10px; }
.home-card .dots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 6px; }
.home-card .dots span { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .6); }
.home-card .dots span.on { background: var(--white); }
.home-card .body { padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 8px; }
.price-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.home-card .price { font: 800 26px var(--font); letter-spacing: -0.03em; margin-right: auto; }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; border-radius: 15px; font-size: 13.5px; font-weight: 600; }
.chip-mode { background: #E3EEFB; color: var(--palm); }
.chip-place { border: 1px solid var(--line-strong); color: var(--ink); }
.home-card .title { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.3; }
.home-card .area { color: var(--muted); font-size: 14.5px; }
.specs { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 15px; }
.specs li { display: inline-flex; align-items: center; gap: 7px; }
.actions { display: flex; gap: 10px; margin-top: 6px; }
.actions .btn { flex: 1; }
.card-close { position: absolute; right: 12px; top: 62px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .95); color: var(--ink); display: none; place-items: center; cursor: pointer; }
.note-card { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 22px 24px; border-radius: 22px; background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: blur(16px) saturate(1.5); backdrop-filter: blur(16px) saturate(1.5); box-shadow: 0 18px 50px rgba(0, 36, 77, .22); }
.note-card b { font-size: 19px; letter-spacing: -0.015em; line-height: 1.3; }
.note-card p { color: var(--muted); font-size: 15px; }
.note-card .link { font-weight: 700; }

/* Map tools (right), the List/Map switch (bottom left), search-as-I-move (bottom centre) */
.map-tools { position: absolute; z-index: 4; right: max(14px, 1.4vw); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 10px; }
.map-tools button { position: relative; width: 50px; height: 50px; border: 0; background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: var(--ink); display: grid; place-items: center; cursor: pointer; border-radius: 50%; box-shadow: 0 6px 18px rgba(0, 36, 77, .18); }
.map-tools button:hover, .map-tools button[aria-pressed="true"], .map-tools button[aria-expanded="true"] { background: var(--white); color: var(--palm); box-shadow: 0 0 0 3px rgba(255, 196, 0, .45), 0 6px 18px rgba(0, 36, 77, .18); }
.map-tools .saved-btn[aria-pressed="true"] svg path { fill: var(--heart); stroke: var(--heart); }
.saved-count { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--heart); color: var(--white); font: 600 11px var(--mono); display: grid; place-items: center; }
.saved-count[hidden] { display: none; }
.tool-stack { display: flex; flex-direction: column; border-radius: 25px; box-shadow: 0 6px 18px rgba(0, 36, 77, .18); overflow: hidden; }
.tool-stack button { border-radius: 0; box-shadow: none; }
.tool-stack button:hover { box-shadow: none; }
.tool-stack button + button { border-top: 1px solid var(--line); }
/* Tools that need the live map appear with it */
.map-stage:not(.is-live) [data-tool], .map-stage:not(.is-live) .tool-stack { display: none; }
.layers { position: relative; }
.layers-panel { position: absolute; right: calc(100% + 10px); top: 0; width: 230px; padding: 12px 16px; background: var(--white); border-radius: 18px; box-shadow: 0 12px 30px rgba(0, 36, 77, .2); display: flex; flex-direction: column; gap: 2px; }
.layers-panel[hidden] { display: none; }
.menu-title { margin: 0 0 4px; font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--soft); }
.layers-panel label { display: flex; align-items: center; gap: 10px; min-height: 36px; font-size: 15px; cursor: pointer; }
.layers-panel input { width: 18px; height: 18px; accent-color: var(--palm); }

.view-switch { position: absolute; z-index: 4; left: max(14px, 1.4vw); bottom: 22px; display: inline-flex; gap: 4px; padding: 5px; border-radius: 27px; background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 6px 18px rgba(0, 36, 77, .2); }
.view-switch button { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; height: 44px; padding: 0 18px; border: 0; border-radius: 22px; background: none; font: 600 16px var(--font); color: var(--ink); cursor: pointer; }
.view-switch button svg { flex: none; }
.view-switch button[aria-pressed="true"] { background: var(--palm-deep); color: var(--white); }
.move-search { position: absolute; z-index: 4; bottom: 26px; left: 50%; transform: translateX(-50%); display: none; align-items: center; gap: 9px; padding: 10px 18px 10px 14px; border-radius: 22px; background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 6px 18px rgba(0, 36, 77, .18); font: 600 14.5px var(--font); color: var(--ink); cursor: pointer; white-space: nowrap; }
.is-live .move-search { display: inline-flex; }
.move-search input { width: 18px; height: 18px; accent-color: var(--palm); }
.toast { position: absolute; z-index: 6; left: 50%; bottom: 84px; transform: translateX(-50%); max-width: min(440px, calc(100% - 32px)); padding: 11px 18px; border-radius: 22px; background: var(--ink); color: var(--white); font-size: 14.5px; box-shadow: 0 10px 26px rgba(0, 0, 0, .25); overflow-wrap: anywhere; user-select: all; }
.toast[hidden] { display: none; }

/* List view: over the map, under the header */
.list-view { position: absolute; inset: 0; z-index: 3; overflow-y: auto; background: var(--paper); padding: 104px 0 96px; }
.list-view[hidden] { display: none; }
.show-list .map-card, .show-list .map-tools, .show-list .move-search { display: none; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 20px; }
.home-card.in-list { box-shadow: 0 2px 10px rgba(0, 36, 77, .08); border: 1px solid var(--line); cursor: pointer; }
.home-card.in-list .price { font-size: 22px; }
.list-empty { grid-column: 1 / -1; max-width: 520px; }
.list-empty .note-card { box-shadow: none; border: 1px solid var(--line-strong); }

/* Narrower windows: the pill keeps one row by tucking type, price and bedrooms (and Buy/Rent on
   phones) into the panel that the filters button opens */
@media (max-width: 1180px) {
  .app-bar { grid-template-columns: auto minmax(0, 1fr); }
  .app .band { justify-self: end; }
  .app .pill-extra { display: none; }
  .app .band.is-open .band-controls { flex-wrap: wrap; }
  .app .band.is-open .pill-extra { display: flex; flex: 1 1 150px; order: 5; }
  .app .band.is-open .pill-extra select { width: 100%; field-sizing: fixed; }
}
@media (max-width: 760px) {
  .app-bar { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 10px 10px 0; }
  .app-logo { height: 46px; padding: 0 12px; border-radius: 23px; }
  .app-logo .brand-logo { height: 26px; }
  .app .band { justify-self: stretch; border-radius: 27px; padding: 6px; max-height: calc(100dvh - 80px); overflow-y: auto; }
  .app .band .mode { display: none; flex: none; }
  .app .band.is-open .mode { display: inline-flex; flex: 1 1 100%; order: 4; }
  .app .pill-place { flex: 1 1 auto; min-width: 0; }
  .pill-place input { width: 100%; }
  .place-list { min-width: 0; right: 0; }
  .band .more { padding: 14px 16px; }
  .map-card { left: 10px; right: 10px; top: auto; bottom: 82px; width: auto; max-height: calc(100% - 220px); }
  .home-card .photo { aspect-ratio: 16 / 7; }
  .home-card .price { font-size: 22px; }
  .home-card .title { font-size: 17px; }
  .card-close { display: grid; }
  .map-card.has-home ~ .map-tools { display: none; }
  /* The tools become a row under the pill, clear of the card at the bottom; pinch to zoom */
  .map-tools { top: 128px; transform: none; right: 10px; flex-direction: row; gap: 8px; }
  .map-tools button { width: 44px; height: 44px; }
  .map-tools .tool-stack { display: none; }
  .layers-panel { top: calc(100% + 8px); right: 0; }
  .view-switch { left: 50%; transform: translateX(-50%); bottom: 14px; }
  .view-switch button { height: 40px; padding: 0 14px; font-size: 15px; }
  .move-search { display: none !important; }
  .toast { bottom: 76px; }
  .osm { right: 8px; bottom: 74px; }
  .list-view { padding-top: 136px; }
}

/* Motion: the map opens out to the full window, the floating pieces settle in after it, pins pop
   up from their point. (The logo and the pill arrive by the page-to-page morph in site.css.) */
@media (prefers-reduced-motion: no-preference) {
  .map-stage { view-transition-name: map-stage; }
  ::view-transition-new(map-stage):only-child { animation: .75s var(--ease) both stage-open; }
  ::view-transition-old(map-stage):only-child { animation: .3s ease both stage-close; }
  .map-tools > *, .view-switch { animation: .5s var(--ease) both float-in; }
  .map-tools > :nth-child(1) { animation-delay: .30s; }
  .map-tools > :nth-child(2) { animation-delay: .35s; }
  .map-tools > :nth-child(3) { animation-delay: .40s; }
  .map-tools > :nth-child(4) { animation-delay: .45s; }
  .map-tools > :nth-child(5) { animation-delay: .50s; }
  .map-tools > :nth-child(6) { animation-delay: .55s; }
  .view-switch { animation-delay: .4s; }
  .map-card > * { animation: .5s var(--ease) .25s both card-in; }
  .band .more:not([hidden]) { animation: .3s var(--ease) both panel-in; }
  .place-list:not([hidden]) { animation: .22s var(--ease) both panel-in; }
  .price-pin, .cluster-pin { animation: .4s cubic-bezier(.2, 1.5, .4, 1) both pin-in; }
  .price-pin, .cluster-pin, .map-tools button, .icon-btn, .view-switch button { transition: background-color .15s ease, color .15s ease, box-shadow .2s ease, height .2s var(--ease), font-size .2s var(--ease); }
}
@keyframes stage-open { from { clip-path: inset(16% 14% 44% 14% round 48px); opacity: 0; } 30% { opacity: 1; } to { clip-path: inset(0 round 0); opacity: 1; } }
@keyframes stage-close { to { opacity: 0; } }
@keyframes float-in { from { opacity: 0; translate: 0 14px; } }
@keyframes card-in { from { opacity: 0; translate: -18px 0; } }
@keyframes panel-in { from { opacity: 0; translate: 0 -8px; } }
/* "scale", not "transform": the map library positions each pin with transform. */
@keyframes pin-in { from { opacity: 0; scale: .4; } }

/* site.css stretches the pill's pieces on small content pages; on the map they keep their size */
.app .band .mode, .app .go-btn { flex: none; }
