/* Imperial PropertyHive Let Agreed treatment */
.imperial-let-agreed-image-host {
    position: relative !important;
    overflow: hidden;
}

/*
 * Search/results cards
 * --------------------
 * PropertyHive already renders its own LET AGREED status strip reliably on
 * the search page. Rather than adding a second overlay, make that native strip
 * unmistakable: red, roughly twice the original height, and with larger text.
 */
body:not(.single-property) .flag-let-agreed,
body:not(.single-property) .flag.flag-let-agreed,
body:not(.single-property) [class*="flag-let-agreed"] {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100% !important;
    min-height: 36px !important;
    box-sizing: border-box !important;
    padding: 9px 12px !important;
    margin: 0 !important;
    background: #c91f28 !important;
    background-color: #c91f28 !important;
    color: #fff !important;
    border: 0 !important;
    font-family: inherit !important;
    font-size: 15px !important;
    font-weight: 900 !important;
    line-height: 1.2 !important;
    letter-spacing: .045em !important;
    text-align: left !important;
    text-decoration: none !important;
    text-transform: uppercase !important;
}

/* Some PropertyHive themes put the colour on a child element rather than the
   flag wrapper, so force descendants to inherit the new red/white treatment. */
body:not(.single-property) .flag-let-agreed *,
body:not(.single-property) .flag.flag-let-agreed *,
body:not(.single-property) [class*="flag-let-agreed"] * {
    color: #fff !important;
    background-color: transparent !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
    text-transform: uppercase !important;
}

/* Individual property page: retain the large full-width red band through the
   middle of the complete tiled image gallery. */
.imperial-let-agreed-image-host > .imperial-let-agreed-ribbon {
    position: absolute !important;
    z-index: 999 !important;
    top: 50% !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 20px 18px !important;
    margin: 0 !important;
    transform: translateY(-50%) !important;
    background: #c91f28 !important;
    color: #fff !important;
    border: 0 !important;
    box-shadow: 0 4px 16px rgba(0,0,0,.30) !important;
    font-family: inherit !important;
    font-size: clamp(26px, 2.6vw, 42px) !important;
    font-weight: 900 !important;
    line-height: 1.05 !important;
    letter-spacing: .08em !important;
    text-align: center !important;
    text-decoration: none !important;
    text-transform: uppercase !important;
    pointer-events: none !important;
}

/* The custom IPHE7 grid should no longer show our additional red image band.
   If stale cached markup contains it, keep it hidden on listing cards. */
.iphe7-thumb > .imperial-let-agreed-ribbon {
    display: none !important;
}

@media (max-width: 767px) {
    body:not(.single-property) .flag-let-agreed,
    body:not(.single-property) .flag.flag-let-agreed,
    body:not(.single-property) [class*="flag-let-agreed"] {
        min-height: 32px !important;
        padding: 7px 10px !important;
        font-size: 13px !important;
    }

    .imperial-let-agreed-image-host > .imperial-let-agreed-ribbon {
        padding: 14px 12px !important;
        font-size: 24px !important;
        letter-spacing: .06em !important;
    }
}
