/* =====================================================================
   property-modal.css  —  Helen Harp Realty rich listing detail
   ---------------------------------------------------------------------
   ARCHITECTURE (2026-05-26 rewrite):

     The full listing detail HTML is server-rendered into every page that
     shows listings (saved-link results, /homes/* detail pages). The same
     markup is used in two modes:

       1. mode="modal" — wrapped in <section id="listing-{ID}"
          class="hhr-listing-modal">. Default is `display: none`. When
          the URL fragment matches that id, `:target` flips it to a
          fixed-position lightbox. Closes via <a href="#close"> which
          removes the matching fragment. NO JavaScript required.

       2. mode="page"  — the same content rendered as a full page,
          unwrapped. Targeted by `.prop-detail--page`.

   The rest of the file is the visual system shared by both modes.
   Visual reference: the user's mockup screenshot.
   ===================================================================== */

/* ============================================================
   PAGE-ROOT CONTAINER
   ------------------------------------------------------------
   Holds every SSR modal section for the page. Lives directly
   under <body> so it's never contained by a transformed IDX
   ancestor — `position: fixed` inside resolves to the viewport.
   ============================================================ */
.hhr-listings-modal-root {
  /* No display:none on the container — only the inner modals are hidden
     until :target activates one. We don't want display:none on the
     container because that would also hide :target descendants. */
  position: static;
  transform: none !important;
  filter: none !important;
  perspective: none !important;
  contain: none !important;
}

/* ============================================================
   :TARGET MODAL CONTAINER
   ============================================================ */
.hhr-listing-modal {
  /* hidden by default — only visible when its id matches the URL hash.
     `scroll-margin-top: 100vh` is a trick to tell the browser the modal
     section's "top" is one viewport below where it actually lives. When
     :target fires and the browser tries to scroll-into-view, it sees a
     target that's already further down than the bottom of the page and
     does nothing useful — preserving the user's scroll position on the
     card they clicked Read More on. (overflow:hidden via :has() locks
     scroll once the modal is open, but the browser's auto-scroll-to-
     target fires before the lock takes effect in some browsers.) */
  display: none;
  scroll-margin-top: 100vh;
}
.hhr-listing-modal:target {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 9000;
}
/* Lock background scroll when a listing modal is the URL :target.
   `:has()` works in Chrome 105+, Safari 15.4+, Firefox 121+; older
   browsers degrade to a scrollable body, which is annoying but not
   broken — the modal still works. */
body:has(.hhr-listing-modal:target) { overflow: hidden; }
html:has(.hhr-listing-modal:target) { overflow: hidden; }

.hhr-listing-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23,34,53, 0.72);
  backdrop-filter: blur(2px);
  z-index: 0;
  cursor: pointer;
  display: block;
}

.hhr-listing-modal__shell {
  position: relative;
  z-index: 1;
  margin: 24px auto;
  width: min(1240px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 30px 90px rgba(23,34,53, 0.34);
  scrollbar-gutter: stable both-edges;
}

.hhr-listing-modal__close {
  position: sticky;
  top: 12px;
  float: right;
  margin: 12px 16px 0 0;
  z-index: 5;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(23,34,53, 0.18);
  color: #172235;
  text-decoration: none;
  font-size: 22px;
  line-height: 1;
  font-weight: 700;
}
.hhr-listing-modal__close:hover { background: #f1f3f5; }

/* ----- prev/next nav arrows (between listings in same saved-link) ----- */
.hhr-listing-modal__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: #172235;
  text-decoration: none;
  font-size: 32px;
  line-height: 1;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(23,34,53, 0.28);
  transition: transform 0.12s ease, background 0.12s ease;
}
.hhr-listing-modal__nav:hover {
  background: #ffffff;
  transform: translateY(-50%) scale(1.05);
}
.hhr-listing-modal__nav--prev { left: 16px; }
.hhr-listing-modal__nav--next { right: 16px; }
@media (max-width: 700px) {
  .hhr-listing-modal__nav { width: 40px; height: 40px; font-size: 26px; }
  .hhr-listing-modal__nav--prev { left: 8px; }
  .hhr-listing-modal__nav--next { right: 8px; }
}

/* When the modal is open, prevent the body from scrolling under it.
   This uses a tiny CSS trick: the `:target` modal sets up a fixed
   container and the scroll is internal, so we don't actually need
   to lock the body — but we do hide horizontal overflow to keep
   things tidy. */
.hhr-listing-modal:target ~ * { /* no-op placeholder for future siblings */ }

/* ============================================================
   PROPERTY DETAIL LAYOUT (shared by modal + page)
   ============================================================ */
.prop-detail {
  --hhr-property-detail-accent: #172235;
  --hhr-property-detail-accent-hover: #172235;
  --hhr-property-detail-soft: #f1f3f5;
  --hhr-property-shadow-rgb: 8,101,245;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.9fr);
  gap: 24px;
  padding: 22px;
  color: #172235;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14.5px;
  line-height: 1.5;
  background: #ffffff;
}
.prop-detail--page {
  max-width: 1240px;
  margin: 24px auto;
}

