:root {
    --location-accent: #ed991b;
    --location-surface: #fff;
    --location-text: #252525;
    --location-border: #d7d7d7;
    --location-warning: #8a3800;
    --location-warning-surface: #fff4e5;
    --location-badge-background: rgb(0 0 0 / 58%);
    --location-badge-text: #fff;
    --location-badge-inset: 12px;
    --location-badge-radius: 12px;
    --location-photo-header-shade: linear-gradient(rgb(0 0 0 / 65%),rgb(0 0 0 / 0%));
    --location-photo-status-background: rgb(0 0 0 / 75%);
    --location-photo-flag-radius: 50px;
    --location-card-photo-height: 270px;
}
.img-block,.property-photo,.main-image-wrapper { position: relative; }
.card .property-card-photo>img { display:block; width:100%; height:var(--location-card-photo-height); object-fit:cover; }
.property-location-badge, .card .img-block .property-location-badge { float:none; margin:0; text-transform:none; position:absolute; bottom:var(--location-badge-inset); right:var(--location-badge-inset); z-index:12; display:flex; align-items:center; gap:.45em; padding:.55em .75em; max-width:calc(100% - var(--location-badge-inset) * 2); background:var(--location-badge-background); color:var(--location-badge-text); border-radius:var(--location-badge-radius); font:700 14px/1.5 Cairo,Tahoma,sans-serif; pointer-events:none; box-sizing:border-box; }
.location-badge-district,.location-badge-type { flex:0 1 auto; min-width:0; max-width:45%; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.location-badge-leaf { flex:1 1 auto; min-width:0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.location-badge-separator { flex:0 0 auto; opacity:.8; }
.card .property-card-photo .property-photo-header { top:0; bottom:auto; left:0; right:0; float:none; width:100%; padding:var(--location-badge-inset); display:flex; align-items:flex-start; justify-content:space-between; gap:.6rem; z-index:13; box-sizing:border-box; }
.card .property-card-photo .property-photo-header:before { background:var(--location-photo-header-shade); }
.card .property-card-photo .property-photo-header h5 { float:none; top:0; margin:0; font-size:18px; line-height:1.5; min-width:0; overflow-wrap:anywhere; }
.property-photo-flags { display:flex; flex-direction:column; align-items:flex-end; gap:.4rem; flex:0 1 auto; max-width:55%; }
.card .property-card-photo .property-photo-flags>span { float:none; margin:0; padding:.35em .8em; color:var(--location-badge-text); background:var(--location-photo-status-background); border-radius:var(--location-photo-flag-radius); font-size:12px; line-height:1.5; text-align:center; overflow-wrap:anywhere; }
.card .property-card-photo .property-photo-flags>.property-photo-open-house { background:var(--location-accent); }
.property-card-photo .archived-overlay { border-radius:inherit; }
.enhanced-property-carousel .main-image-wrapper:has(.property-location-badge) .image-counter { top:var(--location-badge-inset); bottom:auto; left:50%; right:auto; transform:translateX(-50%); }
.property-photo>img { display:block; width:100%; object-fit:cover; }
.location-search { margin-block:1rem 1.5rem; padding:1rem; border:1px solid var(--location-border); border-radius:12px; color:var(--location-text); background:var(--location-surface); }
.location-search-form { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr)); gap:.85rem; align-items:end; }
.location-search-form label { display:grid; gap:.4rem; font-size:.95rem; font-weight:600; }
.location-search-form select,.location-search-form input { width:100%; min-width:0; min-height:44px; padding:.55rem .7rem; background:var(--location-surface); color:var(--location-text); border:1px solid var(--location-border); border-radius:8px; }
.location-search-form select:focus-visible,.location-search-form input:focus-visible,.location-view-links a:focus-visible { outline:2px solid var(--location-accent); outline-offset:3px; }
.location-search-form [hidden] { display:none; }
.legacy-property-search[hidden] { display:none!important; }
.location-search-form button { min-height:44px; }
.location-filter-message { padding:1rem; background:var(--location-warning-surface); color:var(--location-warning); border-radius:8px; margin-block:1rem; }
.location-view-links { display:flex; gap:1.2rem; flex-wrap:wrap; margin-block-start:1rem; }
.location-view-links a { color:var(--location-text); text-decoration:underline; text-underline-offset:.3em; }
.location-view-links a:hover { color:var(--location-accent); }
.location-current-filter { display:inline-block; margin:.8rem .4rem 0; padding:.25rem .5rem; border:1px solid var(--location-border); border-radius:8px; }
.location-current-filter button { min-width:36px; min-height:36px; background:transparent; border:0; color:var(--location-text); }
.location-empty-options { margin-block:.7rem 0; }
@media(max-width:480px) { .property-location-badge { font-size:12px; gap:.3em; } .location-search-form { grid-template-columns:1fr; } }

.lightbox-photo { position:relative; display:inline-block; max-width:100%; line-height:0; }
.lightbox-photo .lightbox-image { display:block; max-height:min(88vh,900px); max-width:100%; }
.fullscreen-lightbox .property-location-badge { z-index:10001; }

.property-location-badge > span, .card .img-block .property-location-badge > span { float:none; margin:0; padding:0; background:transparent; color:inherit; font:inherit; text-transform:none; border-radius:0; }

:root { --location-map-popup-width:250px; }
.map-info-window { width:var(--location-map-popup-width); max-width:calc(100vw - 64px); }
.map-info-window .property-photo { margin-block-end:.5rem; }
.location-badge-type { flex:0 0 auto; max-width:none; }
.location-badge-district { flex:0 0 auto; }
.property-location-badge:not(:has(.location-badge-leaf)) .location-badge-district { max-width:none; flex:0 1 auto; }
