/* ==========================================================================
   BPP PROPERTY SEARCH GRID — CLEAN CARD V2.0
   Search GRID only. Does not affect LIST cards or reusable cards elsewhere.

   Final structure:
   IMAGE: [For Sale / For Rent] [Category] ... heart ... photo count
   BODY : Title -> Location -> Price -> Facts (when present) -> Lister -> Contacts

   Removed from search GRID:
   - description
   - body taxonomy/category/type chips
   - View Property CTA
   ========================================================================== */

body.rpg-properties-exact-v2
.rpgp2-property-grid
article.bpp-search-owner-card-v466[data-bpp-search-owner-card-v466] {
    height: auto !important;
    min-height: 0 !important;
}

body.rpg-properties-exact-v2
.rpgp2-property-grid
article.bpp-search-owner-card-v466[data-bpp-search-owner-card-v466]
.bpp-search-owner-card-v466__media {
    position: relative !important;
}

/* Defensive fallback while JS initializes / AJAX redraws. */
body.rpg-properties-exact-v2
.rpgp2-property-grid
article.bpp-search-owner-card-v466[data-bpp-search-owner-card-v466]
.bpp-search-owner-card-v466__description,

body.rpg-properties-exact-v2
.rpgp2-property-grid
article.bpp-search-owner-card-v466[data-bpp-search-owner-card-v466]
.bpp-search-owner-card-v466__taxonomy,

body.rpg-properties-exact-v2
.rpgp2-property-grid
article.bpp-search-owner-card-v466[data-bpp-search-owner-card-v466]
.bpp-search-owner-card-v466__view {
    display: none !important;
    visibility: hidden !important;
    min-height: 0 !important;
    max-height: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
}

/* Top-left image badge group: transaction + actual rendered category. */
body.rpg-properties-exact-v2
.rpgp2-property-grid
.bpp-search-grid-media-badges-v20 {
    position: absolute !important;
    top: 12px !important;
    left: 12px !important;
    z-index: 6 !important;
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 7px !important;
    max-width: calc(100% - 80px) !important;
    pointer-events: none !important;
}

/* Keep the site's real For Sale / For Rent styling; only normalize positioning. */
body.rpg-properties-exact-v2
.rpgp2-property-grid
.bpp-search-grid-media-badges-v20
.bpp-search-owner-card-v466__status {
    position: static !important;
    inset: auto !important;
    transform: none !important;
    margin: 0 !important;
    flex: 0 0 auto !important;
}

/* Category badge cloned from the card's real first taxonomy chip. */
body.rpg-properties-exact-v2
.rpgp2-property-grid
.bpp-search-grid-category-v20 {
    position: static !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    min-height: 31px !important;
    padding: 6px 10px !important;
    margin: 0 !important;
    border: 1px solid rgba(15, 157, 88, .16) !important;
    border-radius: 999px !important;
    background: rgba(255,255,255,.96) !important;
    box-shadow: 0 3px 10px rgba(15, 45, 32, .08) !important;
    color: #07884c !important;
    font-size: 12px !important;
    line-height: 17px !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
}

body.rpg-properties-exact-v2
.rpgp2-property-grid
.bpp-search-grid-category-v20 svg {
    width: 15px !important;
    height: 15px !important;
    flex: 0 0 15px !important;
    stroke-width: 2 !important;
}

/* After the removed blocks, keep the body naturally compact. */
body.rpg-properties-exact-v2
.rpgp2-property-grid
article.bpp-search-owner-card-v466.bpp-search-grid-clean-v20
.bpp-search-owner-card-v466__body {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
}

/* Do not allow old View button margins/heights to survive through card wrappers. */
body.rpg-properties-exact-v2
.rpgp2-property-grid
article.bpp-search-owner-card-v466.bpp-search-grid-clean-v20 {
    padding-bottom: 0 !important;
}

/* Existing mobile GRID work stays authoritative for sizing; only badge sizing tightens. */
@media (max-width: 767px) {
    body.rpg-properties-exact-v2
    .rpgp2-property-grid
    .bpp-search-grid-media-badges-v20 {
        top: 9px !important;
        left: 9px !important;
        gap: 5px !important;
        max-width: calc(100% - 62px) !important;
    }

    body.rpg-properties-exact-v2
    .rpgp2-property-grid
    .bpp-search-grid-category-v20 {
        min-height: 27px !important;
        padding: 4px 8px !important;
        gap: 4px !important;
        font-size: 10.5px !important;
        line-height: 15px !important;
    }

    body.rpg-properties-exact-v2
    .rpgp2-property-grid
    .bpp-search-grid-category-v20 svg {
        width: 13px !important;
        height: 13px !important;
        flex-basis: 13px !important;
    }
}
