/* 9.6.25.16: scoped editorial and listing presentation; no search UI rules. */

html body #elika-leroy-feature .elika-leroy__copy > .elika-leroy__directory {
  display: flex !important;
  width: fit-content !important;
  max-width: 100% !important;
  margin-top: 20px !important;
  white-space: normal !important;
}

/* Listing-only presentation; native values, options and handlers stay intact. */
html body.single-vc_listing .property-info .calc-wrap.vcrp-buyer-calculator {
  padding-top: 24px !important;
  display: block !important;
  height: auto !important;
  min-height: 0 !important;
  row-gap: 0 !important;
}
html body.single-vc_listing .property-info .calc-wrap.vcrp-buyer-calculator > label[for="amount_financed"] {
  font: 700 16px/1.5 Arial, Helvetica, sans-serif !important;
  margin: 0 0 12px !important;
}
html body.single-vc_listing .property-info .calc-wrap.vcrp-buyer-calculator > select#amount_financed,
html body.single-vc_listing .property-info .calc-wrap.vcrp-buyer-calculator > .nice-select {
  margin-top: 0 !important;
  margin-bottom: 16px !important;
  float: none !important;
}
html body.single-vc_listing .property-info .calc-wrap.vcrp-buyer-calculator > .calc-column {
  margin-top: 0 !important;
  padding-top: 0 !important;
  clear: both !important;
}
html body.single-vc_listing .property-info .calc-wrap.vcrp-buyer-calculator > .column.hide {
  display: none !important;
}
html body.single-vc_listing .property-info .calc-wrap.vcrp-buyer-calculator > .calc-column > .calc-row:first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
}
/* The theme's list indentation must not offset the dropdown panel. Its
   open/closed state, keyboard handling and selected value remain native. */
html body.single-vc_listing .property-info .calc-wrap.vcrp-buyer-calculator > .nice-select > .list {
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  right: auto !important;
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin: 2px 0 0 !important;
  padding: 0 !important;
  text-indent: 0 !important;
}
html body.single-vc_listing .property-info .calc-wrap.vcrp-buyer-calculator > .nice-select.open > .list {
  transform: none !important;
}
/* Only the visible name/email controls, not the anti-spam or hidden fields.
   Equal vertical padding keeps entered text and placeholders centered. */
html body.single-vc_listing .property-info #wpforms-form-54005 input:is(#wpforms-54005-field_0, #wpforms-54005-field_1) {
  box-sizing: border-box !important;
  height: 52px !important;
  min-height: 52px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  line-height: normal !important;
}
/* Give availability the cell's entire inline space. Do not force nowrap:
   a long count should wrap rather than spill outside a narrow phone cell. */
html body #elika-building-single-modern .em-building-single-stats > .em-building-stat-availability > a {
  display: block !important;
  align-self: stretch !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  white-space: normal !important;
}
html body #elika-building-single-modern .em-building-single-stats > .em-building-stat-availability > a > strong {
  display: block !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  white-space: normal !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
  text-wrap: wrap !important;
}
html body #elika-building-single-modern .em-building-single-stats > .em-building-stat-availability {
  min-width: 0 !important;
}

/* Reserve the same title area in each official-resource card. A longer
   heading can wrap without raising its first line above its neighbors. */
html body #erg-page #erg-rights .erg-grid-3 > .erg-card {
  display: grid !important;
  grid-template-rows: auto auto 1fr auto !important;
  align-content: start !important;
  row-gap: 14px !important;
}
html body #erg-page #erg-rights .erg-grid-3 > .erg-card > span {
  min-height: 2.6em !important;
  margin: 0 0 24px !important;
}
html body #erg-page #erg-rights .erg-grid-3 > .erg-card > h3 {
  align-self: start !important;
  min-height: 2.2em !important;
  margin: 0 !important;
  line-height: 1.1 !important;
}
html body #erg-page #erg-rights .erg-grid-3 > .erg-card > p {
  margin: 0 !important;
}
@media (max-width: 900px) {
  html body #erg-page #erg-rights .erg-grid-3 > .erg-card > h3 {
    min-height: 0 !important;
  }
}
html body.single-vc_listing .property-info #vcrp_map_canvas {
  margin-bottom: 40px !important;
}
@media (max-width: 760px) {
  /* 9.6.25.18: keep only the two parent links on phones. The full current
     address remains in the listing heading and the original breadcrumb DOM.
     Scope the compact rhythm to this trail, not the account-action list. */
  html body.single-vc_listing .vcrp-bc-row:has(> #breadcrumbs.vcrp-breadcrumbs) {
    min-height: 0 !important;
    padding: 0 !important;
  }
  html body.single-vc_listing #breadcrumbs.vcrp-breadcrumbs {
    display: block !important;
    min-height: 0 !important;
    padding: 8px 0 !important;
    margin: 0 !important;
  }
  html body.single-vc_listing #breadcrumbs.vcrp-breadcrumbs > li {
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  html body.single-vc_listing #breadcrumbs.vcrp-breadcrumbs > li > span {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
  }
  html body.single-vc_listing #breadcrumbs.vcrp-breadcrumbs > li > span > :is(span:not(.cs-separator), a) {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  html body.single-vc_listing #breadcrumbs.vcrp-breadcrumbs > li > span > .cs-separator {
    display: inline-block !important;
    flex: 0 0 5px !important;
    width: 5px !important;
    height: 5px !important;
    min-width: 0 !important;
    margin: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 0 !important;
  }
  html body.single-vc_listing #breadcrumbs.vcrp-breadcrumbs > li > span > span:not(.breadcrumb_last),
  html body.single-vc_listing ul#breadcrumbs.vcrp-breadcrumbs a[href] {
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
  }
  html body.single-vc_listing ul#breadcrumbs.vcrp-breadcrumbs a[href] {
    display: inline-flex !important;
    align-items: center !important;
    min-height: 32px !important;
    margin: 0 !important;
    padding: 0 !important;
    font: 700 11px/1.4 Arial, Helvetica, sans-serif !important;
    font-size: 11px !important;
    line-height: 1.4 !important;
    letter-spacing: .08em !important;
  }
  html body.single-vc_listing #breadcrumbs.vcrp-breadcrumbs > li > span > span.breadcrumb_last,
  html body.single-vc_listing #breadcrumbs.vcrp-breadcrumbs > li > span > .cs-separator:has(+ .breadcrumb_last) {
    display: none !important;
  }
  html body.single-vc_listing .property-info #vcrp_map_canvas { margin-bottom: 28px !important; }
}

