/* =========================================================
   PROPERTY LISTING CARD — v2 (rentz4.0 Figma redesign)
   Ported 1:1 from website html/index/buy-sell-listing-v2.html (.lcard,
   node 5749:23026 desktop / node 5840:16825 mobile). Colors, spacing,
   type sizes and breakpoints are copied verbatim from that file — do
   not "improve" values here without updating the source design first.

   Rendered by _propertyCardV2.blade.php. All tokens are scoped on
   .lcard itself (not :root) so this file can be loaded on pages that
   already define their own globals without clobbering them.

   Intentionally NOT ported from the source file: the nearby-landmark
   chips row (.lcard-chips) — not needed yet, see _propertyCardV2.blade.php.
   ========================================================= */

.lcard{
  --primary:#FF5403;
  --primary-tint:#FEF8F6;
  --primary-wash:rgba(255,84,3,.1);
  --ink:#333333;
  --ink-soft:#676767;
  --stroke-card:#E5E5E5;
  --stroke-mcard:#EBEBEB;
  --icon-stroke:#666666;
  --spec-div:#797979;
  --card-foot:#F7F7F7;
  --scrim:rgba(0,0,0,.6);
  --success:#009960;
  --wa-green:#0B851B;
  --radius:14px;
}

.pc2-listing-list{display:flex;flex-direction:column;gap:24px;}

