/* ============================================================
   FLOORPLANS PAGE  (/floorplans/)
   ------------------------------------------------------------
   Scoped to .new-section.floorplan-page throughout — nothing here
   reaches the homepage floorplan section.

   Card markup is AJAX-rendered, so it is not in the page source.
   Structure (confirmed from admin-ajax output):
     .card-container.container > .available_flp > .flp-row.no-badges
       .col.single-floorplan
         .flp-card.common-flp
           .flp-card-header
             .flp-title-wrap  > a.flp-more-details > h3.flp-title
                              + .flp-details  ("1 Bed | 1 Bath | 400 sq. ft.")
             .flp-icon-wrap   > a.flp_favorite (heart)
           .flp-card-body     > .card-img-wrap > a > img
           .flp-card-footer
             .flp-card-meta   > .flp-text-wrap (Starting @ / price)
                              + p.flp-deposite
                              + .floorplan-availability
             .flp-btn-wrap    > a.flp-next-btn

   Reference (thefirstokc.com/floorplans/): a three-up grid of grey
   cards, centred, with the plan name on top, a contained plan image
   and the price/availability beneath. component-common.css sets the
   row to four columns by default, which left the cards too narrow.
   ============================================================ */
.new-section.floorplan-page .flp-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
}

.new-section.floorplan-page .flp-card {
  padding: 30px;
  background: #f0f0f0;
  text-align: center;
}

/* ----- Header: name + bed/bath ----- */
.new-section.floorplan-page .flp-card-header {
  display: block;
  position: relative;
  padding: 0;
}

.new-section.floorplan-page .flp-title-wrap {
  display: block;
}

/* Smaller than the home card's name: this grid is three-up, not two. */
.new-section.floorplan-page .flp-title {
    font-size: 1.12rem;
      font-weight: 700;
      line-height: 1.3;
      text-transform: capitalize;
}

.new-section.floorplan-page .flp-details {
  margin: 0 0 20px;
  color: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 1.75px;
  text-transform: uppercase;
}

/* The heart sits in the card's top-right corner. */
.new-section.floorplan-page .flp-icon-wrap {
  position: absolute;
  top: 0;
  right: 0;
  margin: 0;
}

/* ----- Plan image -----
   contain, not cover: a floorplan drawing must never be cropped. */
.new-section.floorplan-page .flp-card-body {
  padding: 0;
}

/* Discount badge. It sits in normal flow above the plan image rather than
   overlaying it -- a floorplan drawing must stay fully readable. It is emitted
   empty when a plan has no discount, so it collapses in that case.
   inline-flex + gap keeps the icon and the text on one line, spaced and
   vertically centred against each other. */
.new-section.floorplan-page .flp-discount-wrap {
  display: flex;
  /* component-common.css:1349 sets align-items: flex-start, which pulls the
     icon up against the text. */
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: static;
  margin: 0 0 14px;
  min-height: 0;
}

/* The chip itself, when the markup supplies one. */
.new-section.floorplan-page .flp-discount-wrap .discount-on {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 0;
}

.new-section.floorplan-page .flp-discount-wrap:empty {
  display: none;
}

.new-section.floorplan-page .flp-discount-wrap i,
.new-section.floorplan-page .flp-discount-wrap img,
.new-section.floorplan-page .flp-discount-wrap svg {
  flex: 0 0 auto;
  display: block;
  position: static;
  margin: 0;
  line-height: 1;
}

/* Column layout so the discount badge stacks above the drawing instead of
   sitting on top of it. */
.new-section.floorplan-page .card-img-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  position: static;
}

.new-section.floorplan-page .card-img-wrap a {
  display: block;
  width: 100%;
}

.new-section.floorplan-page .card-img-wrap img {
  display: block;
  width: 100%;
  height: 260px;
  max-height: none;
  padding: 0;
  object-fit: contain;
  object-position: center center;
}

/* ----- Footer: price, deposit, availability, CTA ----- */
.new-section.floorplan-page .flp-card-footer {
  display: block;
  margin-top: 20px;
  padding: 0;
}

.new-section.floorplan-page .flp-card-meta {
  display: block;
  text-align: center;
}

.new-section.floorplan-page .flp-text-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0 6px;
  align-items: baseline;
  justify-content: center;
  margin-bottom: 8px;
}

.new-section.floorplan-page .flp-text-price {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.new-section.floorplan-page .flp-disc-price {
  font-size: 20px;
  font-weight: 700;
}

.new-section.floorplan-page .flp-deposite,
.new-section.floorplan-page .floorplan-availability {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.6;
}

/* component-common.css:1412 makes this a flex row so the ::before dot sits
   beside the text; the dot itself is display:block, so switching the parent to
   inline-block pushed it onto its own line. Keep it flex, centred. */
.new-section.floorplan-page .availability-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 0;
}