.prop-detail__main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.prop-detail__side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

/* ============================================================
   GALLERY
   ============================================================ */
.prop-gallery {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 10px;
}
.prop-gallery__hero {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  overflow: hidden;
  background: #e8ebe7;
}
.prop-gallery__hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.prop-gallery__hero--empty {
  display: grid;
  place-items: center;
  color: #94a3b8;
}
.prop-gallery__status {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ffffff;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #065f46;
  box-shadow: 0 2px 8px rgba(23,34,53, 0.15);
}
.prop-gallery__status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #10b981;
}
.prop-gallery__status--pending  { color: #92400e; }
.prop-gallery__status--pending .prop-gallery__status-dot,
.prop-gallery__status--contingent .prop-gallery__status-dot { background: #f59e0b; }
.prop-gallery__status--contingent { color: #92400e; }
.prop-gallery__status--sold, .prop-gallery__status--unavailable { color: #991b1b; }
.prop-gallery__status--sold .prop-gallery__status-dot,
.prop-gallery__status--unavailable .prop-gallery__status-dot { background: #dc2626; }

.prop-gallery__rail {
  display: grid;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 10px;
  min-height: 0;
}
.prop-gallery__thumb {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #e5e7eb;
  aspect-ratio: 4 / 3;
}
.prop-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.prop-gallery__thumb--all::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(23,34,53, 0.55);
}
.prop-gallery__thumb-label {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
  background: rgba(23,34,53, 0.4);
  border-radius: 12px;
  padding: 8px 10px;
  text-align: center;
}

/* ============================================================
   PAGE-MODE GALLERY  (.prop-gallery--page)
   ------------------------------------------------------------
   Full-page viewer only — never the modal. Big hero on the left
   (arrows + counter + full-screen button) with a map panel below
   it, and a single scrolling thumbnail column on the right whose
   height tracks the hero+map stack. All rules are prefixed with
   .prop-gallery--page so they out-specify the base gallery rules
   without overriding them in place.
   ============================================================ */
.prop-gallery--page {
  grid-template-columns: minmax(0, 1fr) clamp(86px, 11vw, 132px);
  gap: 14px;
  align-items: stretch;
}
.prop-gallery--page .prop-gallery__stage {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

/* --- hero --- */
/* Map panel hidden for now (2026-06-18): the hero grows to fill the whole left
   column where hero + map used to sit, so the photo reads much larger. To bring
   the map back, drop the `.prop-gallery__map{display:none}` rule below and
   restore aspect-ratio: 16 / 10 here. */
.prop-gallery--page .prop-gallery__hero {
  aspect-ratio: 20 / 21;
  border-radius: 16px;
  cursor: zoom-in;
}
.prop-gallery--page .prop-gallery__hero-img {
  transition: opacity 0.18s ease;
}

/* nav arrows */
.prop-gallery--page .prop-gallery__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0 0 4px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #172235;
  font-size: 28px;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(23,34,53, 0.22);
  transition: background 0.15s ease, transform 0.15s ease;
  z-index: 3;
}
.prop-gallery--page .prop-gallery__nav:hover {
  background: #ffffff;
  transform: translateY(-50%) scale(1.06);
}
.prop-gallery--page .prop-gallery__nav:focus-visible {
  outline: 3px solid var(--hhr-property-detail-accent, #c8102e);
  outline-offset: 2px;
}
.prop-gallery--page .prop-gallery__nav--prev { left: 12px; }
.prop-gallery--page .prop-gallery__nav--next { right: 12px; }

/* photo counter */
.prop-gallery--page .prop-gallery__counter {
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 3;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(23,34,53, 0.66);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  backdrop-filter: blur(2px);
}

/* full-screen button */
.prop-gallery--page .prop-gallery__fs {
  position: absolute;
  bottom: 12px;
  right: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border: none;
  border-radius: 999px;
  background: rgba(23,34,53, 0.66);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(2px);
  transition: background 0.15s ease;
}
.prop-gallery--page .prop-gallery__fs:hover { background: rgba(23,34,53, 0.85); }
.prop-gallery--page .prop-gallery__fs:focus-visible {
  outline: 3px solid var(--hhr-property-detail-accent, #c8102e);
  outline-offset: 2px;
}

/* --- map panel (placeholder for first pass) --- */
/* Hidden for now per owner 2026-06-18 (hero fills the area instead). Markup is
   left in place; remove this display:none to bring the map back. */
.prop-gallery--page .prop-gallery__map {
  display: none;
  position: relative;
  aspect-ratio: 21 / 9;
  border-radius: 16px;
  overflow: hidden;
  background:
    linear-gradient(135deg, #e8efe6 0%, #dbe7e0 100%);
  border: 1px solid #d3ddd5;
}
.prop-gallery--page .prop-gallery__map-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #4b6358;
  text-align: center;
}
.prop-gallery--page .prop-gallery__map-label {
  font-weight: 700;
  font-size: 14px;
  color: #355043;
}
.prop-gallery--page .prop-gallery__map-sub {
  font-size: 11px;
  color: #6b8478;
  letter-spacing: 0.02em;
}

/* --- right thumbnail rail (single scrolling column) --- */
.prop-gallery--page .prop-gallery__railwrap {
  position: relative;
  min-height: 0;
}
.prop-gallery--page .prop-gallery__rail {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  grid-template-rows: none;       /* unset the base rail grid */
  gap: 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  scrollbar-width: thin;
}
.prop-gallery--page .prop-gallery__thumb {
  flex: 0 0 auto;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 12px;
  background: #e5e7eb;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.12s ease;
}
.prop-gallery--page .prop-gallery__thumb:hover { transform: translateY(-1px); }
.prop-gallery--page .prop-gallery__thumb.is-active {
  border-color: var(--hhr-property-detail-accent, #c8102e);
}
.prop-gallery--page .prop-gallery__thumb:focus-visible {
  outline: 3px solid var(--hhr-property-detail-accent, #c8102e);
  outline-offset: 2px;
}
.prop-gallery--page .prop-gallery__thumb img {
  border-radius: 10px;
}

/* ============================================================
   FULL-SCREEN LIGHTBOX  (.hhr-lightbox)
   ------------------------------------------------------------
   Built by hhr-listing-gallery.js on first open. Fixed overlay
   with a centered photo, prev/next arrows, a counter, a bottom
   thumbnail strip and a close button. Also requests true OS
   fullscreen where supported.
   ============================================================ */
.hhr-lightbox {
  position: fixed;
  inset: 0;
  /* Top layer: must sit ABOVE the listing-card modal overlay (z-index 999999 in
     idx-card-markup.php) when the gallery is opened from inside that modal.
     Harmless on the standalone detail page (nothing else reaches this high). */
  z-index: 1000001;
  display: none;
  grid-template-columns: 64px minmax(0, 1fr) 64px;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: center;
  /* Semi-transparent WHITE backdrop: the property page stays faintly visible
     behind the modal. Deliberately not a dark overlay. */
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(2px);
}
.hhr-lightbox.is-open { display: grid; }
body.hhr-lightbox-open { overflow: hidden; }

.hhr-lightbox__stage {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  height: 100%;
  position: relative;
}
.hhr-lightbox__img {
  /* Large centered viewer — fills most of the viewport, never crops. */
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
}
.hhr-lightbox__counter {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}
.hhr-lightbox__nav {
  grid-row: 1;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 0 6px;
  padding: 0 0 5px;
  border: none;
  border-radius: 999px;
  background: rgba(23,34,53, 0.55);
  color: #fff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease;
}
.hhr-lightbox__nav:hover { background: rgba(23,34,53, 0.78); }
.hhr-lightbox__nav--prev { grid-column: 1; justify-self: center; }
.hhr-lightbox__nav--next { grid-column: 3; justify-self: center; }
.hhr-lightbox__close {
  position: absolute;
  top: 16px;
  right: 18px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 999px;
  background: rgba(23,34,53, 0.55);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease;
}
.hhr-lightbox__close:hover { background: rgba(23,34,53, 0.82); }
.hhr-lightbox__nav:focus-visible,
.hhr-lightbox__close:focus-visible,
.hhr-lightbox__thumb:focus-visible {
  outline: 3px solid var(--hhr-property-detail-accent, #e89aa8);
  outline-offset: 2px;
}
.hhr-lightbox__strip {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overscroll-behavior: contain;
  padding: 12px 18px;
  scrollbar-width: thin;
}
.hhr-lightbox__thumb {
  flex: 0 0 auto;
  width: 96px;
  height: 64px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  background: #1f2937;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}
.hhr-lightbox__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hhr-lightbox__thumb:hover { opacity: 0.85; }
.hhr-lightbox__thumb.is-active { opacity: 1; border-color: var(--hhr-property-detail-accent, #e89aa8); }

@media (max-width: 767px) {
  .hhr-lightbox { grid-template-columns: minmax(0, 1fr); padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); background: #172235; }
  .hhr-lightbox__stage { grid-column: 1; min-width: 0; touch-action: pan-y; }
  .hhr-lightbox__img { max-width: 100%; max-height: calc(100dvh - 160px); border-radius: 0; }
  .hhr-lightbox__nav { position: absolute; top: 45%; z-index: 1; width: 24px; height: 24px; margin: 0; padding: 0; font-size: 13px; background: rgba(23,34,53, 0.7); }
  .hhr-lightbox__nav::after { content: ''; position: absolute; inset: -10px; border-radius: 999px; }
  .hhr-lightbox__nav--prev { left: 12px; }
  .hhr-lightbox__nav--next { right: 12px; }
  .hhr-lightbox__close { width: 48px; height: 48px; top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; }
  .hhr-lightbox__strip { min-width: 0; padding: 12px; }
  .hhr-lightbox__counter { font-size: 1rem; }
}

/* Page gallery on small screens: stack hero + map, thumbnails become a
   horizontal scroll strip underneath (the absolute side-rail trick only
   makes sense in the two-column desktop layout). */
@media (max-width: 767px) {
  .prop-gallery--page { grid-template-columns: minmax(0, 1fr); width: calc(100% + 24px); max-width: calc(100% + 24px); margin-inline: -12px; }
  .prop-gallery--page .prop-gallery__hero { aspect-ratio: 4 / 3; touch-action: pan-y; }
  .prop-gallery--page .prop-gallery__nav { width: 24px; height: 24px; padding: 0; font-size: 13px; box-shadow: 0 2px 7px rgba(23,34,53, 0.22); }
  .prop-gallery--page .prop-gallery__nav::after { content: ''; position: absolute; inset: -10px; border-radius: 999px; }
  .prop-gallery--page .prop-gallery__fs { min-height: 48px; font-size: 1rem; padding: 8px 12px; }
  .prop-gallery--page .prop-gallery__railwrap { position: static; }
  .prop-gallery--page .prop-gallery__rail {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 0 4px;
  }
  .prop-gallery--page .prop-gallery__thumb { width: 110px; }
}

/* ============================================================
   TITLE / PRICE / FACT STRIP
   ============================================================ */
.prop-title {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.prop-title__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}
.prop-title__reduced {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px 10px;
  margin: 0;
  background: #fff7ed;
  color: #9a3412;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
}
.prop-title__h1 {
  margin: 0;
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.prop-title__loc {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 14px;
}
.prop-title__price {
  text-align: right;
}
.prop-title__price-val {
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.prop-title__price-mo {
  margin-top: 2px;
  color: #64748b;
  font-size: 13px;
}

.prop-title__facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  padding: 14px;
  background: #f1f3f5;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
}
.prop-fact {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.prop-fact__icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--hhr-property-detail-accent, #c8102e);
  flex: 0 0 auto;
}
.prop-fact__icon svg { width: 22px; height: 22px; }
.prop-fact > div { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.prop-fact strong { font-weight: 800; font-size: 15px; }
.prop-fact span  { color: #64748b; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 1px; }

.prop-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.prop-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px 6px 8px;
  border-radius: 999px;
  background: #f1f3f5;
  color: #172235;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #e2e8f0;
}
.prop-chip__icon { width: 14px; height: 14px; color: #64748b; display: grid; place-items: center; }
.prop-chip__icon svg { width: 14px; height: 14px; }

/* ============================================================
   DESCRIPTION
   ============================================================ */
.prop-desc {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
}
.prop-desc__summary {
  list-style: none;
  cursor: pointer;
  display: block;
  position: relative;
}
.prop-desc__summary::-webkit-details-marker { display: none; }
.prop-desc__text { margin: 0 0 4px; color: #334155; }
.prop-desc__more {
  display: inline-block;
  color: var(--hhr-property-detail-accent, #c8102e);
  font-weight: 700;
  font-size: 13px;
}
.prop-desc__more::before { content: '\25BC  '; font-size: 9px; }
.prop-desc[open] .prop-desc__more,
.prop-desc[open] .prop-desc__summary .prop-desc__text { display: none; }
.prop-desc__full { margin: 0; color: #334155; line-height: 1.6; }

/* ============================================================
   CARD PRIMITIVE
   ============================================================ */
.prop-card {
  padding: 16px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  min-width: 0;
}
.prop-card__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 800;
  color: #172235;
}
.prop-card__title--center { justify-content: center; }
.prop-card__icon {
  width: 18px;
  height: 18px;
  color: var(--hhr-property-detail-accent, #c8102e);
  display: grid;
  place-items: center;
  flex: 0 0 18px;
}
.prop-card__icon svg { width: 18px; height: 18px; }
.prop-card__sub {
  margin: 0 0 12px;
  color: #64748b;
  font-size: 12.5px;
}
.prop-card__sub--center { text-align: center; }
.prop-card__powered {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  color: var(--hhr-property-detail-accent, #c8102e);
}

/* ============================================================
   TRIO ROW — Offer Insights / Highlights / Schools
   ============================================================ */
.prop-trio {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

/* Offer Insights */
.prop-insights__value {
  font-size: 12.5px;
  color: #64748b;
  margin-top: 4px;
}
.prop-insights__range {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 2px 0 12px;
}
.prop-insights__meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
}
.prop-insights__meta > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}
.prop-insights__meta dt { margin: 0; color: #64748b; }
.prop-insights__meta dd { margin: 0; font-weight: 700; }
.prop-insights__confidence--high   { color: #047857; }
.prop-insights__confidence--medium { color: #b45309; }
.prop-insights__confidence--low    { color: #b91c1c; }

/* Property Highlights */
.prop-highlights__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.prop-highlights__list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: #172235;
}
.prop-highlights__bullet {
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  color: #16a34a;
  flex: 0 0 16px;
  margin-top: 1px;
}
.prop-highlights__bullet svg { width: 16px; height: 16px; }

/* Schools */
.prop-schools__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.prop-schools__list li {
  display: flex;
  flex-direction: column;
  font-size: 13px;
}
.prop-schools__list strong { color: #172235; }
.prop-schools__list span   { color: #64748b; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 1px; }

/* ============================================================
   DUO ROW — Sales History / BuyAbility
   ============================================================ */
.prop-duo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

/* Sales History */
.prop-history__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.prop-history__table td {
  padding: 8px 0;
  vertical-align: top;
  border-bottom: 1px solid #f1f3f5;
}
.prop-history__table tr:last-child td { border-bottom: 0; }
.prop-history__date  { color: #64748b; white-space: nowrap; padding-right: 10px; }
.prop-history__event { color: #172235; }
.prop-history__price { text-align: right; font-weight: 700; }
.prop-history__delta { display: inline-block; margin-left: 6px; font-size: 11.5px; font-weight: 700; }
.prop-history__delta--down { color: #b91c1c; }
.prop-history__delta--up   { color: #047857; }
.prop-history__ppsqft { font-size: 11px; color: #94a3b8; font-weight: 500; margin-top: 1px; }

/* ============================================================
   BUYER STRATEGY CARD (replaces third-party BuyAbility branding)
   ============================================================ */
.prop-card--strategy {
  background: linear-gradient(180deg, #ffffff 0%, #f1f3f5 100%);
}
.prop-strategy__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.prop-strategy__item {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
  overflow: hidden;
}
.prop-strategy__item[open] {
  border-color: #cbd5e1;
  box-shadow: 0 4px 16px rgba(23,34,53, 0.06);
}
.prop-strategy__head {
  list-style: none;
  cursor: pointer;
  padding: 10px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  justify-content: space-between;
}
.prop-strategy__head::-webkit-details-marker { display: none; }
.prop-strategy__head::after {
  content: '+';
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 700;
  color: #64748b;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  flex: 0 0 22px;
}
.prop-strategy__item[open] .prop-strategy__head::after {
  content: '\2013'; /* en-dash for "expanded" */
  color: #172235;
}
.prop-strategy__name {
  font-size: 13.5px;
  font-weight: 800;
  color: #172235;
  letter-spacing: -0.01em;
}
.prop-strategy__meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #64748b;
}
.prop-strategy__meta strong {
  color: #475569;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 10.5px;
  letter-spacing: 0.05em;
  margin-right: 4px;
}
.prop-strategy__body {
  padding: 0 14px 12px;
  margin: 0;
  font-size: 13px;
  color: #334155;
  line-height: 1.55;
}
.prop-strategy__cta {
  display: inline-flex;
  margin-top: 12px;
  font-weight: 700;
  color: var(--hhr-property-detail-accent, #c8102e);
  text-decoration: none;
  font-size: 13px;
}
.prop-strategy__cta:hover { text-decoration: underline; }

/* ============================================================
   SIMILAR HOMES
   ============================================================ */
.prop-similar {
  padding: 16px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
}
.prop-similar__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 8px;
}
.prop-similar__card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: #172235;
  border-radius: 12px;
  overflow: hidden;
  background: #f1f3f5;
  border: 1px solid #e2e8f0;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.prop-similar__card:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(23,34,53, 0.10);
}
.prop-similar__photo {
  aspect-ratio: 4 / 3;
  background: #e2e8f0;
  overflow: hidden;
}
.prop-similar__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prop-similar__price {
  padding: 8px 10px 0;
  font-weight: 800;
  font-size: 15px;
}
.prop-similar__facts {
  padding: 0 10px;
  color: #475569;
  font-size: 12px;
}
.prop-similar__addr {
  padding: 0 10px;
  color: #475569;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.prop-similar__status {
  padding: 6px 10px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #047857;
  font-size: 11.5px;
  font-weight: 700;
}
.prop-similar__dot {
  width: 8px; height: 8px; border-radius: 999px; background: #10b981;
}

/* ============================================================
   ATTRIBUTION
   ============================================================ */
.prop-attribution {
  color: #64748b;
  font-size: 11.5px;
  line-height: 1.5;
  padding-top: 8px;
  border-top: 1px solid #e5e7eb;
}
.prop-attribution p { margin: 0 0 4px; }
.prop-attribution__disclaim { font-style: italic; margin-top: 6px; }

/* ============================================================
   SIDEBAR — Helen's single showing-request card
   ============================================================ */
.prop-card--walkthrough {
  --hhr-property-detail-accent: #172235;
  --hhr-property-detail-accent-hover: #172235;
  --hhr-property-detail-soft: #f1f3f5;
  --hhr-property-shadow-rgb: 8,101,245;
  padding: 0;
  overflow: hidden;
  border: 1px solid #dbe0e7;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(23,34,53,.08);
}
.prop-walk__head { padding: 22px 22px 20px; background: #fff; }
.prop-walk__identity { display: grid; grid-template-columns: 104px minmax(0,1fr); gap: 20px; align-items: center; }
.prop-walk__portrait { display: block; width: 104px; height: 128px; object-fit: cover; object-position: center top; border-radius: 10px; background: #f1f3f6; }
.prop-walk__brand { min-width: 0; }
.prop-walk__brokerage {
  display: block;
  box-sizing: border-box;
  max-width: 210px;
  padding: 5px 9px;
  border-radius: 7px;
  background: #172235;
}
.prop-walk__brokerage img { display: block; width: 100%; height: auto; }
.prop-walk__record { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid #e3e7ed; color: #172235; line-height: 1.35; }
.prop-walk__record strong { display: block; font-size: 12px; font-weight: 800; }
.prop-walk__record span { display: block; font-size: 10px; margin-top: 3px; }
.prop-walk__record small { display: block; color: #607087; font-size: 10px; margin-top: 2px; }
.prop-walk__pitch { margin: 20px 0 0; padding: 0; border: 0; color: #172235; }
.prop-walk__pitch p { margin: 0; font-size: 15px; font-weight: 500; line-height: 1.6; letter-spacing: -.015em; }
.prop-walk__pitch strong { font-weight: 800; }
.prop-walk__pitch footer { display: flex; align-items: baseline; gap: 9px; margin-top: 12px; color: #172235; font-size: 13px; font-weight: 800; }
.prop-walk__pitch footer span { color: #6a7687; font-size: 10px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; }
.prop-walk__form { display: flex; flex-direction: column; gap: 18px; padding: 20px 22px 18px; border-top: 1px solid #e3e7ed; background: #f7f8fa; }
.prop-walk__group { border: 0; padding: 0; margin: 0; min-width: 0; }
.prop-walk__group legend { padding: 0 0 9px; font-size: 10px; font-weight: 800; color: #526078; text-transform: uppercase; letter-spacing: .11em; }
.prop-walk__days { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.prop-walk__day { position: relative; display: flex; flex-direction: column; gap: 4px; cursor: pointer; padding: 12px 14px; min-height: 66px; box-sizing: border-box; border-radius: 9px; color: #172235; background: #fff; border: 1px solid #d9dfe8; transition: background .15s ease,border-color .15s ease; }
.prop-walk__day input, .prop-walk__time input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.prop-walk__day-name { font-size: 11px; font-weight: 600; }
.prop-walk__day-date { font-size: 19px; font-weight: 800; line-height: 1.2; }
.prop-walk__day:has(input:checked) { border-color: #172235; background: #f1f3f5; box-shadow: inset 0 0 0 1px #172235; }
.prop-walk__day:has(input:checked)::after { content: '\2713'; position: absolute; right: 12px; top: 11px; font-size: 13px; font-weight: 800; }
.prop-walk__day:hover { border-color: #172235; }
.prop-walk__times { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); padding: 4px; gap: 4px; border: 1px solid #d9dfe8; border-radius: 10px; background: #eaeef3; }
.prop-walk__time { position: relative; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 54px; padding: 8px 3px; box-sizing: border-box; border-radius: 6px; border: 1px solid transparent; transition: background .15s ease; }
.prop-walk__time:has(input:checked) { background: #fff; border-color: #d5dce6; box-shadow: 0 2px 5px rgba(23,34,53,.07); }
.prop-walk__time:hover { background: #f1f3f5; }
.prop-walk__time-label { font-size: 11px; font-weight: 800; color: #172235; }
.prop-walk__time-sub { font-size: 10px; color: #627086; margin-top: 5px; white-space: nowrap; }
.prop-walk__day:has(input:focus-visible), .prop-walk__time:has(input:focus-visible) { outline: 3px solid #172235; outline-offset: 3px; }
.prop-walk__submit { width: 100%; min-height: 50px; padding: 12px 18px; border: 1px solid var(--hhr-property-detail-accent, #8c2032); border-radius: 9px; background: var(--hhr-property-detail-accent, #96283a); color: #fff; font-family: inherit; font-size: 15px; font-weight: 800; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 14px; box-shadow: 0 3px 7px rgba(var(--hhr-property-shadow-rgb, 110,26,43),.12); transition: background .15s ease; }
.prop-walk__submit span { font-size: 20px; line-height: 1; }
.prop-walk__submit:hover { background: var(--hhr-property-detail-accent-hover, #7e2030); }
.prop-walk__submit:focus-visible { outline: 3px solid #172235; outline-offset: 3px; }
.prop-walk__foot { margin: -7px 0 0; color: #66748a; font-size: 10.5px; line-height: 1.5; text-align: center; }
@media (max-width: 380px) {
  .prop-walk__head { padding: 18px; }
  .prop-walk__form { padding: 18px; }
  .prop-walk__identity { grid-template-columns: 88px minmax(0,1fr); gap: 14px; }
  .prop-walk__portrait { width: 88px; height: 116px; }
}
 
/* ============================================================
   SIDEBAR — Contact
   ============================================================ */
.prop-card--contact { text-align: center; }
.prop-contact__title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 800;
}
.prop-contact__row {
  display: flex;
  gap: 12px;
  align-items: center;
  text-align: left;
  margin-bottom: 12px;
}
.prop-contact__avatar {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: #f1f3f5;
  color: #172235;
  font-weight: 800;
  display: grid;
  place-items: center;
  font-size: 18px;
  flex: 0 0 56px;
}
.prop-contact__body { display: flex; flex-direction: column; min-width: 0; }
.prop-contact__body strong { font-size: 14px; }
.prop-contact__body span   { color: #64748b; font-size: 12px; }
.prop-contact__phone, .prop-contact__email {
  color: var(--hhr-property-detail-accent, #c8102e);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}
.prop-contact__btn {
  display: inline-flex;
  width: 100%;
  justify-content: center;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  background: #ffffff;
  color: var(--hhr-property-detail-accent, #c8102e);
  border: 1px solid var(--hhr-property-detail-accent, #c8102e);
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
}
.prop-contact__btn:hover { background: var(--hhr-property-detail-soft, #fff3f5); }

/* ============================================================
   SIDEBAR — Comparison table
   ============================================================ */
.prop-card--comparison .prop-card__title { color: #172235; }
.prop-compare__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.prop-compare__table th {
  text-align: left;
  font-weight: 700;
  color: var(--hhr-property-detail-accent, #c8102e);
  padding: 6px 8px 6px 0;
  border-bottom: 1px solid #e5e7eb;
}
.prop-compare__table td {
  padding: 7px 6px 7px 0;
  border-bottom: 1px solid #f1f3f5;
  color: #172235;
}
.prop-compare__home { color: var(--hhr-property-detail-accent, #c8102e); font-weight: 700; }
.prop-compare__table tr:last-child td { border-bottom: 0; }

/* ============================================================
   SIDEBAR — Market snapshot
   ============================================================ */
.prop-snapshot__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
}
.prop-snapshot__list > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid #f1f3f5;
  font-size: 13px;
}
.prop-snapshot__list > div:last-child { border-bottom: 0; }
.prop-snapshot__list dt { margin: 0; color: #64748b; }
.prop-snapshot__list dd { margin: 0; font-weight: 700; }

/* ============================================================
   SIDEBAR — Property Details
   ============================================================ */
.prop-details__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
}
.prop-details__list > div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #f1f3f5;
  font-size: 13px;
}
.prop-details__list > div:last-child { border-bottom: 0; }
.prop-details__list dt { color: #64748b; margin: 0; }
.prop-details__list dd { margin: 0; font-weight: 600; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .prop-detail { grid-template-columns: 1fr; }
  .prop-trio { grid-template-columns: 1fr 1fr; }
  .prop-duo  { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .hhr-listing-modal:target .hhr-listing-modal__shell {
    margin: 0;
    width: 100vw;
    max-height: 100vh;
    border-radius: 0;
  }
  .prop-detail { padding: 16px; gap: 24px; font-size: 1rem; line-height: 1.6; overflow-wrap: anywhere; }
  .prop-detail--page { margin: 0 auto; }
  .prop-title__h1 { font-size: 1.5rem; line-height: 1.3; }
  .prop-title__price-val { font-size: 1.75rem; }
  .prop-title__loc, .prop-title__price-mo, .prop-chip, .prop-desc__more,
  .prop-strategy__body, .prop-strategy__cta, .prop-contact__phone,
  .prop-contact__email, .prop-details__list > div, .prop-snapshot__list > div { font-size: 1rem; }
  .prop-title__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px; }
  .prop-fact { align-items: flex-start; gap: 6px; }
  .prop-fact strong { font-size: 1rem; line-height: 1.4; }
  .prop-fact span { font-size: .8125rem; line-height: 1.5; letter-spacing: 0; }
  .prop-attribution { font-size: .875rem; }
  .prop-snapshot__list > div { flex-wrap: wrap; gap: 4px 12px; }
  .prop-card--comparison { overflow-x: auto; }
  .prop-compare__table { font-size: .9375rem; }
  .prop-contact__btn { min-height: 48px; box-sizing: border-box; font-size: 1rem; }
  .prop-walk__head, .prop-walk__form { padding: 16px; }
  .prop-walk__identity { grid-template-columns: 80px minmax(0, 1fr); gap: 12px; }
  .prop-walk__portrait { width: 80px; height: 104px; }
  .prop-walk__pitch p, .prop-walk__submit { font-size: 1rem; }
  .prop-walk__record strong, .prop-walk__day-name, .prop-walk__time-label { font-size: .9375rem; }
  .prop-walk__record span, .prop-walk__record small, .prop-walk__pitch footer span,
  .prop-walk__group legend, .prop-walk__time-sub, .prop-walk__foot { font-size: .8125rem; }
  .prop-walk__times { grid-template-columns: 1fr; gap: 8px; }
  .prop-walk__time { flex-direction: row; flex-wrap: wrap; gap: 8px; min-height: 48px; padding: 10px; }
  .prop-walk__time-sub { white-space: normal; margin-top: 0; }
  .prop-walk__day { padding: 12px; }
  .prop-walk__day-date { font-size: 1.125rem; }
  .prop-detail input:not([type=radio]):not([type=checkbox]), .prop-detail select, .prop-detail textarea { font-size: 1rem; min-height: 48px; max-width: 100%; box-sizing: border-box; }
  .prop-gallery { grid-template-columns: minmax(0, 1fr); }
  .prop-gallery__rail {
    grid-template-rows: none;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .prop-trio { grid-template-columns: 1fr; }
  .prop-title__row { grid-template-columns: 1fr; }
  .prop-title__price { text-align: left; }
  .prop-details__list > div { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
}

/* ============================================================
   LEGACY MODAL STYLES (kept for transition compatibility)
   ------------------------------------------------------------
   Older pages still emit the .property-modal markup. Until they're
   all repointed at the new renderer, fall through to a basic style
   so the legacy .property-modal still renders sanely. New code
   should use .prop-detail / .hhr-listing-modal exclusively.
   ============================================================ */
.property-dialog { display: none; }
.property-modal { padding: 20px; }