.lcard{display:flex;background:#fff;border:1px solid var(--stroke-card);border-radius:10px;overflow:hidden;transition:box-shadow .2s ease;font-family:'Plus Jakarta Sans',system-ui,Arial,sans-serif;color:var(--ink);}
.lcard:hover{box-shadow:0 14px 34px -22px rgba(18,18,26,.35);}

/* Fixed height (not align-self:stretch) on purpose: real card bodies vary
   in height with title/address length, and stretch would make the image
   column balloon or shrink per-card instead of the uniform ~265px strip
   the source design (buy-sell-listing-v2.html) shows with its identical
   demo content. object-fit:cover crops any source photo to fit. */
.lcard-media{position:relative;flex:none;width:328px;height:265px;background:#EDEDF3;overflow:hidden;}
.lcard-media img{width:100%;height:100%;object-fit:cover;display:block;}
.lcard-media::after{content:'';position:absolute;left:0;right:0;bottom:0;height:70px;background:linear-gradient(to top,rgba(12,12,18,.72),transparent);pointer-events:none;}
/* article.lcard .lcard-save (not just .lcard-save) deliberately: this
   button also carries .lp-card-save to keep the wishlist click handler
   working (see listing.blade.php), and ".lp-preview .lp-card-save" in
   style1.css is a higher-specificity rule for the OLD save-button look
   (circular, dark, 38px). This compound selector has to out-specificity
   that rule, not just out-order it. */
article.lcard .lcard-save{position:absolute;top:14px;right:14px;width:34px;height:34px;border-radius:8px;background:#fff;border:1.2px solid var(--primary);color:var(--primary);display:flex;align-items:center;justify-content:center;cursor:pointer;z-index:2;transition:background .18s;padding:0;}
article.lcard .lcard-save:hover{background:var(--primary-tint);}
/* Saved state stays white/orange (not an inverted orange fill) - the
   solid vs outline icon swap below is what signals "saved" now. */
article.lcard .lcard-save.active{background:#fff;color:var(--primary);}

/* Save/bookmark pop animation - technique from
   https://uiverse.io/Omar-Molotov/thin-rat-38, recolored to --primary
   and keyed off .active (our AJAX-driven state) instead of a checkbox's
   :checked. Both icons sit stacked (absolute) in the same spot; toggling
   which one is display:block re-triggers its keyframe pop. */
article.lcard .lcard-save svg{position:absolute;width:24px;height:24px;animation:pc2-save-pop .35s;transform-origin:center;}
article.lcard .lcard-save .save-solid{display:none;}
article.lcard .lcard-save.active .save-regular{display:none;}
article.lcard .lcard-save.active .save-solid{display:block;}
@keyframes pc2-save-pop{
  0%{transform:scale(0);opacity:0;}
  60%{transform:scale(1.25);}
  100%{transform:scale(1);opacity:1;}
}

/* paid-plan only (gated server-side in the blade, not via CSS) */
.lcard-status{position:absolute;top:14px;left:14px;z-index:2;display:inline-flex;align-items:center;gap:7px;background:var(--scrim);color:#fff;font-size:10px;font-weight:500;padding:5px 8px;border-radius:20px;white-space:nowrap;box-shadow:0 4px 4px rgba(0,0,0,.3);letter-spacing:-.2px;}
.lcard-status i{position:relative;width:5px;height:5px;border-radius:50%;background:#2ECC71;flex:none;}
/* Expanding ring pulses out from the solid dot - "live" indicator feel. */
.lcard-status i::after{content:'';position:absolute;inset:0;border-radius:50%;background:#2ECC71;animation:pc2-live-ping 1.6s ease-out infinite;}
@keyframes pc2-live-ping{
  0%{transform:scale(1);opacity:.7;}
  100%{transform:scale(3.2);opacity:0;}
}
.lcard-status em{font-style:normal;opacity:.5;}

.lcard-capbar{position:absolute;left:0;right:0;bottom:0;z-index:2;display:flex;align-items:center;gap:10px;padding:12px 14px;}
.lcard-tenant{color:#fff;font-size:13px;font-weight:600;text-shadow:0 1px 4px rgba(0,0,0,.4);}
.lcard-count{margin-left:auto;color:#fff;font-size:12.5px;font-weight:500;text-shadow:0 1px 4px rgba(0,0,0,.4);}
.lcard-updated{display:none;align-items:center;gap:10px;color:rgba(255,255,255,.92);font-size:10px;font-weight:500;white-space:nowrap;}
.lcard-updated::before{content:'';width:1px;height:12px;background:rgba(255,255,255,.45);}

.lcard-body{flex:1;min-width:0;display:flex;flex-direction:column;}
.lcard-inner{padding:20px 24px 18px;flex:1;position:relative;display:flex;flex-direction:column;gap:11px;}
/* Desktop order: society -> title -> location -> price -> specs
   (mobile reorders these to society -> price -> title -> location) */
.lcard-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;order:1;}
.lcard-title{order:2;}
.lcard-loc{order:3;}
.lcard-price{order:4;}
.lcard-specs{order:5;}
.lcard-society{font-size:14.5px;color:var(--ink-soft);font-weight:500;}

/* Variant: listing with no society name — title becomes the first row and
   shares it with the PID ribbon; 118px keeps a long title from running
   underneath the ribbon. */
.lcard--no-society .lcard-title{padding-right:118px;}

/* Desktop: grey ribbon pinned top-right. Lives at the END of .lcard-price
   in the DOM so the price reads correctly; absolute positioning lifts it out. */
.lcard-pid{position:absolute;top:18px;right:0;background:#E7E7EC;color:var(--ink-soft);font-size:13px;font-weight:500;line-height:1;padding:7px 14px 7px 22px;clip-path:polygon(13px 0,100% 0,100% 100%,13px 100%,0 50%);}
.lcard-pid b{color:var(--ink);font-weight:700;}

.lcard-title{font-size:19px;font-weight:700;letter-spacing:-.01em;line-height:1.4;margin:0;}
.lcard-loc{display:flex;align-items:center;gap:6px;font-size:14px;color:var(--ink-soft);font-weight:500;min-width:0;}
.lcard-loc svg{flex:none;}
.lcard-loc span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}

.lcard-price{display:flex;align-items:center;gap:9px;flex-wrap:wrap;}
.lcard-price .amt{font-size:21px;font-weight:700;letter-spacing:-.01em;}
.lcard-price .unit{font-size:15px;color:var(--ink);font-weight:400;margin-left:-4px;}
.lcard .verified{display:inline-flex;align-items:center;gap:3px;background:var(--success);color:#fff;font-size:11px;font-weight:700;padding:4px 9px 4px 7px;border-radius:100px;letter-spacing:.45px;}

.lcard-specs{display:flex;align-items:stretch;flex-wrap:wrap;margin:5px 0 0;padding:0;list-style:none;}
.lcard-specs li{padding:0 18px;border-left:1px solid var(--spec-div);}
.lcard-specs li:first-child{padding-left:0;border-left:none;}
.lcard-specs li span{display:block;font-size:13.5px;color:var(--ink-soft);font-weight:400;}
.lcard-specs li b{display:block;font-size:14px;font-weight:700;color:var(--ink);margin-top:4px;}

.lcard-foot{display:flex;align-items:center;justify-content:flex-end;gap:10px;background:var(--card-foot);padding:12px 24px;min-height:51px;}
.lcard-lister{display:flex;align-items:center;gap:14px;margin-right:auto;}
.lcard-lister .lister-col span{display:block;font-size:10px;color:var(--ink-soft);font-weight:400;}
.lcard-lister .lister-col b{display:block;font-size:12px;font-weight:600;color:var(--ink-soft);margin-top:4px;}
.lcard-lister .lister-sep{width:1px;height:30px;background:#DEDEE6;flex:none;}
.lcard-lister .lister-time{font-size:13.5px;color:var(--ink-soft);}

/* height:33px + flex-centered text (not padding+line-height) so this
   lines up exactly with .icon-sq's fixed 33px height instead of drifting
   with font metrics. */
.lcard .btn-number{display:inline-flex;align-items:center;justify-content:center;height:33px;background:#fff;border:1px solid var(--primary);color:var(--primary);font-size:13px;font-weight:500;border-radius:6px;padding:0 14px;cursor:pointer;transition:.18s;font-family:inherit;}
.lcard .btn-number:hover{background:var(--primary);color:#fff;}
.lcard .icon-sq{width:33px;height:33px;border-radius:6px;background:#fff;border:1px solid var(--icon-stroke);display:flex;align-items:center;justify-content:center;color:var(--icon-stroke);cursor:pointer;flex:none;transition:.18s;padding:0;}
.lcard .icon-sq:hover{border-color:var(--ink);color:var(--ink);}
.lcard .icon-sq.wa{border-color:var(--wa-green);color:var(--wa-green);}
.lcard .icon-sq.wa:hover{background:var(--wa-green);color:#fff;}

@media (max-width:1200px){
  .lcard-media{width:270px;}
}
/* Same compact image treatment, but reacting to the card's own column
   width (see .property-listings's container-type in style1.css) instead
   of the viewport - the filter sidebar eats a variable chunk of the
   viewport across Bootstrap's md/lg breakpoints, so e.g. an 800px-wide
   tablet with the sidebar visible leaves only ~507px for cards, well
   under what the viewport query above would ever notice. */
@container (max-width:900px){
  .lcard-media{width:270px;}
}
/* Below ~750px the body column is too narrow for the 4-column specs
   grid and the footer's text+3-buttons row to fit without wrapping into
   overlapping lines - same simplification the mobile breakpoint already
   makes (specs hidden, lister trimmed to just "Listed By: X"), applied
   here for the same reason: not enough width, just via a narrow tablet
   column instead of a phone screen. */
@container (max-width:750px){
  .lcard-specs{display:none;}
  .lcard-foot{flex-wrap:wrap;row-gap:8px;}
  .lcard-lister .lister-sep,.lcard-lister .lister-time{display:none;}
}

/* ============ MOBILE LISTING CARD (node 5840:16825) ============ */
@media (max-width:760px){
  .lcard{flex-direction:column;border-radius:var(--radius);border-color:var(--stroke-mcard);}
  .lcard:hover{box-shadow:none;}

  .lcard-media{width:100%;height:auto;aspect-ratio:348/322;align-self:auto;}
  .lcard-media::after{display:none;}
  .lcard-capbar{background:var(--scrim);padding:6px 10px;gap:8px;}
  .lcard-tenant,.lcard-count{text-shadow:none;font-size:10px;font-weight:500;letter-spacing:-.2px;}
  .lcard-updated{display:inline-flex;}
  article.lcard .lcard-save{top:14px;right:14px;width:28px;height:28px;border-radius:6px;border:1px solid var(--icon-stroke);color:var(--icon-stroke);background:#fff;}
  article.lcard .lcard-save svg{width:17px;height:17px;}
  article.lcard .lcard-save:hover{background:#fff;}
  article.lcard .lcard-save.active{background:#fff;border-color:var(--primary);color:var(--primary);}
  .lcard-status{top:12px;left:12px;}

  /* society -> price -> title -> location */
  .lcard-inner{padding:14px 10px 12px;gap:11px;}
  .lcard-head{order:1;}
  .lcard-society{font-size:14px;font-weight:600;color:var(--ink);}
  .lcard-price{order:2;gap:6px;}
  .lcard-price .amt{font-size:21px;font-weight:700;}
  .lcard-price .unit{font-size:14.5px;margin-left:-2px;}
  .lcard-title{order:3;font-size:15px;font-weight:600;line-height:1.4;}
  /* PID is static on mobile, so the title needs no clearance */
  .lcard--no-society .lcard-title{padding-right:0;}
  .lcard-loc{order:4;font-size:14px;align-items:flex-start;}
  .lcard-specs{display:none;}

  /* PID becomes a left-rounded orange tab, flush to the card edge */
  .lcard-pid{position:static;order:9;margin-left:auto;margin-right:-10px;background:var(--primary-wash);color:var(--primary);font-size:10px;font-weight:500;line-height:1.2;padding:6px 10px;border-radius:6px 0 0 6px;clip-path:none;}
  .lcard-pid b{color:var(--primary);font-weight:500;}

  .lcard-foot{padding:10px;gap:8px;min-height:0;}
  .lcard-lister{gap:0;margin-right:auto;}
  .lcard-lister .lister-sep,.lcard-lister .lister-time{display:none;}
  /* radius/font-size/height already match the base .btn-number rule -
     no override needed now that height (not padding) drives its size. */
}
