/*
 * BPP CONTACT ROUTING — PHASE 2C.2B.1
 * REFERENCE: BPP-CONTACT-ROUTING-V1-PHASE2C2B1
 * Scope is intentionally narrow: agency property/profile contact actions and
 * custom agent hero/sidebar profile Chat. No global chrome changes.
 */

/* Agency property cards: Call | WhatsApp | Chat */
.rpg-storefront .property-contact-actions.property-contact-actions--card:has([data-bpp-property-chat-action]) {
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:7px!important;
    width:100%!important;
}
.rpg-storefront .property-contact-actions.property-contact-actions--card > .property-contact-action-form,
.rpg-storefront .property-contact-actions.property-contact-actions--card > form[data-bpp-property-chat-form] {
    display:block!important;
    visibility:visible!important;
    opacity:1!important;
    width:100%!important;
    min-width:0!important;
    height:100%!important;
    margin:0!important;
    padding:0!important;
    overflow:visible!important;
}
.rpg-storefront .property-contact-actions.property-contact-actions--card [data-bpp-property-chat-action].property-contact-action--chat {
    display:flex!important;
    visibility:visible!important;
    opacity:1!important;
    align-items:center!important;
    justify-content:center!important;
    gap:5px!important;
    width:100%!important;
    min-width:0!important;
    min-height:38px!important;
    height:100%!important;
    margin:0!important;
    padding:7px 6px!important;
    border:1px solid #2563eb!important;
    border-radius:8px!important;
    background:#2563eb!important;
    color:#fff!important;
    box-shadow:none!important;
    font-size:11px!important;
    line-height:1!important;
    font-weight:800!important;
    white-space:nowrap!important;
}
.rpg-storefront .property-contact-actions.property-contact-actions--card [data-bpp-property-chat-action] svg {
    width:15px!important;
    height:15px!important;
    flex:0 0 15px!important;
}

/* Agency hero/sidebar profile actions */
.rpg-storefront .rpg-storefront__hero-actions .rpg-directory-actions:has([data-bpp-profile-chat-action]),
.rpg-storefront .rpg-storefront__contact-card .rpg-directory-actions:has([data-bpp-profile-chat-action]) {
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:8px!important;
    width:100%!important;
}
.rpg-storefront .rpg-directory-actions > .bpp-profile-chat-action-form,
.rpg-storefront .rpg-directory-actions > form[data-bpp-profile-chat-form] {
    display:contents!important;
    visibility:visible!important;
    opacity:1!important;
}
.rpg-storefront .rpg-directory-actions [data-bpp-profile-chat-action] {
    display:inline-flex!important;
    visibility:visible!important;
    opacity:1!important;
    align-items:center!important;
    justify-content:center!important;
    width:100%!important;
    min-width:0!important;
}
.rpg-storefront .rpg-core-agency-card .rpg-directory-actions:has([data-bpp-profile-chat-action]) {
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:7px!important;
}

/* Agent profile true Chat */
#page-agent-profile .hero-actions form[data-bpp-profile-chat-form],
#page-agent-profile .bpp-agent-v4622-contact__split form[data-bpp-profile-chat-form] {
    display:contents!important;
    visibility:visible!important;
    opacity:1!important;
}
#page-agent-profile .hero-actions > a[href^="mailto:"] {
    display:none!important;
}
#page-agent-profile .hero-actions [data-bpp-profile-chat-action].btn {
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    border:1px solid #2563eb!important;
    background:#2563eb!important;
    color:#fff!important;
    cursor:pointer!important;
    text-decoration:none!important;
}
#page-agent-profile .bpp-agent-v4622-contact__split > a.is-message {
    display:none!important;
}
#page-agent-profile .bpp-agent-v4622-contact__split [data-bpp-profile-chat-action].is-chat {
    position:relative!important;
    display:flex!important;
    visibility:visible!important;
    opacity:1!important;
    align-items:center!important;
    justify-content:center!important;
    width:100%!important;
    min-width:0!important;
    min-height:43px!important;
    margin:0!important;
    padding:0 10px!important;
    border:1px solid #2563eb!important;
    border-radius:10px!important;
    background:#2563eb!important;
    color:#fff!important;
    font:inherit!important;
    font-size:10.5px!important;
    line-height:1!important;
    font-weight:850!important;
    text-decoration:none!important;
    cursor:pointer!important;
}
#page-agent-profile .bpp-agent-v4622-contact__split {
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
}

@media (max-width:767.98px) {
    .rpg-storefront .property-contact-actions.property-contact-actions--card:has([data-bpp-property-chat-action]) {
        gap:5px!important;
    }
    .rpg-storefront .property-contact-actions.property-contact-actions--card .property-contact-action {
        padding-left:4px!important;
        padding-right:4px!important;
        font-size:10px!important;
    }
    .rpg-storefront .rpg-storefront__hero-actions .rpg-directory-actions:has([data-bpp-profile-chat-action]),
    .rpg-storefront .rpg-storefront__contact-card .rpg-directory-actions:has([data-bpp-profile-chat-action]) {
        grid-template-columns:repeat(3,minmax(0,1fr))!important;
        gap:6px!important;
    }
}
