/* Generated by scripts/purge-css.mjs from dda-property-fixes.css (npm run css:public): rules for class / id names the public site never uses are left out. */
/* DDA design fixes for the property detail page (loaded after property-detail.css + page-specific.css).
   Client feedback round: "About" description, floor plans, available units, nearby locations.

   Colours: the original property page paints its sections with fixed light surfaces (property-detail.css hard-codes #fff / #f7f8fa /
   #141518 in BOTH site themes), so the neutrals below mirror those values through the --dda-* tokens (change them in one place if the
   page ever gets a dark treatment). Gold / button colours always come from the theme variables (--primary-color, --button-color,
   --button-text-color, --brand-muted, --brand-border, --brand-shadow). */

.property-detail-page {
  --dda-surface: #fff;
  --dda-surface-soft: #f7f8fa;
  --dda-ink: #141518;
  --dda-muted: #5c6068;
  --dda-line: rgba(20, 21, 24, .1);
  --dda-line-soft: rgba(20, 21, 24, .07);
  --dda-shadow-sm: 0 6px 18px rgba(20, 21, 24, .07);
  --dda-shadow-md: 0 22px 54px rgba(20, 21, 24, .09);
  --dda-ease: cubic-bezier(.22, 1, .36, 1);
}

/* ==========================================================================
   1. About <property> — whole lines only above VIEW MORE + soft fade + smooth open/close
   The line count is --dda-desc-lines; useDescriptionCollapse.ts snaps the height to the bottom of the last whole line (paragraph
   margins / empty paragraphs make N * line-height inexact) and animates `height`. The max-height below is the no-JS fallback.
   ========================================================================== */
/* Empty CMS paragraphs (<p><br></p>) between sections: a small gap instead of a full blank line plus margins, so the collapsed
   text shows real lines. */
.property-detail-page .description-sec .description-text p:has(> br:only-child) {
  height: .5lh;
  margin: 0;
  overflow: hidden;
}

/* ==========================================================================
   2. Explore Floor Plans — plans shown complete (contain), consistent frames, aligned side card
   ========================================================================== */

/* ==========================================================================
   3. Available Units — premium selector pills + one card (image | details)
   ========================================================================== */

/* selector: centred wrapping pills on desktop, one swipeable row on phones */
.property-detail-page #units .unit-tabs {
  position: relative;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: stretch;
  justify-content: center !important;
  gap: 10px !important;
  width: 100%;
  margin: 0 0 30px !important;
  padding: 0 !important;
  overflow: visible !important;
}
.property-detail-page #units .unit-tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto !important;
  min-height: 46px;
  padding: 0 22px !important;
  border: 1px solid var(--dda-line) !important;
  border-radius: 999px !important;
  background: var(--dda-surface) !important;
  color: var(--dda-ink) !important;
  box-shadow: 0 1px 2px rgba(20, 21, 24, .04);
  font-family: inherit !important;
  font-size: .84rem !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
  letter-spacing: .01em;
  white-space: nowrap;
  cursor: pointer;
  scroll-snap-align: center;
  transition: background .25s ease, border-color .25s ease, box-shadow .25s ease, color .25s ease, transform .25s var(--dda-ease);
}
.property-detail-page #units .unit-tab-btn:hover {
  border-color: var(--brand-border) !important;
  box-shadow: var(--dda-shadow-sm);
  transform: translateY(-1px);
}
.property-detail-page #units .unit-tab-btn.active,
.property-detail-page #units .unit-tab-btn.active:hover {
  border-color: var(--button-color) !important;
  background: var(--button-color) !important;
  color: var(--button-text-color) !important;
  box-shadow: 0 10px 22px -8px var(--brand-shadow);
  transform: none;
}
.property-detail-page #units .unit-tab-btn:focus-visible,
.property-detail-page #units .unit-cta-btn:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* card */
.property-detail-page #units .unit-detail-panel {
  margin: 0;
  padding: 14px;
  background: var(--dda-surface);
  border: 1px solid var(--dda-line-soft);
  border-radius: 28px;
  box-shadow: var(--dda-shadow-md);
}
.property-detail-page #units .unit-detail-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) !important;
  gap: clamp(24px, 3.4vw, 48px) !important;
  align-items: stretch !important;
}
.property-detail-page #units .unit-detail-grid:not(:has(.unit-img-wrapper)) {
  grid-template-columns: minmax(0, 1fr) !important;
}
.property-detail-page #units .unit-img-wrapper {
  position: relative;
  align-self: stretch;
  width: 100%;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 0 !important;
  overflow: hidden;
  border: 0 !important;
  border-radius: 20px !important;
  background: #e9ebef !important;
  box-shadow: 0 16px 36px -12px rgba(20, 21, 24, .28) !important;
}
/* 4:3 minimum shape (a ::before spacer instead of aspect-ratio, which would widen the box when the details column is taller) */
.property-detail-page #units .unit-img-wrapper::before {
  content: "";
  display: block;
  padding-top: 75%;
}
.property-detail-page #units .unit-img-wrapper img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100% !important;
  max-height: none !important;
  object-fit: cover;
  object-position: center;
  border-radius: 0 !important;
  transition: transform .9s var(--dda-ease);
}
.property-detail-page #units .unit-img-wrapper:hover img {
  transform: scale(1.035);
}

