/* vector-map.css */
.vector-map-tools{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.vector-map-tools button{min-width:34px;min-height:34px;padding:6px 12px;border:1px solid var(--control-border);border-radius:999px;background:var(--surface);color:var(--ink);font:500 13px Arial,sans-serif;cursor:pointer}
.vector-map-tools button[aria-pressed=true]{background:var(--action-bg);color:var(--action-ink)}
.vector-map-note{font-size:13px;line-height:1.5;color:var(--muted);margin:10px 0}
.vector-map-pin{display:flex;align-items:center;justify-content:center;width:26px;height:26px;padding:0;border:0;border-radius:50%;background:transparent;box-shadow:none;cursor:pointer}
.vector-map-pin>span{display:block;width:18px;height:20px;border-radius:5px;background:#176b65;position:relative;box-shadow:0 1px 3px #0005;pointer-events:none}
html[data-theme=dark] .vector-map-pin>span{background:#82cec3}
.vector-map-pin:focus-visible,.vector-map-tools button:focus-visible{outline:3px solid var(--teal);outline-offset:4px}
.maplibregl-popup{z-index:5}
.maplibregl-popup-content{background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:16px;padding:20px;max-height:320px;overflow:auto}
.maplibregl-popup-content section+section{margin-top:16px;padding-top:16px;border-top:1px solid var(--line)}
.maplibregl-popup-close-button{width:44px;height:44px;font-size:24px;color:var(--ink)}
.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{border-top-color:var(--surface)}
.maplibregl-ctrl-group{background:var(--surface);border:1px solid var(--control-border)}
.maplibregl-ctrl-group button{width:34px;height:34px;min-width:34px;min-height:34px;padding:0}
.maplibregl-ctrl-group button .maplibregl-ctrl-icon{display:block;width:100%;height:100%;background-position:center;background-repeat:no-repeat}
.maplibregl-ctrl-group button:focus-visible{outline:2px solid var(--teal);outline-offset:-2px}
html[data-theme=dark] .maplibregl-ctrl-icon{filter:invert(1)}
.maplibregl-ctrl-attrib{background:var(--surface);color:var(--muted);max-width:calc(100% - 10px)}
.maplibregl-ctrl-attrib a{color:var(--teal)}
@media(max-width:600px){.vector-map-tools button{flex:0 1 auto}.maplibregl-popup{max-width:calc(100vw - 44px)!important}.maplibregl-ctrl-attrib{font-size:10px}}
@media print{.vector-map-tools,.maplibregl-control-container{display:none}}

.maplibregl-popup .map-thumbnail{max-width:100%;height:auto}

/* Compact map tag: no scrolling shell, no image, no camera movement. */
.property-map-tag{position:absolute;z-index:650;box-sizing:border-box;padding:12px 36px 8px 14px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--ink);box-shadow:0 3px 14px #0003;font:14px/1.3 Arial,sans-serif;overflow:visible;max-height:none;text-align:left;cursor:default}
.property-map-tag strong{display:block;font-size:14px;line-height:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.property-map-tag p{margin:4px 0 0;font-size:12px;line-height:16px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.property-map-tag a{display:flex;align-items:center;min-height:36px;padding:0;font-size:13px;line-height:18px;font-weight:700;color:var(--teal);white-space:nowrap}
.property-map-tag-close{position:absolute;right:2px;top:2px;display:grid;place-items:center;width:32px;height:32px;min-width:32px;min-height:32px;padding:0;border:0;background:transparent;color:var(--ink);font:22px/1 Arial,sans-serif;cursor:pointer}
.property-map-tag a:focus-visible,.property-map-tag-close:focus-visible{outline:2px solid var(--teal);outline-offset:1px}

.property-map-tag-gallery{position:relative;height:104px;margin:0 -22px 8px -4px;border-radius:6px;overflow:hidden;touch-action:none;background:var(--line)}
.property-map-tag-gallery img{display:block;width:100%;height:100%;object-fit:cover;user-select:none;pointer-events:none}
.property-map-tag-gallery button{position:absolute;top:50%;transform:translateY(-50%);display:grid;place-items:center;min-width:32px;min-height:36px;width:32px;height:36px;border:0;border-radius:5px;padding:0;background:#202124dd;color:#fff;font:25px/1 Arial,sans-serif;cursor:pointer}
.property-map-photo-previous{left:4px}.property-map-photo-next{right:4px}
.property-map-tag-count{position:absolute;bottom:4px;left:50%;transform:translateX(-50%);padding:2px 6px;border-radius:4px;background:#202124dd;color:#fff;font-size:10px}
.property-map-tag:has(.property-map-tag-gallery){padding-top:34px}
.property-map-tag-gallery:focus-visible,.property-map-tag-gallery button:focus-visible{outline:2px solid var(--teal);outline-offset:1px}

.property-map-tag-gallery img[hidden]{display:none}
.property-map-tag-gallery[data-photo-failed=true]::before{content:'Photo unavailable';position:absolute;inset:0;display:grid;place-items:center;font-size:12px;color:var(--ink)}

.vector-map-pin>span::before,.property-map-pin.building-pin>span::before{content:'';position:absolute;inset:3px;background:#fff;mask:center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M3 1h10v14H9v-4H7v4H3V1zm2 2v2h2V3H5zm4 0v2h2V3H9zM5 7v2h2V7H5zm4 0v2h2V7H9z'/%3E%3C/svg%3E")}
html[data-theme=dark] .vector-map-pin>span::before,html[data-theme=dark] .property-map-pin.building-pin>span::before{background:#102523}
.property-map-pin.building-pin>span{position:relative;display:block;width:18px;height:20px;border:0;border-radius:5px;background:#176b65;box-shadow:0 1px 3px #0005}
html[data-theme=dark] .property-map-pin.building-pin>span{background:#82cec3}

/* Portfolio-only polish; detail maps retain the approved v57 appearance. */
.portfolio-map .property-map-tag{border-radius:8px;box-shadow:0 2px 4px #0002,0 8px 20px #0002}
.portfolio-map .property-map-tag-gallery button{position:absolute;top:50%;transform:translateY(-50%);display:grid;place-items:center;min-width:44px;min-height:44px;width:44px;height:44px;border:0;border-radius:8px;padding:0;background:transparent;color:#fff;cursor:pointer}
.portfolio-map .property-map-tag-gallery button::before{content:'';display:block;width:9px;height:9px;border-left:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg);filter:drop-shadow(0 1px 2px #000) drop-shadow(0 0 1px #000)}
.portfolio-map .property-map-tag-gallery button.property-map-photo-next::before{transform:rotate(225deg)}
.portfolio-map .property-map-tag-gallery button:hover::before{filter:drop-shadow(0 1px 3px #000) drop-shadow(0 0 2px #000)}
/* A shared modest radius for the map's immediate search/filter/theme controls. */
html[data-theme] .listings-page :is(.search-input-wrap,#toggle-filters,.browse-toolbar .view-toggle,.filter-bar select,.location-controls input,.location-tools button),html[data-theme] .listings-page .theme-control select{border-radius:8px}
.portfolio-map .maplibregl-ctrl-attrib.maplibregl-compact{min-height:24px;padding:2px 24px 2px 2px;border-radius:5px}
.portfolio-map .maplibregl-ctrl-attrib.maplibregl-compact:not(.maplibregl-compact-show){padding:0;width:24px;height:24px}
.portfolio-map .maplibregl-ctrl-attrib-button{width:24px;height:24px}

/* apple-location-review.css */
/* Apple review only: dual contrast outline, no geographic collision offsets. */
.apple-location-pin{display:block;width:30px;height:40px;min-width:30px;min-height:40px;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;cursor:pointer;transform-origin:50% 100%;filter:drop-shadow(0 2px 2px #0006)}
.apple-location-pin svg{display:block;width:30px;height:40px;overflow:visible;pointer-events:none}
.apple-location-pin:hover,.apple-location-pin[aria-pressed=true]{z-index:3;filter:drop-shadow(0 2px 3px #0009) drop-shadow(0 0 2px #fff)}
.apple-location-pin[aria-pressed=true] svg circle{fill:#fff;stroke:#17212b;stroke-width:2.5}
.apple-location-pin:focus-visible{outline:3px solid #fff;outline-offset:3px;filter:drop-shadow(0 0 2px #17212b) drop-shadow(0 0 3px #17212b);z-index:4}

.apple-review-zoom{position:absolute;right:10px;bottom:10px;z-index:4;display:flex;border:1px solid #8888;border-radius:8px;overflow:hidden;box-shadow:0 1px 5px #0003}
.apple-review-zoom button{width:40px;height:40px;min-width:40px;min-height:40px;padding:0;border:0;border-radius:0;background:#fff;color:#17212b;font:25px/1 Arial,sans-serif;cursor:pointer}
.apple-review-zoom button+button{border-left:1px solid #8885}
.apple-review-zoom button:hover{background:#eee}
.apple-review-zoom button:focus-visible{outline:3px solid #ff653b;outline-offset:-3px}
html[data-theme=dark] .apple-review-zoom button{background:#292a2d;color:#fff}
html[data-theme=dark] .apple-review-zoom button:hover{background:#404247}

/* Directory popup: twice the previous desktop width/photo height, safely clamped. */
.portfolio-map .property-map-tag{padding:48px 16px 12px;overflow:hidden;font-size:16px;line-height:1.4;border-radius:12px}
.portfolio-map .property-map-tag:has(.property-map-tag-gallery){padding-top:48px}
.portfolio-map .apple-property-tag-body{overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
.portfolio-map .property-map-tag strong{font-size:20px;line-height:1.3;white-space:normal;overflow-wrap:anywhere}
.portfolio-map .property-map-tag p{font-size:15px;line-height:1.4;white-space:normal;margin-top:6px}
.portfolio-map .property-map-tag a{font-size:16px;min-height:44px;white-space:normal}
.portfolio-map .property-map-tag-close{top:3px;right:4px;width:44px;height:44px;min-width:44px;min-height:44px;font-size:28px;z-index:2}
.portfolio-map .property-map-tag-gallery{margin:0 0 12px;border-radius:8px}
.portfolio-map .property-map-tag-count{font-size:13px;padding:4px 8px}
/* Listing graphics may include text: always show the complete source image. */
.portfolio-map .property-map-tag-gallery img{object-fit:contain;background:var(--surface)}
/* Full-bleed stable preview; the image button opens the uncropped original. */
.portfolio-map .property-map-tag,.portfolio-map .property-map-tag:has(.property-map-tag-gallery){padding:0}
.portfolio-map .apple-property-tag-body{scrollbar-gutter:auto}
.portfolio-map .property-map-tag-gallery{margin:0;border-radius:10px 10px 0 0}
.portfolio-map .property-map-tag-gallery img{object-fit:cover}
.portfolio-map .property-map-tag strong{padding:10px 14px 0;font-size:18px;line-height:1.25}
.portfolio-map .property-map-tag p{margin:4px 14px 0;font-size:14px;line-height:1.3}
.portfolio-map .property-map-tag a{padding:0 14px 5px;min-height:38px;font-size:15px}
.portfolio-map .property-map-tag-close{top:6px;right:6px;border-radius:50%;background:#fff;color:#17212b;box-shadow:0 1px 5px #0006;z-index:5}
.portfolio-map .property-map-tag-gallery button.apple-popup-full-image{inset:0;width:100%;height:100%;transform:none;border-radius:0;background:transparent;z-index:1}
.portfolio-map .property-map-tag-gallery button.apple-popup-full-image::before{display:none}
.portfolio-map .property-map-photo-previous,.portfolio-map .property-map-photo-next{z-index:3}
.portfolio-map .property-map-tag-count{z-index:4;pointer-events:none}

/* sticky-header.css */
/* In-flow sticky headers retain the initial viewport budget and native tab order. */
html {--site-header-height:64px;--site-brand-header-height:64px}
html[data-theme] body > :is(.masthead,.portal-header,.geo-header){position:sticky;top:0;z-index:1000;background:var(--surface,#fff);isolation:isolate}
html[data-theme] body > .geo-nav{position:sticky;top:var(--site-brand-header-height);z-index:999;background:var(--surface,#fff)}
:is(.listings-page,.property-page,.geo-page) :is([id],a,button,input,select,textarea,[tabindex]){scroll-margin-top:calc(var(--site-header-height) + 16px)}
/* Nav stays one touch-friendly row rather than consuming a phone's viewport. */
@media(max-width:760px){html{--site-header-height:120px}html[data-theme] body > .geo-nav{display:flex;flex-wrap:nowrap;overflow-x:auto;white-space:nowrap}html[data-theme] body > .geo-nav a{flex-shrink:0;min-height:44px}}
@media print{html[data-theme] body > :is(.masthead,.portal-header,.geo-header,.geo-nav){position:static}html{--site-header-height:0px}}
