/* Gary Jacobs theme — patch-3 CSS.
   Topbar docks below the condensed sticky header; header logo no longer collides with nav links;
   preview panel scrolls on its own; courtesy + tour styles; mobile iframe clipping fix; print disclaimer. */

/* Listing-page topbar (Search Listings · breadcrumb · Save · Share) stays below the header instead of
   sliding under the fixed condensed header on scroll. */
.gj-topbar { position: sticky; top: 0; z-index: 900; background: #fff; }
html:has(.gj-header.gj-stuck) .gj-topbar { top: 55px; }
body.admin-bar .gj-topbar { top: 32px; }
html:has(.gj-header.gj-stuck) body.admin-bar .gj-topbar,
body.admin-bar:has(.gj-header.gj-stuck) .gj-topbar { top: 87px; }
@media (max-width: 767px) {
  html:has(.gj-header.gj-stuck) .gj-topbar { top: 46px; }
}

/* Header: between 992 and 1120px the centered logo collides with WORK WITH US / EXPLORE AREAS.
   Collapse the quick links into the MENU pill a little earlier. */
@media (min-width: 992px) and (max-width: 1120px) {
  .gj-header__left .gj-navlink,
  .gj-header__left .gj-dd { display: none; }
}

/* /properties/ preview panel scrolls independently so the map stays put. */
@media (min-width: 992px) {
  .gj-srch__detail { max-height: calc(100vh - 150px); overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; }
}

/* Attribution in map popups (preview + detail already styled via .gj-ldet__courtesy). */
.gj-pop__courtesy { display: block; font-size: 11px; color: #777; margin-top: 6px; line-height: 1.35; }

/* Virtual tour embed in the preview panel. */
.gj-ldet__tour { position: relative; margin: 14px 0; }
.gj-ldet__tour iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 8px; }
.gj-ldet__tourlink { margin: 12px 0; }

/* Topbar heart sits inside the Save button. */
.gj-topbar__save { display: inline-flex; align-items: center; }
.gj-topbar__save .gj-heart--topbar { margin-left: 8px; }

/* Mobile: embedded videos were rendering 466px wide at 375px viewports (right edge cut off). */
.gj-section iframe,
.gj-split iframe,
iframe[src*="youtube.com"],
iframe[src*="youtu.be"],
iframe[src*="vimeo.com"] { max-width: 100%; }
.gj-section iframe[src*="youtube"],
.gj-split iframe[src*="youtube"] { aspect-ratio: 16 / 9; height: auto; }

/* CSMAR requires the disclaimer on printable pages too (plugin renders the block; make sure print shows it). */
@media print {
  .gj-idx-disclaimer { display: block !important; font-size: 9pt; color: #000; }
}