/* details */
.property-detail-page #units .unit-info {
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  gap: 0 !important;
  width: auto !important;
  padding: clamp(8px, 1.6vw, 22px) clamp(4px, 1.2vw, 18px) clamp(8px, 1.6vw, 18px) 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  animation: dda-unit-in .5s var(--dda-ease) both;
}
@keyframes dda-unit-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.property-detail-page #units .unit-info h3 {
  position: relative;
  margin: 0 0 16px !important;
  padding: 0 0 16px !important;
  border: 0 !important;
  font-family: 'Playfair Display', serif !important;
  font-size: clamp(1.4rem, 2.1vw, 1.85rem) !important;
  font-weight: 700;
  line-height: 1.25 !important;
  letter-spacing: .005em;
  color: var(--dda-ink) !important;
}
.property-detail-page #units .unit-info h3::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 48px;
  height: 2px;
  border-radius: 2px;
  background: var(--primary-color);
}
.property-detail-page #units .unit-info .unit-details {
  margin: 0 0 22px !important;
  font-size: .95rem !important;
  line-height: 1.75 !important;
  color: var(--dda-muted) !important;
  white-space: pre-line;
}
.property-detail-page #units .unit-info .unit-spec-list {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap;
  gap: 12px !important;
  margin: 0 0 24px !important;
  padding: 0 !important;
  list-style: none !important;
}
.property-detail-page #units .unit-info .unit-spec-list li {
  flex: 1 1 calc(50% - 6px) !important;
  min-width: 0;
  display: grid !important;
  grid-template-columns: 38px minmax(0, 1fr);
  column-gap: 12px;
  row-gap: 3px;
  align-items: center !important;
  justify-content: stretch !important;
  box-sizing: border-box;
  margin: 0 !important;
  padding: 14px 16px !important;
  border: 1px solid var(--dda-line-soft) !important;
  border-radius: 16px !important;
  background: var(--dda-surface-soft) !important;
  color: var(--dda-ink) !important;
}
.property-detail-page #units .unit-info .unit-spec-list li i {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--brand-muted);
  color: var(--primary-color);
  font-size: .88rem;
}
.property-detail-page #units .unit-info .unit-spec-list li span {
  grid-column: 2;
  font-size: .68rem !important;
  font-weight: 700 !important;
  line-height: 1.2;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dda-muted) !important;
}
.property-detail-page #units .unit-info .unit-spec-list li strong {
  grid-column: 2;
  font-size: 1.02rem !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  text-align: left !important;
  overflow-wrap: anywhere;
  color: var(--dda-ink) !important;
}
.property-detail-page #units .unit-info .unit-spec-list li.unit-spec--price {
  order: -1;
  flex-basis: 100% !important;
  padding: 16px 18px !important;
  border-color: var(--brand-border) !important;
  background: linear-gradient(120deg, var(--brand-muted), rgba(255, 255, 255, 0) 75%), var(--dda-surface) !important;
}
.property-detail-page #units .unit-info .unit-spec-list li.unit-spec--price i {
  background: var(--primary-color);
  color: var(--button-text-color);
}
.property-detail-page #units .unit-info .unit-spec-list li.unit-spec--price strong {
  font-size: clamp(1.3rem, 2vw, 1.65rem) !important;
  line-height: 1.2 !important;
  letter-spacing: -.005em;
}
.property-detail-page #units .unit-info .unit-cta-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px;
  width: 100% !important;
  min-height: 56px !important;
  margin: auto 0 0 !important;
  border: 1px solid var(--button-color) !important;
  border-radius: 16px !important;
  background: var(--button-color) !important;
  color: var(--button-text-color) !important;
  box-shadow: 0 14px 28px -12px var(--brand-shadow) !important;
  font-size: .88rem;
  font-weight: 700 !important;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: background .25s ease, transform .25s var(--dda-ease), box-shadow .25s ease;
}
.property-detail-page #units .unit-info .unit-cta-btn:hover {
  border-color: var(--button-hover-color) !important;
  background: var(--button-hover-color) !important;
  color: var(--button-hover-text-color) !important;
  box-shadow: 0 18px 32px -12px var(--brand-shadow) !important;
  transform: translateY(-2px);
}
.property-detail-page #units .unit-info .unit-cta-btn i {
  font-size: 1rem;
}