.new-section.floorplan-page .flp-btn-wrap {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

/* The next button holds nothing but <i class="swi swi-angle-right">, so it is
   left at its default styling -- restyling it (and hiding the icon) emptied it
   into a bare coloured block. */

/* First v2 floorplan listing: horizontal LVL29-style desktop rows. */
.first-v2-floorplan-page .card-container { padding: 40px 0 80px; }
.first-v2-floorplan-page .flp-row { display: flex; flex-flow: column; gap: 0; margin-bottom: 0; }
.first-v2-floorplan-page .single-floorplan { width: 100%; padding: 0; }
.first-v2-floorplan-page .flp-card { position: relative; display: flex; flex-flow: row nowrap; align-items: stretch; padding: 20px; }
.first-v2-floorplan-page .flp-card-body { order: 1; flex: 0 0 18%; max-width: 18%; height: 140px; padding: 0; border-right: 2px solid rgba(0, 0, 0, .1); }
.first-v2-floorplan-page .flp-card-body .card-img-wrap,
.first-v2-floorplan-page .flp-card-body .flp-single-page-img-blk,
.first-v2-floorplan-page .flp-card-body img { display: block; width: 100%; height: 100%; }
.first-v2-floorplan-page .flp-card-body img { object-fit: contain; }
.first-v2-floorplan-page .flp-card-header { order: 2; flex: 0 0 42%; max-width: 42%; padding: 0; }
.first-v2-floorplan-page .flp-title-wrap { display: grid; grid-template-columns: 50% 50%; grid-template-rows: minmax(0, 1fr) auto; width: 100%; height: 100%; }
.first-v2-floorplan-page .flp-title { margin: 0; }
.first-v2-floorplan-page .flp-details { display: flex; grid-column: 2; grid-row: 1 / span 2; align-items: center; width: 100%; padding: 0 30px; font-weight: 300; border-left: 2px solid rgba(0, 0, 0, .1); }
.first-v2-floorplan-page .flp-card-footer { order: 3; flex: 0 0 40%; max-width: 40%; display: flex; flex-wrap: nowrap; align-items: stretch; padding: 0; }
.first-v2-floorplan-page .flp-card-meta { display: flex; flex-flow: column; justify-content: center; width: 58%; padding: 0 30px; border-inline: 2px solid rgba(0, 0, 0, .1); }
.first-v2-floorplan-page .flp-text-wrap { display: flex; align-items: baseline; gap: 6px; }
.first-v2-floorplan-page .flp-btn-wrap { display: flex; align-items: center; justify-content: center; width: 42%; padding: 0 20px; }
.first-v2-floorplan-page .flp-next-btn { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; box-shadow: 5px 5px 10px 2px rgba(0, 0, 0, .2); }

/* Match LVL29's component specificity so shared stacked-card rules cannot
   override First v2's horizontal listing after AJAX content is inserted. */
.new-section.floorplan-page.first-v2-floorplan-page .card-container { padding-top: 40px; padding-bottom: 80px; }
.new-section.floorplan-page.first-v2-floorplan-page .flp-row { --flp-row-h: 180px; display: flex; flex-flow: column; gap: 0; max-height: calc(var(--flp-row-h) * 5); margin-bottom: 0; overflow-y: auto; }
.new-section.floorplan-page.first-v2-floorplan-page .available_flp { margin-bottom: 60px; }
.new-section.floorplan-page.first-v2-floorplan-page .flp-row > .single-floorplan:nth-child(even) .flp-card { background-color: transparent; }
.new-section.floorplan-page.first-v2-floorplan-page .single-floorplan { width: 100%; padding: 0; }
.new-section.floorplan-page.first-v2-floorplan-page .flp-card { position: relative; display: flex; flex-direction: row; flex-wrap: nowrap; align-items: stretch; height: auto; padding: 20px; }
.new-section.floorplan-page.first-v2-floorplan-page .flp-card-body { order: 1; flex: 0 0 18%; max-width: 18%; height: 140px; padding: 0; border-right: 2px solid rgba(0, 0, 0, .1); }
.new-section.floorplan-page.first-v2-floorplan-page .flp-card-body .flp-single-page-img-blk { display: block; grid-row: 2; min-height: 0; width: 100%; height: 100%; }
.new-section.floorplan-page.first-v2-floorplan-page .flp-card-body img { display: block; grid-row: 2; min-height: 0; width: 100%; height: 100%; object-fit: contain; }
/* Reserve a separate row for offers so the contained drawing stays unobscured. */
.new-section.floorplan-page.first-v2-floorplan-page .flp-card-body .card-img-wrap { position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr); align-items: stretch; width: 100%; height: 100%; }
.new-section.floorplan-page.first-v2-floorplan-page .flp-discount-wrap { position: static; grid-row: 1; max-width: 100%; margin: 0 0 8px; }
.new-section.floorplan-page.first-v2-floorplan-page .flp-discount-wrap .discount-on { display: flex; align-items: center; gap: 6px; min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.new-section.floorplan-page.first-v2-floorplan-page .discount-on { min-height: 0; padding: 4px 8px; font-size: .611rem; line-height: 1.2; }
.new-section.floorplan-page.first-v2-floorplan-page .flp-card-header { order: 2; flex: 0 0 42%; max-width: 42%; align-items: stretch; gap: 0; padding: 0; }
.new-section.floorplan-page.first-v2-floorplan-page .flp-card-header .flp-title-wrap { display: grid; grid-template-columns: 50% 50%; grid-template-rows: minmax(0, 1fr) auto; width: 100%; max-width: 100%; padding: 0; }
.new-section.floorplan-page.first-v2-floorplan-page .flp-card-header .flp-title-wrap > .flp-more-details {
  display: flex;
    flex-flow: column;
    justify-content: flex-start;
    width: 100%;
    padding: 20px 30px;
}
.new-section.floorplan-page.first-v2-floorplan-page .flp-card-header .flp-title { margin: 0; }
.new-section.floorplan-page.first-v2-floorplan-page .flp-card-header .flp-details { display: flex; flex-flow: column; justify-content: center; align-items: flex-start; text-align: left; grid-column: 2; grid-row: 1 / span 2; width: 100%; padding: 0 30px; font-weight: 300; border-left: 2px solid rgba(0, 0, 0, .1); }
.new-section.floorplan-page.first-v2-floorplan-page .availability-dot { align-items: flex-start; justify-content: flex-start; }
.new-section.floorplan-page.first-v2-floorplan-page .availability-dot::before { flex: 0 0 8px; margin-top: .45em; }
/* Favorite and tour icons sit below the plan name, at the header's bottom left. */
.new-section.floorplan-page.first-v2-floorplan-page .flp-card-header .flp-icon-wrap {
  position: absolute;
  top: auto;
  right: auto;
  bottom: 0;
  left: 30px;
  z-index: 3;
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  margin: 0;
}
.new-section.floorplan-page.first-v2-floorplan-page .flp-card-footer { display: flex; order: 3; flex: 0 0 40%; max-width: 40%; flex-wrap: nowrap; align-items: stretch; margin-top: 0; padding: 0; }
.new-section.floorplan-page.first-v2-floorplan-page .flp-card-footer .flp-card-meta { display: flex; flex-flow: column; justify-content: center; align-items: stretch; text-align: left; width: 58%; padding: 0 30px; border-left: 2px solid rgba(0, 0, 0, .1); border-right: 2px solid rgba(0, 0, 0, .1); }
.new-section.floorplan-page.first-v2-floorplan-page .flp-card-footer .flp-text-wrap { display: flex; justify-content: flex-start; align-items: baseline; gap: 6px; }
.new-section.floorplan-page.first-v2-floorplan-page .flp-card-footer .flp-disc-price { font-weight: 700; }
.new-section.floorplan-page.first-v2-floorplan-page .flp-card-footer p { margin: 5px 0; font-weight: 300; }
.new-section.floorplan-page.first-v2-floorplan-page .flp-btn-wrap { display: flex; align-items: center; justify-content: center; width: 42%; margin-top: 0; padding: 0 20px; }
.new-section.floorplan-page.first-v2-floorplan-page .flp-btn-wrap .flp-next-btn { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; font-weight: 700; box-shadow: 5px 5px 10px 2px rgba(0, 0, 0, .2); transition: all .3s ease; }
.new-section.floorplan-page.first-v2-floorplan-page .flp-btn-wrap .flp-next-btn:hover { opacity: .7; }

/* ----- Responsive ----- */
@media screen and (max-width: 1200px) {
  .new-section.floorplan-page .flp-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px;
  }

  .new-section.floorplan-page .flp-card {
    padding: 24px;
  }
}

