/* HCH Listing Map v2.1 (16 Nov 2026, t903u staging) — presentation-only restyle of #hchx-location
   ("Building & location") on single apartment pages, plus a compact
   restyle of the existing .hch-popup "View apartment" button on map pages.
   Tokens match listing v5.2 / Get a Quote (navy #0f2f4d, blue #1a5a96,
   12px-radius buttons, Source Serif is not required here).
   Scope: layout rules require #hchx-location.hchlm-ready (JS adds the class).
   Popup button rules are global under .hch-popup so area/complex maps
   get the same CTA treatment without a layout change.
   Does not touch booking, prices, titles, or hch-cards-v2 (.hchc / #google_map_prop_list_*). */

/* ---------- Shared popup CTA (InfoBox .hch-pop-wrap and Leaflet .hch-popup) ---------- */
.hch-pop-wrap,
.hch-popup .leaflet-popup-content-wrapper{
  background:#fff;
  border-radius:14px;
  box-shadow:0 10px 30px rgba(15,47,77,.16);
  padding:10px 12px 12px;
  overflow:hidden;
  width:240px;
}
.hch-popup .leaflet-popup-content{
  margin:10px 12px 12px;
  width:auto !important;
}
.hch-pop-wrap .hch-pop img,
.hch-popup .hch-pop img{
  width:100%;
  height:auto;
  aspect-ratio:4/3;
  object-fit:cover;
  border-radius:12px;
  display:block;
  margin:0 0 8px;
}
.hch-pop-wrap .hch-pop-t,
.hch-pop-wrap .hch-pop-t a,
.hch-popup .hch-pop-t,
.hch-popup .hch-pop-t a{
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;
  font-family:"Source Serif 4 Variable","Iowan Old Style","Palatino Linotype",Palatino,Georgia,serif;
  font-weight:500;
  font-size:16px;
  line-height:1.3;
  color:#0f2f4d;
  letter-spacing:-.015em;
  text-decoration:none;
}
.hch-pop-wrap .hch-pop-a,
.hch-popup .hch-pop-a{
  color:#4d5567;
  font-size:12px;
  margin:2px 0 8px;
  line-height:1.35;
}
.hch-pop-wrap .hch-pop-btn,
.hch-pop-wrap a.hch-pop-btn,
.hch-popup .hch-pop-btn,
.hch-popup a.hch-pop-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:36px;
  padding:8px 14px;
  border-radius:12px;
  border:1px solid #0f2f4d;
  background:#fff !important;
  color:#0f2f4d !important;
  font:700 13px/1.2 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Open Sans",Arial,sans-serif;
  text-decoration:none !important;
  box-shadow:none;
  text-shadow:none;
}
.hch-pop-wrap .hch-pop-btn:hover,
.hch-pop-wrap a.hch-pop-btn:hover,
.hch-popup .hch-pop-btn:hover,
.hch-popup a.hch-pop-btn:hover{background:#0f2f4d !important;color:#fff !important;border-color:#0f2f4d}
.hch-pop-wrap .hch-pop-x,
.hch-popup .leaflet-popup-close-button{
  width:28px;height:28px;top:6px;right:6px;
  font-size:16px;line-height:28px;color:#4d5567;
}
.hch-pop-wrap .hch-pop-x{position:absolute;cursor:pointer;z-index:2;background:#fff;border-radius:50%;padding:0;display:flex;align-items:center;justify-content:center}

/* Compact listing-page popup (building name + directions, no unit number) */
.hch-pop-wrap.hchlm-pop .hch-pop,
.hchlm-pop .hch-pop{display:grid;grid-template-columns:72px 1fr;gap:8px 12px;align-items:center}
.hch-pop-wrap.hchlm-pop .hch-pop img,
.hchlm-pop .hch-pop img{width:72px;height:72px;margin:0;border-radius:8px}
.hch-pop-wrap.hchlm-pop .hch-pop-t,
.hchlm-pop .hch-pop-t{grid-column:2;font-size:15px}
.hch-pop-wrap.hchlm-pop .hch-pop-a,
.hchlm-pop .hch-pop-a{grid-column:2;margin:0}
.hch-pop-wrap.hchlm-pop .hch-pop-btn,
.hchlm-pop .hch-pop-btn{grid-column:1 / -1;width:100%;margin-top:2px;box-sizing:border-box}

/* ---------- Listing "Building & location" layout ---------- */
body.hchlm-on .hchx #listing_ammenities{
  display:flow-root;
  clear:both;
}
body.hchlm-on .hchx #listing_ammenities .panel-wrapper.features_wrapper{
  float:none !important;
  width:100%;
}
#hchx-location.hchlm-ready{
  clear:both;
  display:flow-root;
  --hchlm-navy:#0f2f4d;
  --hchlm-blue:#1a5a96;
  --hchlm-blue-d:#134a7d;
  --hchlm-ink:#1d2733;
  --hchlm-muted:#4d5567;
  --hchlm-line:#dfe4ea;
  --hchlm-soft:#f4f6f9;
  --hchlm-soft2:#eef3f8;
  --hchlm-radius:14px;
  --hchlm-shadow:0 10px 30px rgba(15,47,77,.10);
}
#hchx-location.hchlm-ready .hchx-loc-grid{
  display:flex;
  flex-direction:column;
  gap:16px;
  align-items:stretch;
}
#hchx-location.hchlm-ready > h2#hchx-lo-h{
  font-size:22px !important;
  line-height:1.3 !important;
  font-weight:700;
  color:var(--hchlm-navy);
  letter-spacing:-.01em;
  margin:0 0 14px;
  height:auto !important;
  max-height:none;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Open Sans",Arial,sans-serif;
}