@media (max-width: 992px) {
  .property-detail-page #units .unit-detail-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 22px !important;
  }
  .property-detail-page #units .unit-info {
    padding: 4px 8px 10px !important;
  }
}
@media (max-width: 768px) {
  .property-detail-page #units .unit-tabs {
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    width: auto;
    margin: 0 -16px 18px !important;
    padding: 6px 16px 12px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
  }
  .property-detail-page #units .unit-tabs::-webkit-scrollbar {
    display: none;
  }
  .property-detail-page #units .unit-tab-btn {
    min-height: 44px;
    padding: 0 18px !important;
    font-size: .8rem !important;
  }
  .property-detail-page #units .unit-detail-panel {
    padding: 10px;
    border-radius: 22px;
  }
  .property-detail-page #units .unit-img-wrapper {
    border-radius: 16px !important;
  }
  .property-detail-page #units .unit-info {
    padding: 4px 6px 8px !important;
  }
  .property-detail-page #units .unit-info h3 {
    font-size: clamp(1.3rem, 5.4vw, 1.55rem) !important;
  }
  .property-detail-page #units .unit-info .unit-spec-list li {
    padding: 12px 12px !important;
    column-gap: 10px;
    grid-template-columns: 34px minmax(0, 1fr);
  }
  .property-detail-page #units .unit-info .unit-spec-list li i {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }
  .property-detail-page #units .unit-info .unit-spec-list li strong {
    font-size: .95rem !important;
  }
  .property-detail-page #units .unit-info .unit-spec-list li.unit-spec--price {
    padding: 14px 14px !important;
  }
}

@media (max-width: 480px) {
  /* narrow phones: the two small tiles stack icon / label / value so values such as "1,603.82 ft²" stay on one line */
  .property-detail-page #units .unit-info .unit-spec-list li:not(.unit-spec--price) {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 4px;
    align-content: start;
  }
  .property-detail-page #units .unit-info .unit-spec-list li:not(.unit-spec--price) i {
    grid-row: auto;
    grid-column: 1;
    margin-bottom: 6px;
  }
  .property-detail-page #units .unit-info .unit-spec-list li:not(.unit-spec--price) span,
  .property-detail-page #units .unit-info .unit-spec-list li:not(.unit-spec--price) strong {
    grid-column: 1;
  }
}

/* ==========================================================================
   4. Distance To Nearby Locations — tidy chips, framed map, readable popups (CSS only; tiles / JS are handled elsewhere)
   ========================================================================== */
.property-detail-page .property-nearby-sec .property-nearby-tab:has(small) i {
  grid-row: 1 / span 2;
}

/* map frame */

/* marker popup (name + travel time) */
.property-detail-page .property-nearby-map-shell .property-nearby-popup-wrapper .leaflet-popup-content-wrapper {
  padding: 0;
  border: 1px solid var(--dda-line-soft);
  border-radius: 14px;
  background: var(--dda-surface);
  box-shadow: 0 16px 38px rgba(20, 21, 24, .26);
}
.property-detail-page .property-nearby-map-shell .property-nearby-popup-wrapper .leaflet-popup-content {
  margin: 0;
  min-width: 170px;
  max-width: 260px;
}
.property-detail-page .property-nearby-map-shell .property-nearby-popup-wrapper .leaflet-popup-tip {
  background: var(--dda-surface);
  box-shadow: 0 6px 14px rgba(20, 21, 24, .18);
}
.property-detail-page .property-nearby-map-shell .property-nearby-popup-wrapper a.leaflet-popup-close-button {
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  padding: 0;
  font-size: 20px;
  line-height: 22px;
  text-align: center;
  color: var(--dda-muted);
}
.property-detail-page .property-nearby-map-shell .property-nearby-popup-wrapper a.leaflet-popup-close-button:hover {
  color: var(--dda-ink);
}
.property-detail-page .property-nearby-map-shell .property-nearby-popup {
  gap: 6px;
  padding: 14px 34px 14px 16px;
  border-left: 3px solid var(--primary-color);
  border-radius: 12px 0 0 12px;
  font-size: .86rem;
  line-height: 1.4;
}
.property-detail-page .property-nearby-map-shell .property-nearby-popup strong {
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--dda-ink);
}
.property-detail-page .property-nearby-map-shell .property-nearby-popup span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  font-weight: 600;
  color: #3f444b;
}
.property-detail-page .property-nearby-map-shell .property-nearby-popup span::before {
  content: "\f017";
  font-family: 'Font Awesome 6 Free';
  font-size: .72rem;
  font-weight: 400;
  color: var(--primary-color);
}

@media (prefers-reduced-motion: reduce) {
  .property-detail-page #units .unit-tab-btn,
  .property-detail-page #units .unit-img-wrapper img,
  .property-detail-page #units .unit-info .unit-cta-btn {
    transition: none;
  }
  .property-detail-page #units .unit-info {
    animation: none;
  }
}
