/**
 * Single Property — Core field / group frontend presentation contract.
 *
 * Theme-owned. Loaded only on Havena Single Property.
 * Does NOT re-enable Core `hvnly-frontend-property-single`.
 * Does NOT restyle Pro field roots (Energy / Floor accordion / VVT /
 * Nearby / Documents premium modules).
 * Does NOT redefine Pro selectors.
 *
 * Contracts:
 * 1) Theme scalars: .havena-pro-spec-table / --item / dt / dd
 * 2) Core fallback scalars: .hvnly-field / __label / __value / default-title
 * 3) Light rhythm for Core group cards already marked up by theme overrides
 *
 * @package HavenaPro
 */

/* ==========================================================================
   Scope
   ========================================================================== */

.havena-pro-real-estate--property-single .havena-pro-details .havena-pro-panel-single__section-fields {
  min-width: 0;
}

.havena-pro-real-estate--property-single .havena-pro-details .havena-pro-panel-single__section-fields > .havena-pro-spec-table--item + .havena-pro-spec-table--item,
.havena-pro-real-estate--property-single .havena-pro-details .havena-pro-panel-single__section-fields > .hvnly-field + .hvnly-field {
  /* Adjacent rows share hairline via own border-bottom; keep margin neutral. */
  margin-top: 0;
}

/* ==========================================================================
   1) Spec-table contract (theme-owned scalar rows)
   ========================================================================== */

.havena-pro-real-estate--property-single .havena-pro-details .havena-pro-spec-table {
  display: grid;
  grid-template-columns: repeat(var(--havena-pro-section-columns, 1), minmax(0, 1fr));
  gap: 0 2.5rem;
  margin: 0;
  min-width: 0;
  width: 100%;
}

/* Per-field item: section grid owns columns via display:contents when gated. */
.havena-pro-real-estate--property-single .havena-pro-details .havena-pro-spec-table--item {
  grid-template-columns: none;
  gap: 0;
  margin: 0;
  min-width: 0;
}

.havena-pro-real-estate--property-single .havena-pro-details .havena-pro-panel-single__section-fields[data-havena-pro-section-columns] > .havena-pro-spec-table--item {
  display: contents;
}

.havena-pro-real-estate--property-single .havena-pro-details .havena-pro-spec-table > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px dashed var(--havena-pro-line, #e7ebf2);
  font-size: var(--havena-pro-fs-sm, 0.885rem);
  line-height: 1.5;
  min-width: 0;
}

