/* PlexSmart listing page polish (2026-11-24). Loaded last on single properties. */

/* ----- 1. Title: descriptor headline + address subline ----- */
.single-property .ps-listing-h1 {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 0 2px;
  font-size: clamp(1.65rem, 2.6vw, 2.25rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.single-property .ps-listing-headline {
  display: block;
  font-family: var(--os-font-display, Inter, sans-serif);
  font-weight: 650;
  color: var(--os-ink, #0f1b29);
}
.single-property .ps-listing-subline {
  display: block;
  font-family: var(--os-font-body, Inter, sans-serif);
  font-size: 1.02rem;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0;
  color: var(--os-muted, #526173);
}
.single-property .ps-listing-subline a {
  color: inherit;
  text-decoration: none;
}
.single-property .ps-listing-subline a:hover,
.single-property .ps-listing-subline a:focus {
  color: var(--ps-navy, #0e2438);
  text-decoration: underline;
}

/* Hide the duplicate address next to the price (address is now the title subline). */
.single-property .ere__single-property-header-price-location .ere__single-property-location {
  display: none !important;
}

/* ----- 7. Tighten header spacing; 4. Save/Share on the price row ----- */
.single-property .ere__single-property-header-info,
.single-property .ere__single-property-element.property-info-header {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  margin: 0 0 10px !important;
  padding: 4px 0 8px !important;
  position: relative !important;
}
.single-property .ere__single-property-header-info-inner {
  display: contents;
  padding: 0 !important;
  margin: 0 !important;
}
.single-property .ere__single-property-header-info {
  display: grid !important;
  grid-template-columns: auto auto 1fr auto;
  grid-template-areas:
    "title title title title"
    "price badge stats actions"
    "pills pills pills pills";
  column-gap: 16px;
  row-gap: 8px;
  align-items: end;
}
.single-property .ps-listing-h1 { grid-area: title; }
.single-property .ere__single-property-header-price-location { display: contents; }
.single-property .ere__single-property-price { grid-area: price; }
.single-property .ere__single-property-status { grid-area: badge; align-self: center; margin: 0 !important; }
.single-property .ps-stats-bar { grid-area: stats; min-width: 0; }
.single-property .ere__single-property-header-meta-action {
  grid-area: actions;
  position: static !important;
  top: auto !important;
  right: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  width: auto !important;
  align-self: center;
  justify-self: end;
}
.single-property .ere__single-property-header-meta-action .ere__single-property-info { display: none !important; }
.single-property .ps-qual-pills { grid-area: pills; }

/* Large price */
.single-property .ere__single-property-header-info .ere__single-property-price,
.single-property .ere__single-property-header-info .ere__single-property-price span {
  font-family: var(--os-font-heading, Inter, sans-serif) !important;
  font-size: clamp(1.85rem, 2.5vw, 2.4rem) !important;
  font-weight: 700 !important;
  color: var(--os-ink, #0f1b29) !important;
  line-height: 1 !important;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

/* 6. For Sale: small subtle green pill beside the price */
.single-property .ere__single-property-header-info .ere__loop-property-status-item.for-sale,
.single-property .ere__single-property-header-info .ere__loop-property-status-item.for-rent {
  display: inline-block !important;
  background: #e8f4ec !important;
  color: #1d6b3c !important;
  border: 1px solid #c9e5d2 !important;
  border-radius: 999px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: .04em !important;
  text-transform: uppercase !important;
  padding: 4px 9px !important;
  box-shadow: none !important;
  opacity: 1 !important;
  line-height: 1.2 !important;
}
.single-property .ere__single-property-header-info .ere__loop-property-status-item.under-contract,
.single-property .ere__single-property-header-info .ere__loop-property-status-item.pending {
  display: inline-block !important;
  background: #f4efe4 !important;
  color: #8a5a12 !important;
  border: 1px solid #e4d3ae !important;
  border-radius: 999px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: .04em !important;
  text-transform: uppercase !important;
  padding: 4px 9px !important;
  box-shadow: none !important;
}

/* 2. Price/stats bar: labeled figures, no mixed chips, no cell cage */
.ps-stats-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0;
  margin: 0;
}
.ps-stats-bar .ps-stat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 18px;
  border-left: 1px solid var(--os-line, #e3e8ee);
  min-width: 5.2rem;
}
.ps-stats-bar .ps-stat:first-child { border-left: 0; padding-left: 4px; }
.ps-stats-bar .ps-stat__label,
.ps-invest-fact__label,
.ps-unitmix th {
  font-family: var(--os-font-heading, Inter, sans-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--os-gold-dark, #9a7232);
  line-height: 1.2;
}
.ps-stats-bar .ps-stat__value,
.ps-invest-fact__value {
  font-family: var(--os-font-heading, Inter, sans-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--os-ink, #0f1b29);
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}

/* Qualitative pills under the price bar */
.ps-qual-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 0;
}
.ps-qual-pills .ps-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid #e0d0b0;
  background: #faf6ef;
  color: var(--ps-navy, #0e2438);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

/* 4. Save / Share: normal-size, aligned with the price row. Keep red hover on Save. */
.single-property .ere__single-property-action {
  display: flex !important;
  align-items: center;
  gap: 8px;
}
.single-property .ere__single-property-action .property-favorite { display: none !important; }
.single-property .psx-save-btn,
.single-property .ere__single-property-action .ps-share-btn {
  padding: 9px 16px;
  font-size: 14.5px;
}

/* Hide the under-gallery key-facts row if any leftover markup is cached. */
.single-property .os-keyfacts { display: none !important; }
.single-property .os-header-facts { display: none !important; }

/* ----- Heading decoration: drop the short brass dash beside section titles ----- */
.single-property .ere-heading-style2 h2::after,
.single-property .ere-heading-style2 h4::after,
.single-property .ere-heading-style2::after,
.single-property .ere-heading h2::after,
.single-property .ere-heading::after {
  display: none !important;
  content: none !important;
  width: 0 !important;
  height: 0 !important;
  background: none !important;
}
.single-property .ere-heading-style2 h2,
.single-property .ere-heading-style2 h4 {
  padding-right: 0 !important;
  margin-bottom: 14px;
}

/* ----- Investment summary: borderless grouped key-value layout ----- */
.single-property .ps-invest {
  margin: 0 0 20px !important;
  padding: 22px 24px 18px !important;
}
.ps-invest-group + .ps-invest-group {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--os-line, #e3e8ee);
}
.ps-invest-group__title {
  font-family: var(--os-font-heading, Inter, sans-serif);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--os-gold-dark, #9a7232);
  margin: 0 0 14px;
  line-height: 1.25;
}
@media (max-width: 767px) {
  .ps-invest-group__title { font-size: 15px; letter-spacing: .12em; margin: 0 0 12px; }
}
.ps-invest-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px 24px;
}
.ps-invest-fact { min-width: 0; }
.ps-invest-fact__label { display: block; margin: 0 0 3px; }
.ps-invest-fact__value { display: block; font-size: 1.2rem; }
.ps-invest-note { font-size: 12.5px; color: var(--os-muted, #526173); margin: 16px 0 0; }
/* Kill the old boxed cell grid if leftover classes remain. */
.ps-invest-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px 24px;
  border: 0 !important;
  background: transparent !important;
  overflow: visible !important;
}
.ps-invest-row {
  padding: 0 !important;
  border: 0 !important;
}

/* ----- Unit mix table: light row separators, no cage borders ----- */
.single-property .ps-unitmix {
  margin: 0 0 20px !important;
  padding: 22px 24px 16px !important;
}
.ps-unitmix-table-wrap { overflow-x: auto; }
.ps-unitmix table {
  width: 100%;
  border-collapse: collapse;
  border: 0;
}
.ps-unitmix th,
.ps-unitmix td {
  text-align: left;
  padding: 10px 14px 10px 0;
  border: 0;
  border-bottom: 1px solid var(--os-line, #e3e8ee);
  vertical-align: baseline;
}
.ps-unitmix th { padding-top: 0; font-size: 11px; }
.ps-unitmix td {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--os-ink, #0f1b29);
  font-variant-numeric: tabular-nums;
}
.ps-unitmix tbody tr:last-child td { border-bottom: 0; }
.ps-unitmix tfoot td {
  border-bottom: 0;
  border-top: 1px solid var(--os-line, #e3e8ee);
  font-weight: 700;
  padding-top: 12px;
}
.ps-unitmix-note { font-size: 13px; color: var(--os-muted, #526173); margin: 10px 0 0; }
.ps-unitmix-fallback { font-size: 16px; line-height: 1.45; margin: 0; color: var(--os-ink, #0f1b29); }

@media (max-width: 1099px) {
  .ps-invest-facts, .ps-invest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .single-property .ere__single-property-header-info {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "title title"
      "price badge"
      "stats stats"
      "actions actions"
      "pills pills";
    row-gap: 10px;
  }
  .ps-stats-bar .ps-stat { padding: 0 16px 0 0; border-left: 0; }
  .ps-stats-bar .ps-stat:first-child { padding-left: 0; }
  .single-property .ere__single-property-header-meta-action { justify-self: stretch; }
  .single-property .ere__single-property-action { width: 100%; }
  .single-property .psx-save-btn,
  .single-property .ere__single-property-action .ps-share { flex: 1 1 0; }
  .single-property .ere__single-property-action .ps-share-btn { width: 100%; justify-content: center; }
  .single-property .psx-save-btn { justify-content: center; }
  .ps-invest-facts, .ps-invest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
  .single-property .ps-invest,
  .single-property .ps-unitmix { padding: 18px 16px 14px !important; }
}

/* ----- 5. Sticky agent card (desktop) + mobile bottom bar ----- */
.os-sticky-contact { display: none !important; }

@media (min-width: 1100px) {
  .single-property-area.ere__single-property {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 332px;
    column-gap: 28px;
    align-items: start;
  }
  .single-property-area > .property-info-header { grid-column: 1 / -1; }

  /* Tall right column only. Not sticky, so children cannot become their own sticky layers. */
  .single-property-area > .ps-listing-sidebar {
    grid-column: 2;
    /* span 80, not -1: -1 only covers explicit rows, and this grid has none. */
    grid-row: 2 / span 80;
    align-self: stretch;
    position: relative;
    min-width: 0;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  /* The whole card (photo, name, office, Call|Text, links, form, Inquire) is the only sticky unit. */
  .ps-listing-sidebar > .os-listing-contact,
  .single-property-area > .os-listing-contact {
    grid-column: 2;
    position: sticky;
    top: 84px;
    align-self: start;
    width: 100%;
    height: auto;
    max-height: calc(100vh - 100px);
    overflow-x: hidden;
    overflow-y: auto;
    margin-bottom: 0 !important;
    padding: 18px 18px 16px !important;
    box-sizing: border-box;
    z-index: 5;
  }
  .admin-bar .ps-listing-sidebar > .os-listing-contact,
  .admin-bar .single-property-area > .os-listing-contact {
    top: 116px;
    max-height: calc(100vh - 132px);
  }

  /* Prevent any inner piece (especially the photo) from sticking separately. */
  .os-listing-contact .ere-property-element,
  .os-listing-contact .ere__contact-agent-info,
  .os-listing-contact .ps-agent-card,
  .os-listing-contact .ps-agent-card__photo-col,
  .os-listing-contact .ps-agent-card__photo,
  .os-listing-contact .ps-agent-card__body,
  .os-listing-contact .os-lc-info,
  .os-listing-contact .os-lc-photo-col,
  .os-listing-contact .os-lc-photo,
  .os-listing-contact .ere__agent-image,
  .os-listing-contact .ere__agent-content,
  .os-listing-contact #ps-inquiry-form {
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
    inset: auto !important;
  }

  .single-property-area > *:not(.property-info-header):not(.os-listing-contact):not(.ps-listing-sidebar) { grid-column: 1; }

  /* Compact the sticky card: photo + name side by side, Call | Text, short form. */
  .os-listing-contact .ere-heading-style2 { display: none; }
  .os-listing-contact .ere__contact-agent-info,
  .os-listing-contact .ps-agent-card {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap;
    align-items: flex-start !important;
    align-content: flex-start !important;
    gap: 12px 14px;
    margin-bottom: 12px;
    height: auto !important;
    max-height: none;
  }
  .os-listing-contact .ps-agent-card__photo-col,
  .os-listing-contact .os-lc-photo-col {
    flex: 0 0 auto !important;
    max-width: 88px !important;
    width: 88px !important;
  }
  .os-listing-contact .ps-agent-card__photo,
  .os-listing-contact .os-lc-photo {
    width: 88px;
    height: 88px;
    border-radius: 10px;
    overflow: hidden;
    display: block;
  }
  .os-listing-contact .ps-agent-card__img,
  .os-listing-contact .os-lc-photo-img {
    width: 88px;
    height: 88px;
    object-fit: cover;
  }
  .os-listing-contact .ps-agent-card__body,
  .os-listing-contact .os-lc-content,
  .os-listing-contact .ere__agent-content {
    flex: 1 1 160px !important;
    min-width: 0 !important;
    padding: 0 !important;
  }
  .os-listing-contact .ps-agent-card__actions {
    display: flex;
    gap: 0;
    margin: 10px 0 6px;
  }
  .os-listing-contact .ps-ac-btn--call,
  .os-listing-contact .ps-ac-btn--text {
    flex: 1 1 50%;
    border-radius: 0;
  }
  .os-listing-contact .ps-ac-btn--call {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
  }
  .os-listing-contact .ps-ac-btn--text {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    border-left-width: 0;
  }
  .os-listing-contact .ps-ac-btn--message { display: none; }
  .os-listing-contact .ere__single-agent-social,
  .os-listing-contact .ere_desc,
  .os-listing-contact .os-lc-more { display: none; }
  .os-listing-contact .os-lc-row,
  .os-listing-contact .ps-seed-lower,
  .os-listing-contact .ps-property-link { font-size: 13px; margin-top: 6px; }
  .os-listing-contact #ps-inquiry-form { margin-top: 8px; }
  .os-listing-contact #ps-inquiry-form .row { display: flex; flex-direction: column; margin: 0; }
  .os-listing-contact #ps-inquiry-form .col-md-4,
  .os-listing-contact #ps-inquiry-form .col-sm-6,
  .os-listing-contact #ps-inquiry-form .col-12 {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0;
    margin: 0 0 8px;
  }
  .os-listing-contact #ps-inquiry-form label { font-size: 12px; }
  .os-listing-contact #ps-inquiry-form textarea { min-height: 72px; }
  .ps-mobile-contact-bar { display: none !important; }
}

@media (max-width: 1099px) {
  .ps-mobile-contact-bar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 120;
    gap: 8px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    background: #fff;
    border-top: 1px solid var(--os-line, #e3e8ee);
    box-shadow: 0 -8px 24px rgba(14, 36, 56, .10);
  }
  .ps-mobile-contact-bar .ps-ac-btn,
  .ps-mobile-contact-bar .ps-mcb__inquire {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 10px;
    border-radius: 8px;
    font-size: 14.5px;
    font-weight: 700;
    text-decoration: none !important;
    line-height: 1.2;
  }
  .ps-mobile-contact-bar .ps-mcb__inquire {
    background: var(--ps-navy, #0e2438);
    color: #fff !important;
    border: 1px solid var(--ps-navy, #0e2438);
  }
  .ps-mobile-contact-bar .ps-mcb__inquire:hover,
  .ps-mobile-contact-bar .ps-mcb__inquire:focus {
    background: var(--ps-navy-2, #16324d);
  }
  .single-property .site-main { padding-bottom: 84px !important; }
}

@media (min-width: 1100px) {
  .ps-mobile-contact-bar { display: none !important; }
}
