/* Listing extras on top of the Divi pages: status stamps + /properties/ filters. */

/* Diagonal status stamp across a listing photo (anything that isn't For Sale). */
.jb-stamped { position: relative; display: block; overflow: hidden; container-type: inline-size; }
.jb-stamped > img { display: block; }
.jb-stamp {
  position: absolute; left: 50%; top: 50%; z-index: 2;
  transform: translate(-50%, -50%) rotate(-28deg);
  color: #e3151b; font: 900 20cqw/1 Poppins, "Open Sans", Arial, sans-serif; letter-spacing: .02em;
  text-transform: uppercase; white-space: nowrap; pointer-events: none;
  -webkit-text-stroke: .6cqw #fff; paint-order: stroke fill;
  text-shadow: 0 .4cqw 1.6cqw rgba(0, 0, 0, .35);
}
.jb-stamp--coming_soon, .jb-stamp--pending { font-size: 11cqw; }
/* Divi's hover overlay sits above images; keep the stamp readable under it. */
.et_pb_gallery_image .jb-stamped + .et_overlay { z-index: 3; }

/* /properties/ "Filters" dropdown (Zillow-style) */
.jb-filterbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: 0 0 28px; font-family: Poppins, "Open Sans", Arial, sans-serif; }
.jb-filters { position: relative; }
.jb-filter-btn {
  display: inline-flex; align-items: center; gap: 8px; list-style: none; cursor: pointer; user-select: none;
  padding: 9px 16px; border: 1px solid #0041d9; border-radius: 8px; background: #fff; color: #0041d9;
  font: 600 15px/1.2 Poppins, "Open Sans", Arial, sans-serif;
}
.jb-filter-btn::-webkit-details-marker { display: none; }
.jb-filters[open] .jb-filter-btn { background: #e8efff; box-shadow: 0 0 0 3px #a9c2ff; }
.jb-chev { width: 8px; height: 8px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-2px); margin-left: 2px; transition: transform .15s; }
.jb-filters[open] .jb-chev { transform: rotate(-135deg) translate(-2px, 0); }
.jb-filter-panel {
  position: absolute; z-index: 50; top: calc(100% + 8px); left: 0; width: 360px; max-width: calc(100vw - 32px);
  background: #fff; border-radius: 8px; box-shadow: 0 8px 28px rgba(0, 0, 0, .22); overflow: hidden;
}
.jb-panel-head { padding: 13px 18px; background: #dcdde3; color: #555; font-weight: 600; font-size: 15px; }
.jb-panel-body { max-height: min(60vh, 520px); overflow-y: auto; padding: 6px 18px 4px; }
.jb-filter-panel fieldset { margin: 0; padding: 14px 0 8px; border: 0; }
.jb-filter-panel legend { padding: 0 0 6px; font-weight: 700; font-size: 15px; color: #2a2a33; }
.jb-filter-panel label { display: flex; align-items: center; gap: 12px; padding: 6px 0; cursor: pointer; font-size: 16px; color: #2a2a33; }
.jb-filter-panel input[type=checkbox] {
  appearance: none; -webkit-appearance: none; flex: none; width: 24px; height: 24px; margin: 0;
  border: 2px solid #767676; border-radius: 4px; background: #fff; cursor: pointer; display: grid; place-content: center;
}
.jb-filter-panel input[type=checkbox]:checked { background: #0041d9; border-color: #0041d9; }
.jb-filter-panel input[type=checkbox]:checked::after {
  content: ""; width: 6px; height: 12px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-1px, -1px);
}
.jb-filter-panel input[type=checkbox]:focus-visible { outline: 3px solid #a9c2ff; outline-offset: 2px; }
.jb-panel-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-top: 1px solid #e5e5e8; }
.jb-reset { color: #0041d9; font-weight: 600; font-size: 15px; text-decoration: none; }
.jb-reset:hover { text-decoration: underline; }
.jb-apply {
  flex: 0 1 200px; min-height: 46px; padding: 10px 24px; border: 0; border-radius: 8px; background: #0041d9; color: #fff;
  font: 700 16px Poppins, "Open Sans", Arial, sans-serif; cursor: pointer;
}
.jb-apply:hover { background: #0035b3; }
.jb-count { margin: 0; padding: 0 !important; font-size: 14px; color: #555; }
.jb-count a { color: #0041d9; }
.jb-empty { padding: 24px 0; font-size: 16px; }
.jb-filter-panel legend { float: none; display: block; width: auto; margin: 0; }
.jb-filter-panel fieldset label:first-of-type { padding-top: 2px; }
@media (max-width: 600px) {
  .jb-filterbar { position: relative; }
  .jb-filters { position: static; }
  .jb-filter-panel { left: 0; right: 0; width: auto; max-width: none; top: 52px; }
  .jb-panel-body { max-height: 55vh; }
}
.jb-reset { white-space: nowrap; }

/* Gallery lightbox: open photos as large as the screen allows (the theme
   shows them at their own size, so small photos opened tiny). */
.mfp-wrap img.mfp-img {
  width: min(94vw, calc((100vh - 110px) * 4 / 3));
  max-width: 94vw;
  max-height: calc(100vh - 30px);
  height: auto;
  object-fit: contain;
}
.mfp-wrap .mfp-title { font-size: 15px; line-height: 1.4; }
