/* PinPlot V25.316 — shared add/edit form, reliable Buy filters and image loading. */

/* The description belongs to Basics, immediately below Sale Type. */
#listingOverlay .pinplot-step[data-step="1"]>.listing-description-wrap{
  margin:2px 0 14px;
}
#listingOverlay .listing-description-helper{font-size:11px;color:#708078}

/* Buy detail cards: Land | More, then Amenities | Furnishing. */
#listingBuyerMatchSection .listing-owner-grid{
  align-items:start;
}
#listingBuyerMatchSection .pinplot-v315-half{
  min-width:0;
  align-self:stretch;
}
#listingBuyerMatchSection .pinplot-v315-half summary{
  min-height:48px;
  box-sizing:border-box;
}

/* One filter vocabulary for both desktop and mobile. */
.pinplot-v316-buy-fields,
.pinplot-v316-buy-detail-grid{
  grid-column:1/-1;
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:12px;
  min-width:0;
}
.pinplot-v316-buy-fields{display:none}
.pinplot-buy-filter-mode .pinplot-v316-buy-fields{display:grid}
.pinplot-v316-only-buy{display:none!important}
.pinplot-buy-filter-mode .pinplot-v316-only-buy{display:block!important}
.pinplot-v316-filter-field,
.pinplot-v316-filter-card{
  min-width:0;
  box-sizing:border-box;
}
.pinplot-v316-filter-field{
  display:flex;
  flex-direction:column;
  gap:6px;
  color:#253f35;
  font-size:12px;
  font-weight:750;
}
.pinplot-v316-filter-field:first-child{grid-column:1/-1}
.pinplot-v316-filter-field input{
  width:100%;
  min-height:42px;
  box-sizing:border-box;
  border:1px solid #d7e1dc;
  border-radius:10px;
  background:#fff;
  padding:9px 10px;
  color:#17382d;
}
.pinplot-v316-buy-detail-grid{margin-top:2px}
.pinplot-v316-filter-card{
  border:1px solid #d9e5df;
  border-radius:13px;
  background:#fbfdfc;
  overflow:hidden;
}
.pinplot-v316-filter-card>summary{
  display:flex;
  align-items:center;
  min-height:48px;
  box-sizing:border-box;
  padding:12px 13px;
  color:#17382d;
  font-size:12px;
  font-weight:850;
  cursor:pointer;
  list-style:none;
}
.pinplot-v316-filter-card>summary::-webkit-details-marker{display:none}
.pinplot-v316-filter-card>summary:after{content:"⌄";margin-left:auto;font-size:17px}
.pinplot-v316-filter-card[open]>summary:after{content:"⌃"}
.pinplot-v316-filter-card-body{padding:0 11px 11px}
.pinplot-v316-filter-card-body>.filter-block,
.pinplot-v316-filter-card-body>.minmax-filter-block,
.pinplot-v316-filter-card-body>label{
  width:100%;
  margin:0 0 9px;
  box-sizing:border-box;
  color:#526057;
  font-size:10px;
  font-weight:700;
}
.pinplot-v316-filter-card-body input,
.pinplot-v316-filter-card-body select{
  max-width:100%;
  box-sizing:border-box;
}
.pinplot-v316-filter-card-body>:last-child{margin-bottom:0}
.pinplot-v316-filter-checks{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:7px;
}
.pinplot-v316-filter-checks label{
  display:flex;
  align-items:center;
  gap:7px;
  min-height:39px;
  box-sizing:border-box;
  padding:8px;
  border:1px solid #dce6e1;
  border-radius:9px;
  background:#fff;
  color:#33463d;
  font-size:11px;
  font-weight:700;
}
.pinplot-v316-filter-checks input{
  flex:0 0 auto;
  width:15px!important;
  height:15px!important;
  margin:0!important;
  accent-color:#008f6b;
}
#pinplotV316LandCard>.minmax-filter-block{border:0;margin:0;padding:11px;background:transparent}
#pinplotV316LandCard>.minmax-filter-block .minmax-heading{margin-bottom:8px}
.pinplot-v316-rent-amenities{grid-column:1/-1}
.pinplot-buy-filter-mode .pinplot-v316-rent-amenities{grid-column:auto}

/* Clear loading surfaces and decode offscreen photos without blocking layout. */
.listing-photo-preview-item,
.property-image,
.detail-hero,
.map-preview-photo,
.map-preview-image-wrap,
.listing-thumb{
  background:#e8efec linear-gradient(100deg,#e8efec 20%,#f5f8f7 38%,#e8efec 56%);
  background-size:220% 100%;
  animation:pinplot-v316-image-loading 1.25s ease-in-out infinite;
}
.listing-photo-preview-item:has(img[src]),
.property-image:has(img[src]),
.detail-hero:has(img[src]),
.map-preview-photo:has(img[src]),
.map-preview-image-wrap:has(img[src]),
.listing-thumb:has(img[src]){animation:none;background:#e8efec}
.listing-thumb{position:relative;overflow:hidden}
.listing-thumb>img{display:block;width:100%;height:100%;object-fit:cover}
@keyframes pinplot-v316-image-loading{to{background-position-x:-220%}}

/* Shared edit mode makes its purpose obvious without introducing a second UI. */
body.pinplot-v316-editing #listingOverlayTitle:after{
  content:" · All fields, photos and map location";
  display:block;
  margin-top:3px;
  color:#6d7d75;
  font-size:10px;
  font-weight:650;
}
body.pinplot-v316-editing #publishListingButton{background:#087956}

@media(max-width:760px){
  #searchBar{
    position:fixed!important;
    top:max(10px,env(safe-area-inset-top))!important;
    left:12px!important;
    right:12px!important;
    width:auto!important;
    max-width:none!important;
    transform:none!important;
    z-index:21420!important;
  }
  #searchPanel{z-index:21410!important}
  #listingBuyerMatchSection .pinplot-v315-half{grid-column:1/-1}
  .pinplot-v316-buy-fields,
  .pinplot-v316-buy-detail-grid{grid-template-columns:1fr;gap:9px}
  .pinplot-v316-filter-field:first-child{grid-column:1}
  .pinplot-v316-filter-card,
  .pinplot-v316-rent-amenities,
  .pinplot-buy-filter-mode .pinplot-v316-rent-amenities{grid-column:1/-1}
  .pinplot-v316-filter-checks{grid-template-columns:1fr 1fr}
  #mobileMoreFilterPanel .res-filter-grid{overflow-x:hidden}
}

@media(max-width:380px){
  .pinplot-v316-filter-checks{grid-template-columns:1fr}
}