/* Address card: existing estate_listing_address() text and links, restyled */
#hchx-location.hchlm-ready .hchx-addr-block{
  display:grid;
  grid-template-columns:1fr auto;
  gap:8px 24px;
  align-items:center;
  background:var(--hchlm-soft2);
  border:1px solid var(--hchlm-line);
  border-radius:var(--hchlm-radius);
  padding:18px 20px;
}
#hchx-location.hchlm-ready .hchlm-addr-rows{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:2px 24px;
  min-width:0;
}
#hchx-location.hchlm-ready .hchx-addr-block .listing_detail{
  float:none !important;
  width:auto !important;
  padding:4px 0;
  margin:0;
  font-size:15px;
  line-height:1.5;
  color:var(--hchlm-ink);
}
#hchx-location.hchlm-ready .hchx-addr-block .item_head{
  font-weight:700;
  color:var(--hchlm-navy);
  margin-right:6px;
}

/* CTAs — primary = Book Now blue; secondary = Get a Quote / Request a quote navy outline */
#hchx-location.hchlm-ready .hchlm-actions{
  display:flex;
  flex-direction:column;
  gap:8px;
  min-width:200px;
}
#hchx-location.hchlm-ready .hchlm-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:44px;
  padding:10px 16px;
  border-radius:12px;
  font:700 15px/1.2 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Open Sans",Arial,sans-serif;
  text-decoration:none !important;
  text-align:center;
  cursor:pointer;
  box-sizing:border-box;
  width:100%;
}
#hchx-location.hchlm-ready a.hchlm-btn-primary{
  background:var(--hchlm-blue);
  color:#fff !important;
  border:0;
}
#hchx-location.hchlm-ready a.hchlm-btn-primary:hover{background:var(--hchlm-blue-d);color:#fff !important}
#hchx-location.hchlm-ready a.hchlm-btn-secondary{
  background:#fff;
  color:var(--hchlm-navy) !important;
  border:1px solid var(--hchlm-navy);
}
#hchx-location.hchlm-ready a.hchlm-btn-secondary:hover{background:var(--hchlm-soft2);color:var(--hchlm-navy) !important}
#hchx-location.hchlm-ready .hchlm-btn svg{flex:0 0 18px;width:18px;height:18px}

/* POI chips — moved out of the map by JS, IDs and click handlers kept */
#hchx-location.hchlm-ready .hchlm-poi{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin:0;
  padding:0;
}
#hchx-location.hchlm-ready .hchlm-poi .google_poi{
  position:static;
  display:inline-flex;
  align-items:center;
  gap:8px;
  width:auto;
  height:auto;
  min-height:40px;
  padding:6px 10px 6px 7px;
  margin:0;
  border:1px solid var(--hchlm-line);
  border-radius:999px;
  background:#fff;
  box-shadow:none;
  color:var(--hchlm-ink);
  font-size:13px;
  font-weight:600;
  line-height:1.2;
  cursor:pointer;
}
#hchx-location.hchlm-ready .hchlm-poi .google_poi:hover{
  border-color:var(--hchlm-blue);
  background:var(--hchlm-soft2);
}
#hchx-location.hchlm-ready .hchlm-poi .google_poi.poi_active{
  border:1.5px solid var(--hchlm-blue);
  background:var(--hchlm-soft2);
  color:var(--hchlm-navy);
}
#hchx-location.hchlm-ready .hchlm-poi .google_poi img,
#hchx-location.hchlm-ready .hchlm-poi .google_poi .dashboad-tooltip{
  width:18px;
  height:18px;
  padding:0;
  margin:0;
  display:block;
  flex:0 0 18px;
}
#hchx-location.hchlm-ready .hchlm-poi-label{white-space:nowrap}

