/* =========================================================
   BPP AGENCY DETAIL — TRANSACTION STATUS BADGE V1.0.2
   Fixes raw "For Sale" / "For Rent" text on Agency cards only.
   ========================================================= */

html body#page-agency-profile
.bpp-search-owner-card-v466__media > .bpp-search-owner-card-v466__status {
    position: absolute !important;
    top: 10px !important;
    left: 10px !important;
    z-index: 8 !important;
}

/* When the universal JS moves the status into its badge row,
   let the flex wrapper control positioning. */
html body#page-agency-profile
.bpp-universal-card-media-badges-v1 > .bpp-search-owner-card-v466__status,
html body#page-agency-profile
.bpp-search-grid-media-badges-v20 > .bpp-search-owner-card-v466__status {
    position: static !important;
    inset: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
}

html body#page-agency-profile
.bpp-search-owner-card-v466__status {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 0 !important;
    min-height: 34px !important;
    height: 34px !important;
    margin: 0 !important;
    padding: 0 14px !important;
    border: 0 !important;
    border-radius: 999px !important;
    box-shadow: 0 4px 12px rgba(9, 58, 40, .12) !important;
    color: #fff !important;
    font-size: 11px !important;
    line-height: 1 !important;
    font-weight: 800 !important;
    letter-spacing: .01em !important;
    text-transform: uppercase !important;
    white-space: nowrap !important;
    text-decoration: none !important;
}

/* Sale = BestPropertyPlug green */
html body#page-agency-profile
.bpp-search-owner-card-v466__status.is-sale {
    background: #08a95b !important;
    color: #fff !important;
}

/* Rent = blue, matching the search-card rent treatment */
html body#page-agency-profile
.bpp-search-owner-card-v466__status.is-rent {
    background: #1683e6 !important;
    color: #fff !important;
}

/* Defensive fallback if a transaction modifier is absent. */
html body#page-agency-profile
article[data-transaction="sale"] .bpp-search-owner-card-v466__status {
    background: #08a95b !important;
}

html body#page-agency-profile
article[data-transaction="rent"] .bpp-search-owner-card-v466__status {
    background: #1683e6 !important;
}

/* Keep both status + category comfortably inside the image on mobile. */
@media (max-width: 767px) {
    html body#page-agency-profile
    .bpp-search-owner-card-v466__media > .bpp-search-owner-card-v466__status {
        top: 9px !important;
        left: 9px !important;
    }

    html body#page-agency-profile
    .bpp-search-owner-card-v466__status {
        min-height: 32px !important;
        height: 32px !important;
        padding: 0 12px !important;
        font-size: 10px !important;
    }
}