/* Pin each document cell: auto-placement must not move descriptions into
   the number track when theme pseudo-elements or extra wrappers are present. */
html body #erg-page #erg-documents article.erg-row {
  display: grid !important;
  grid-template-columns: 40px minmax(180px, .65fr) minmax(0, 1fr) !important;
  grid-auto-flow: row !important;
  gap: 24px !important;
  align-items: start !important;
}
html body #erg-page #erg-documents article.erg-row::before,
html body #erg-page #erg-documents article.erg-row::after {
  content: none !important;
  display: none !important;
}
html body #erg-page #erg-documents article.erg-row > :is(span, h3, p) {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  white-space: normal !important;
  overflow-wrap: break-word !important;
}
html body #erg-page #erg-documents article.erg-row > span { grid-column: 1 !important; grid-row: 1 !important; }
html body #erg-page #erg-documents article.erg-row > h3 { grid-column: 2 !important; grid-row: 1 !important; }
html body #erg-page #erg-documents article.erg-row > p { grid-column: 3 !important; grid-row: 1 !important; }

/* Zero-minimum tracks and positioned imagery keep the 1280px image's
   intrinsic width from squeezing the copy. Works before and after JS load. */
html body #enr-page-v1 #enr-requirements.enr-requirements {
  display: grid !important;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr) !important;
  align-items: stretch !important;
  gap: 0 !important;
  width: 100% !important;
  max-width: none !important;
}
html body #enr-page-v1 #enr-requirements > .enr-requirements__image {
  position: relative !important;
  min-width: 0 !important;
  width: 100% !important;
  max-width: none !important;
  min-height: 560px !important;
  overflow: hidden !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
}
html body #enr-page-v1 #enr-requirements > .enr-requirements__image:has(img) {
  background-image: none !important;
}
html body #enr-page-v1 #enr-requirements .enr-requirements__image > img {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center !important;
  margin: 0 !important;
}
html body #enr-page-v1 #enr-requirements > .enr-requirements__copy {
  box-sizing: border-box !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  padding: clamp(36px, 4vw, 72px) !important;
}
html body #enr-page-v1 #enr-requirements .enr-requirements__copy h2 {
  font-size: clamp(38px, 3.2vw, 60px) !important;
  overflow-wrap: break-word !important;
}
html body #enr-page-v1 #enr-requirements .enr-checklist {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
@media (max-width: 1000px) {
  html body #enr-page-v1 #enr-requirements.enr-requirements { grid-template-columns: minmax(0, 1fr) !important; }
  html body #enr-page-v1 #enr-requirements > .enr-requirements__image { min-height: 0 !important; height: clamp(260px, 55vw, 460px) !important; }
  html body #enr-page-v1 #enr-requirements > .enr-requirements__copy { padding: 40px 28px !important; }
}
@media (max-width: 900px) {
  html body #erg-page #erg-documents article.erg-row { grid-template-columns: 28px minmax(0, 1fr) !important; gap: 10px 16px !important; }
  html body #erg-page #erg-documents article.erg-row > p { grid-column: 2 !important; grid-row: 2 !important; }
}
@media (max-width: 480px) {
  html body #enr-page-v1 #enr-requirements > .enr-requirements__copy { padding: 36px 24px !important; }
  html body #enr-page-v1 #enr-requirements .enr-checklist { grid-template-columns: minmax(0, 1fr) !important; }
}

/* 9.6.25.23 — keep the mobile listing's closing-cost breakdown readable.
 * Explicit paired colors prevent inherited dark panels with dark figures.
 * Do not set display, visibility, dimensions, values or calculator state.
 */
@media (max-width: 760px) {
  html body.single-vc_listing .property-info .calc-wrap.vcrp-buyer-calculator > .column.calc-column {
    background: #f4f1ea !important;
    color: #29332c !important;
  }
  html body.single-vc_listing .property-info .calc-wrap.vcrp-buyer-calculator > .column.calc-column
    :is(.calc-row, .rs-value-wrap, .financial-related__wrapper, .new-construction__wrapper) {
    background: transparent !important;
  }
  html body.single-vc_listing .property-info .calc-wrap.vcrp-buyer-calculator > .column.calc-column
    :is(.rs, .calc-title, .rs a, #mortgage-financing-costs, #new-construction-costs) {
    color: #29332c !important;
    -webkit-text-fill-color: #29332c !important;
  }
}

/* 9.6.25.23 neighborhood heroes — remove only the figure's vertical gutters.
 * Keep horizontal spacing, responsive image heights, crop and captions intact.
 */
html body #emn-page > .emn-hero > figure.emn-hero__media,
html body #ebn-page > .ebn-hero > figure.ebn-hero__media {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* 9.6.25.23 building engagement — share the listing section's left edge.
 * The existing em-shell supplies the page gutter; do not add a second one.
 */
html body #elika-building-single-modern .em-building-engagement > .em-shell > .em-building-engagement-inquiry {
  padding-left: 0 !important;
}
