﻿/* Leg RealX listing card (houses and land). Used with wwwroot/js/lrx-listing-card.js */
.lrx-card {
    --lrx-brand: #0e524f;
    position: relative;               /* the title link is stretched over the whole card */
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1px solid #e6ecea;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(16, 40, 38, .05);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    cursor: pointer;
}
.lrx-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(16, 40, 38, .12); border-color: #d3e1de; }
.lrx-card:focus-within { outline: 3px solid rgba(14, 82, 79, .35); outline-offset: 2px; }

/* Photo */
.lrx-card__media { position: relative; aspect-ratio: 4 / 3; background: #eef3f2; overflow: hidden; }
.lrx-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; transition: transform .4s ease; }
.lrx-card:hover .lrx-card__media img { transform: scale(1.04); }
.lrx-card__noimg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #a9bdb9; font-size: 2.6rem; }
.lrx-card.is-closed .lrx-card__media img { filter: grayscale(.55); }

/* Chips (top-left), heart (top-right), verified (bottom-left) */
.lrx-card__chips { position: absolute; top: 10px; left: 10px; right: 56px; z-index: 2; display: flex; flex-wrap: wrap; gap: 6px; }
.lrx-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border-radius: 999px; font-size: .72rem; font-weight: 600; line-height: 1.2; letter-spacing: .01em; background: rgba(255,255,255,.95); color: #1f2d2b; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.lrx-chip--rent { background: var(--lrx-brand, #0e524f); color: #fff; }
.lrx-chip--sale { background: #1d4ed8; color: #fff; }
.lrx-chip--pending { background: #f59e0b; color: #1f1300; }
.lrx-chip--closed { background: #374151; color: #fff; }
.lrx-chip--featured { background: #fff4d6; color: #7a5200; }
.lrx-chip--featured i { color: #e3a008; }

.lrx-card__fav {
    position: absolute; top: 8px; right: 8px; z-index: 3;      /* above the stretched link: saves, doesn't open */
    width: 38px; height: 38px; aspect-ratio: 1 / 1; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border: 0; border-radius: 50%; background: rgba(255,255,255,.95); color: #374151;
    box-shadow: 0 2px 6px rgba(0,0,0,.15); font-size: 1.05rem; transition: transform .15s ease, color .15s ease;
}
.lrx-card__fav:hover { transform: scale(1.08); color: #dc2626; }
.lrx-card__fav.is-on { color: #dc2626; }
.lrx-card__fav:focus-visible { outline: 3px solid rgba(14,82,79,.5); outline-offset: 2px; }

.lrx-card__verified { position: absolute; left: 10px; bottom: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.96); color: #0f766e; font-size: .74rem; font-weight: 700; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.lrx-card__verified i { font-size: .9rem; }

/* Body */
.lrx-card__body { display: flex; flex-direction: column; flex: 1 1 auto; padding: 14px 16px 12px; min-width: 0; }
.lrx-card__price { font-size: 1.22rem; font-weight: 800; color: var(--lrx-brand, #0e524f); line-height: 1.2; letter-spacing: -.01em; }
.lrx-card__price span { font-size: .8rem; font-weight: 600; color: #5b6b68; margin-left: 2px; }
.lrx-card__sub { font-size: .76rem; color: #6b7a77; margin-top: 1px; }
.lrx-card__title { margin: 8px 0 2px; font-size: 1rem; font-weight: 700; line-height: 1.35; min-height: 2.7em;
                   display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lrx-card__title a { color: #14211f; text-decoration: none; }
.lrx-card__title a:focus { outline: none; }
.lrx-card:hover .lrx-card__title a { color: var(--lrx-brand, #0e524f); }
.lrx-card__type { font-size: .76rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: #8a9895; }
.lrx-card__place { display: flex; gap: 5px; align-items: baseline; margin-top: 6px; font-size: .86rem; color: #5b6b68; min-width: 0; }
.lrx-card__place span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lrx-card__place i { color: var(--lrx-brand, #0e524f); flex-shrink: 0; }
.lrx-card__facts { list-style: none; margin: 10px 0 0; padding: 10px 0 0; border-top: 1px solid #eef2f1; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .82rem; color: #334140; }
.lrx-card__facts li { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.lrx-card__facts i { color: #7f9390; }

/* Footer: lister + call to action, pinned to the bottom so cards in a row line up */
.lrx-card__foot { margin-top: auto; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.lrx-card__lister { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-size: .8rem; color: #5b6b68; }
.lrx-card__logo { width: 26px; height: 26px; aspect-ratio: 1 / 1; flex-shrink: 0; border-radius: 50%; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; background: #e8f1ef; color: var(--lrx-brand, #0e524f); font-size: .66rem; font-weight: 700; border: 1px solid #dbe6e3; }
.lrx-card__logo img { width: 100%; height: 100%; object-fit: cover; }
.lrx-card__lname { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lrx-card__cta { flex-shrink: 0; display: inline-flex; align-items: center; gap: 4px; font-size: .82rem; font-weight: 700; color: var(--lrx-brand, #0e524f); }
.lrx-card__cta i { transition: transform .2s ease; }
.lrx-card:hover .lrx-card__cta i { transform: translateX(3px); }

@media (max-width: 575.98px) {
    .lrx-card__price { font-size: 1.15rem; }
    .lrx-card__body { padding: 12px 14px 12px; }
}
@media (prefers-reduced-motion: reduce) {
    .lrx-card, .lrx-card__media img, .lrx-card__cta i { transition: none; }
    .lrx-card:hover { transform: none; }
    .lrx-card:hover .lrx-card__media img { transform: none; }
}
