/* ======================================================================
   CANDOR PROPERTY — SHARED STATUS BADGES
   Used by Listings, Property Details and (later) Featured Properties.
   One shared place to change every badge colour.
   Load AFTER page-specific stylesheets in includes/header.php.
   ====================================================================== */

:root {
    --cp-badge-new:  #218a52; /* Green: first 42 days while available */
    --cp-badge-sstc: #343a40; /* Grey: under offer / exchanged */
    --cp-badge-sold: #c94b4b; /* Muted red: sold / completed */
}

/* The extra context selectors deliberately override older page-specific
   badge background rules, without changing badge POSITION on those pages. */
.cp-status-badge,
.cp-property-header .cp-property-status.cp-property-status--badge.cp-status-badge,
.property-image .property-status.cp-status-badge,
.cp-property-card-image .cp-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    padding: 6px 11px;
    background-color: var(--cp-badge-colour, var(--cp-badge-sstc));
    border: 1px solid var(--cp-badge-colour, var(--cp-badge-sstc));
    border-radius: 3px;
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: .025em;
    text-align: center;
    text-transform: uppercase;
    white-space: nowrap;
}

.cp-status-badge--new {
    --cp-badge-colour: var(--cp-badge-new);
}

.cp-status-badge--sstc {
    --cp-badge-colour: var(--cp-badge-sstc);
}

.cp-status-badge--sold {
    --cp-badge-colour: var(--cp-badge-sold);
}


/* =============================================================
   HOMEPAGE FEATURED CAROUSEL — BADGE PLACEMENT
   Keep the status badge anchored inside the image container,
   not within the card body. Scoped to featured cards only.
   ============================================================= */
.cp-featured-listings .cp-property-card-image {
    position: relative;
}

.cp-featured-listings .cp-property-card-image > .cp-status-badge {
    position: absolute;
    top: 11px;
    right: 11px;
    z-index: 3;
    margin: 0;
    pointer-events: none;
}