.havena-pro-real-estate--property-single .havena-pro-details .havena-pro-spec-table dt {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 58%;
  margin: 0;
  color: var(--havena-pro-slate, #5c6b84);
  font-weight: 400;
  overflow-wrap: anywhere;
}

.havena-pro-real-estate--property-single .havena-pro-details .havena-pro-spec-table dd {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-weight: var(--havena-pro-type-weight-button, 600);
  color: var(--havena-pro-ink, #0b1524);
  text-align: right;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-variant-numeric: tabular-nums;
}

.havena-pro-real-estate--property-single .havena-pro-details .havena-pro-spec-table dd a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.havena-pro-real-estate--property-single .havena-pro-details .havena-pro-spec-table dd a:hover,
.havena-pro-real-estate--property-single .havena-pro-details .havena-pro-spec-table dd a:focus-visible {
  color: var(--havena-pro-blue, #2f6fed);
}

/* ------------------------------------------------------------------
   Long-form text / textarea — LABEL above VALUE (full row width).
   Contract: .havena-pro-spec-table--type-text | --type-textarea
   Other field types keep LABEL | VALUE.
------------------------------------------------------------------ */
.havena-pro-real-estate--property-single .havena-pro-details .havena-pro-spec-table--type-text > div,
.havena-pro-real-estate--property-single .havena-pro-details .havena-pro-spec-table--type-textarea > div {
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.35rem;
  grid-column: 1 / -1;
  max-width: 100%;
}

.havena-pro-real-estate--property-single .havena-pro-details .havena-pro-spec-table--type-text dt,
.havena-pro-real-estate--property-single .havena-pro-details .havena-pro-spec-table--type-textarea dt {
  max-width: 100%;
  width: 100%;
}

.havena-pro-real-estate--property-single .havena-pro-details .havena-pro-spec-table--type-text dd,
.havena-pro-real-estate--property-single .havena-pro-details .havena-pro-spec-table--type-textarea dd {
  width: 100%;
  max-width: 100%;
  text-align: left;
  font-weight: 400;
  line-height: 1.65;
  color: var(--havena-pro-ink, #0b1524);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.havena-pro-real-estate--property-single .havena-pro-details .havena-pro-spec-table--type-textarea dd p {
  margin: 0 0 0.85rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.havena-pro-real-estate--property-single .havena-pro-details .havena-pro-spec-table--type-textarea dd p:last-child {
  margin-bottom: 0;
}

@media (max-width: 680px) {
  .havena-pro-real-estate--property-single .havena-pro-details .havena-pro-spec-table {
    grid-template-columns: minmax(0, 1fr);
  }

  body.havena-pro-is-property-single .havena-pro-details .havena-pro-spec-table > div {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.25rem;
  }

  body.havena-pro-is-property-single .havena-pro-details .havena-pro-spec-table dt {
    max-width: 100%;
  }

  body.havena-pro-is-property-single .havena-pro-details .havena-pro-spec-table dd {
    text-align: left;
    width: 100%;
  }

  body.havena-pro-is-property-single .havena-pro-details .havena-pro-spec-table--type-text > div,
  body.havena-pro-is-property-single .havena-pro-details .havena-pro-spec-table--type-textarea > div {
    gap: 0.35rem;
  }
}

/* ==========================================================================
   2) Core fallback field contract (.hvnly-field)
   Presets / templates that do not emit the theme spec-table row.
   Scoped to Havena Single Property details only.
   ========================================================================== */

.havena-pro-real-estate--property-single .havena-pro-details .havena-pro-panel-single__section-fields > .hvnly-field {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 0;
  padding: 0.85rem 0;
  min-width: 0;
  width: 100%;
  background: none;
  border: 0;
  border-bottom: 1px dashed var(--havena-pro-line, #e7ebf2);
  box-shadow: none;
  font-size: var(--havena-pro-fs-sm, 0.885rem);
  line-height: 1.5;
}

.havena-pro-real-estate--property-single .havena-pro-details .havena-pro-panel-single__section-fields > .hvnly-field--textarea {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

.havena-pro-real-estate--property-single .havena-pro-details .hvnly-field .hvnly-property-single__default-title,
.havena-pro-real-estate--property-single .havena-pro-details .hvnly-field .hvnly-field__label,
.havena-pro-real-estate--property-single .havena-pro-details .hvnly-field > strong.hvnly-field__label {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 58%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  font-size: inherit;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
  text-transform: none;
  color: var(--havena-pro-slate, #5c6b84);
  overflow-wrap: anywhere;
}

.havena-pro-real-estate--property-single .havena-pro-details .hvnly-field .hvnly-property-single__default-title::before,
.havena-pro-real-estate--property-single .havena-pro-details .hvnly-field .hvnly-property-single__default-title::after {
  content: none;
  display: none;
}

.havena-pro-real-estate--property-single .havena-pro-details .hvnly-field .hvnly-field__value {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: inherit;
  font-weight: var(--havena-pro-type-weight-button, 600);
  line-height: 1.5;
  color: var(--havena-pro-ink, #0b1524);
  text-align: right;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-variant-numeric: tabular-nums;
}

.havena-pro-real-estate--property-single .havena-pro-details .hvnly-field--textarea .hvnly-field__value {
  width: 100%;
  font-weight: 400;
  line-height: 1.65;
  text-align: left;
}

.havena-pro-real-estate--property-single .havena-pro-details .hvnly-field--textarea .hvnly-property-single__default-title,
.havena-pro-real-estate--property-single .havena-pro-details .hvnly-field--textarea .hvnly-field__label {
  max-width: 100%;
}

.havena-pro-real-estate--property-single .havena-pro-details .hvnly-field .hvnly-field__value a,
.havena-pro-real-estate--property-single .havena-pro-details .hvnly-field .hvnly-email-link,
.havena-pro-real-estate--property-single .havena-pro-details .hvnly-field .hvnly-phone-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.havena-pro-real-estate--property-single .havena-pro-details .hvnly-field .hvnly-field__value a:hover,
.havena-pro-real-estate--property-single .havena-pro-details .hvnly-field .hvnly-field__value a:focus-visible,
.havena-pro-real-estate--property-single .havena-pro-details .hvnly-field .hvnly-email-link:hover,
.havena-pro-real-estate--property-single .havena-pro-details .hvnly-field .hvnly-phone-link:hover {
  color: var(--havena-pro-blue, #2f6fed);
}

.havena-pro-real-estate--property-single .havena-pro-details .hvnly-field .hvnly-field__image-wrapper {
  margin-top: 0.75rem;
  width: 100%;
  min-width: 0;
}

.havena-pro-real-estate--property-single .havena-pro-details .hvnly-field .hvnly-field__image-wrapper img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--havena-pro-radius-sm, 8px);
}

@media (max-width: 680px) {
  .havena-pro-real-estate--property-single .havena-pro-details .havena-pro-panel-single__section-fields > .hvnly-field {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .havena-pro-real-estate--property-single .havena-pro-details .hvnly-field .hvnly-property-single__default-title,
  .havena-pro-real-estate--property-single .havena-pro-details .hvnly-field .hvnly-field__label,
  .havena-pro-real-estate--property-single .havena-pro-details .hvnly-field > strong.hvnly-field__label {
    max-width: 100%;
  }

  .havena-pro-real-estate--property-single .havena-pro-details .hvnly-field .hvnly-field__value {
    width: 100%;
    text-align: left;
  }
}

/* ==========================================================================
   3) Core group card rhythm (theme markup already exists in details.css)
   Containment / overflow only — do not redefine Pro roots.
   ========================================================================== */

.havena-pro-real-estate--property-single .havena-pro-details .havena-pro-panel-single__section-fields > .havena-pro-video-card,
.havena-pro-real-estate--property-single .havena-pro-details .havena-pro-panel-single__section-fields > .havena-pro-gallery-card,
.havena-pro-real-estate--property-single .havena-pro-details .havena-pro-panel-single__section-fields > .havena-pro-location-card,
.havena-pro-real-estate--property-single .havena-pro-details .havena-pro-panel-single__section-fields > .havena-pro-faq,
.havena-pro-real-estate--property-single .havena-pro-details .havena-pro-panel-single__section-fields > .havena-pro-highlights,
.havena-pro-real-estate--property-single .havena-pro-details .havena-pro-panel-single__section-fields > .havena-pro-features {
  min-width: 0;
  max-width: 100%;
}

.havena-pro-real-estate--property-single .havena-pro-details .havena-pro-gallery-card__image,
.havena-pro-real-estate--property-single .havena-pro-details .havena-pro-video-card__thumbnail {
  max-width: 100%;
}

.havena-pro-real-estate--property-single .havena-pro-details .havena-pro-location-card__map-wrap,
.havena-pro-real-estate--property-single .havena-pro-details .havena-pro-location-card__map {
  min-width: 0;
  max-width: 100%;
}

/* ==========================================================================
   4) Narrow phones — prevent horizontal overflow from long values/URLs
   ========================================================================== */

@media (max-width: 430px) {
  .havena-pro-real-estate--property-single .havena-pro-details .havena-pro-spec-table > div,
  .havena-pro-real-estate--property-single .havena-pro-details .havena-pro-panel-single__section-fields > .hvnly-field {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }
}