/* Map: full width, taller, single rounded frame, no outer box */
#hchx-location.hchlm-ready .property_page_container.google_map_type1,
#hchx-location.hchlm-ready .google_map_on_list_wrapper{
  float:none !important;
  width:100% !important;
  max-width:none;
  margin:0;
  padding:0;
  border:0;
  background:transparent;
  min-height:0;
}
#hchx-location.hchlm-ready .google_map_on_list_wrapper{
  position:relative;
  border-radius:var(--hchlm-radius);
  overflow:hidden;
  box-shadow:var(--hchlm-shadow);
  border:1px solid var(--hchlm-line);
  min-height:0;
  background:var(--hchlm-soft);
}
#hchx-location.hchlm-ready #google_map_on_list,
#hchx-location.hchlm-ready #google_map_on_list.leaflet-container{
  height:420px !important;
  width:100% !important;
  float:none;
  display:block;
  border-radius:0;
  z-index:1;
}
/* Hide the leftover POI/zoom overlay host once children have been relocated */
#hchx-location.hchlm-ready .google_map_poi_marker:empty,
#hchx-location.hchlm-ready .google_map_poi_marker:not(:has(.google_poi)):not(:has(#hch_mapspanel)){
  display:none;
}
#hchx-location.hchlm-ready .google_map_poi_marker{
  position:static;
  inset:auto;
  height:0;
  width:0;
  overflow:visible;
  pointer-events:none;
}

/* Zoom cluster, bottom-right. Street View is an OSM stub — hidden, element kept. */
#hchx-location.hchlm-ready .google_map_on_list_wrapper #hch_mapspanel{
  position:absolute;
  display:flex;
  flex-direction:column;
  gap:0;
  right:12px;
  bottom:12px;
  left:auto;
  top:auto;
  z-index:20;
  width:auto;
  height:auto;
  margin:0;
  padding:4px;
  background:#fff;
  border-radius:10px;
  box-shadow:0 2px 10px rgba(15,47,77,.18);
  pointer-events:auto;
}
#hchx-location.hchlm-ready #hch_mapspanel #gmapzoomplus,
#hchx-location.hchlm-ready #hch_mapspanel #gmapzoomminus{
  position:static !important;
  float:none;
  margin:0;
  top:auto;
  left:auto;
  box-shadow:none;
  border-radius:8px;
}
#hchx-location.hchlm-ready #hch_mapspanel #gmapstreet{
  display:none !important;
}
#hchx-location.hchlm-ready .leaflet-control-zoom,
#hchx-location.hchlm-ready .leaflet-control-container .leaflet-top.leaflet-left{
  display:none; /* theme zoom buttons are the ones that are wired */
}
#hchx-location.hchlm-ready .leaflet-control-attribution{
  font-size:10px;
  background:rgba(255,255,255,.85);
}

#hchx-location.hchlm-ready :focus-visible{
  outline:3px solid #f2b705;
  outline-offset:2px;
}

@media (max-width:767px){
  #hchx-location.hchlm-ready .hchx-addr-block{
    grid-template-columns:1fr;
    padding:16px;
    gap:14px;
  }
  #hchx-location.hchlm-ready .hchlm-addr-rows{
    grid-template-columns:1fr;
  }
  #hchx-location.hchlm-ready .hchlm-actions{
    min-width:0;
  }
  #hchx-location.hchlm-ready #google_map_on_list,
  #hchx-location.hchlm-ready #google_map_on_list.leaflet-container{
    height:300px !important;
  }
  #hchx-location.hchlm-ready .hchlm-poi{
    flex-wrap:nowrap;
    overflow-x:auto;
    overflow-y:hidden;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:thin;
    padding:2px 0 6px;
    margin:0 -2px;
  }
  #hchx-location.hchlm-ready .hchlm-poi .google_poi{
    flex:0 0 auto;
    min-height:40px;
  }
}

@media (prefers-reduced-motion:reduce){
  #hchx-location.hchlm-ready *{transition:none !important}
}


/* 2.2 popup wrap: card-like padding, hide price when the page has .hchc-nodates */
.hch-pop-wrap,
.hch-popup .leaflet-popup-content-wrapper{
  width:240px;
  padding:10px 10px 12px;
  border:1px solid #dfe4ea;
}
body.hchc-nodates .hch-pop-wrap .hch-pop-price,
body.hchc-nodates .hch-popup .hch-pop-price,
body.hchc-nodates .hch-pop-wrap .prop_pricex{
  position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;
  clip:rect(0,0,0,0)!important;clip-path:inset(50%)!important
}
body.hchc-nodates .hch-pop-wrap .hchc-choose-dates,
body.hchc-nodates .hch-popup .hchc-choose-dates{
  display:inline-flex;margin:0 0 8px;padding:0;border:0;background:none;
  font:600 13px/1.35 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  color:#1a5a96;cursor:pointer
}
/* Compact listing popup keeps a square thumb, but uses the same serif title clamp. */
.hch-pop-wrap.hchlm-pop .hch-pop img,
.hchlm-pop .hch-pop img{width:72px;height:72px;aspect-ratio:auto;margin:0;border-radius:8px}