@media (max-width: 1024px) {
  .new-section.floorplan-page.first-v2-floorplan-page .flp-card-header .flp-title-wrap > .flp-more-details,
  .new-section.floorplan-page.first-v2-floorplan-page .flp-card-header .flp-details,
  .new-section.floorplan-page.first-v2-floorplan-page .flp-card-footer .flp-card-meta { padding: 0 15px; }
  .new-section.floorplan-page.first-v2-floorplan-page .flp-btn-wrap { padding: 0 10px; }
}

@media screen and (max-width: 767px) {
  .new-section.floorplan-page .flp-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .new-section.floorplan-page .flp-card {
    padding: 20px;
  }

  .new-section.floorplan-page .card-img-wrap img {
    height: 220px;
  }

  .first-v2-floorplan-page .flp-card { flex-flow: column; }
  .first-v2-floorplan-page .flp-card-body,
  .first-v2-floorplan-page .flp-card-header,
  .first-v2-floorplan-page .flp-card-footer { flex: 0 0 auto; width: 100%; max-width: 100%; }
  .first-v2-floorplan-page .flp-card-body { height: 180px; border-right: 0; border-bottom: 2px solid rgba(0, 0, 0, .1); }
  .first-v2-floorplan-page .flp-title-wrap { display: flex; flex-flow: column; }
  .first-v2-floorplan-page .flp-title-wrap > .flp-more-details,
  .first-v2-floorplan-page .flp-details,
  .first-v2-floorplan-page .flp-card-meta { width: 100%; padding: 15px 0; border-inline: 0; border-bottom: 2px solid rgba(0, 0, 0, .1); }
  /* .first-v2-floorplan-page .flp-title-wrap > .flp-icon-wrap { padding: 10px 0; } */
  .first-v2-floorplan-page .flp-card-footer { flex-flow: column; }
  .first-v2-floorplan-page .flp-btn-wrap { width: 100%; padding: 15px 0 0; }

  .new-section.floorplan-page.first-v2-floorplan-page .flp-row { max-height: none; overflow-y: visible; }
  .new-section.floorplan-page.first-v2-floorplan-page .flp-card { flex-flow: column; align-items: stretch; padding: 16px; text-align: center; overflow-wrap: anywhere; }
  .new-section.floorplan-page.first-v2-floorplan-page .flp-card-header { flex: 0 0 auto; width: 100%; max-width: 100%; }
  .new-section.floorplan-page.first-v2-floorplan-page .flp-card-body { flex: 0 0 auto; width: 100%; max-width: 100%; height: auto; padding-bottom: 20px; border-right: 0; border-bottom: 2px solid rgba(0, 0, 0, .1); }
  .new-section.floorplan-page.first-v2-floorplan-page .flp-card-header .flp-title-wrap { display: flex; flex-flow: column; height: auto; text-align: center; }
  .new-section.floorplan-page.first-v2-floorplan-page .flp-card-header .flp-title-wrap > .flp-more-details,
  .new-section.floorplan-page.first-v2-floorplan-page .flp-card-header .flp-details,
  .new-section.floorplan-page.first-v2-floorplan-page .flp-card-footer .flp-card-meta { text-align: center; width: 100%; padding: 15px 0; border-left: 0; border-right: 0; border-bottom: 2px solid rgba(0, 0, 0, .1); }
  .new-section.floorplan-page.first-v2-floorplan-page .flp-card-header .flp-icon-wrap { position: static; bottom: auto; left: auto; justify-content: center; padding: 10px 0 0; }
  .new-section.floorplan-page.first-v2-floorplan-page .flp-card-footer { flex: 0 0 auto; width: 100%; max-width: 100%; flex-flow: column; }
  .new-section.floorplan-page.first-v2-floorplan-page .flp-btn-wrap { justify-content: center; width: 100%; padding: 15px 0 0; }

  /* Shared by filtered rows and .flp-row.no-badges on narrow screens. */
  .new-section.floorplan-page.first-v2-floorplan-page .single-floorplan { min-width: 0; }
  .new-section.floorplan-page.first-v2-floorplan-page .flp-card-body .card-img-wrap { height: auto; grid-template-rows: auto auto; }
  .new-section.floorplan-page.first-v2-floorplan-page .flp-card-body .flp-single-page-img-blk { height: 220px; }
  .new-section.floorplan-page.first-v2-floorplan-page .flp-card-body img { height: 220px; }
  .new-section.floorplan-page.first-v2-floorplan-page .flp-discount-wrap { justify-content: center; text-align: center; }
  .new-section.floorplan-page.first-v2-floorplan-page .discount-on { font-size: 0.75rem; line-height: 1.4; }
  .new-section.floorplan-page.first-v2-floorplan-page .flp-card-header .flp-title { font-size: 1.125rem; line-height: 1.4; }
  .new-section.floorplan-page.first-v2-floorplan-page .flp-card-header .flp-details { align-items: center; text-align: center; margin-bottom: 0; font-size: 0.8125rem; line-height: 1.6; letter-spacing: 0.06em; }
  .new-section.floorplan-page.first-v2-floorplan-page .flp-text-price { font-size: 0.75rem; letter-spacing: 0.05em; }

  .new-section.floorplan-page.first-v2-floorplan-page .flp-card-footer .flp-text-wrap { justify-content: center; }
  .new-section.floorplan-page.first-v2-floorplan-page .availability-dot { justify-content: center; }
}
