.bd-messenger-page{background:linear-gradient(150deg,#edf5fd,#f8fbff);--bs-body-color:#17324f}
.bd-messenger-topbar{background:#fff;border-bottom:1px solid #d7e5f2;box-shadow:0 3px 18px #0c426d09}
.bd-messenger-layout{border:1px solid #cbdff1;box-shadow:0 18px 50px #13467514;border-radius:22px;overflow:hidden}
.bd-sidebar-header{background:linear-gradient(130deg,#eef7ff,#fff)}
.bd-chat-filters{gap:6px;padding-bottom:12px}
.bd-chat-filters button{min-height:38px;border:1px solid #cbdff1;border-radius:999px;background:#f6faff;color:#315978;font-weight:650;padding:6px 12px}
.bd-chat-filters button.active{background:#096dc4;border-color:#096dc4;color:#fff;box-shadow:0 4px 10px #087ee42b}
.bd-chat-search{border-radius:14px;border:1px solid #cbdff1}
.bd-chat-item{border-radius:15px!important;margin-bottom:5px;border:1px solid transparent!important}
.bd-chat-item.active{background:#e8f3ff!important;border-color:#80b7e6!important;box-shadow:inset 4px 0 #1479d3}
.bd-chat-item.bd-has-unread .bd-chat-title{font-weight:850;color:#075ca7}
.bd-chat-unread{background:#087ee4;min-width:22px;min-height:22px;display:inline-grid;place-items:center;color:#fff;border-radius:999px}
.bd-thread-header{background:linear-gradient(120deg,#f0f8ff,#fff)}
.bd-message-row.mine .bd-message-bubble{background:linear-gradient(135deg,#1479d3,#125b9f);border-color:#1479d3}
.bd-messenger-page :is(button,a,input,textarea):focus-visible{outline:3px solid #12a3e7;outline-offset:3px}
.bd-chat-compose button:not(:disabled):active{transform:scale(.94)}
html[data-bs-theme=dark] .bd-messenger-page{background:#102c49;color:#edf6ff;--bd-border:#52789b}
html[data-bs-theme=dark] :is(.bd-messenger-topbar,.bd-messenger-sidebar,.bd-sidebar-header,.bd-thread-header,.bd-thread-bottom,.bd-messenger-gate,.bd-messenger-thread,.bd-chat-welcome){background:#173b5d;color:#edf6ff;border-color:#52789b}
html[data-bs-theme=dark] :is(.bd-messenger-intro p,.bd-chat-title,.bd-chat-details,.bd-chat-subtitle,.bd-thread-title h2,.bd-thread-title p,.bd-sidebar-hint,.bd-sidebar-footer){color:#d2e8fa}
html[data-bs-theme=dark] :is(.bd-chat-filters button,.bd-chat-search,.bd-message-day,.bd-message-row.theirs .bd-message-bubble){background:#224d72;color:#e7f4ff;border-color:#52789b}
html[data-bs-theme=dark] .bd-chat-item.active{background:#24557f!important;border-color:#79bcf0!important}
html[data-bs-theme=dark] .bd-chat-item.bd-has-unread .bd-chat-title{color:#92d9ff}
html[data-bs-theme=dark] .bd-thread-messages{background:#102f4c}
@media(hover:hover) and (pointer:fine){.bd-chat-item,.bd-chat-filters button,.bd-icon-button{transition:background-color .18s,box-shadow .18s}.bd-chat-item:hover{background:#edf6ff;box-shadow:0 3px 12px #0a44741a}.bd-chat-filters button:hover{box-shadow:0 4px 12px #087ee42b}}
@media(max-width:760px){.bd-messenger-layout{border-radius:16px 16px 0 0}.bd-messenger-topbar #v2-preferences{margin-left:.5rem}.bd-chat-filters{flex-wrap:wrap}}
@media(prefers-reduced-motion:reduce){.bd-chat-item,.bd-chat-filters button,.bd-icon-button{transition:none!important}.bd-chat-compose button{transform:none!important}}
/* Full-page messenger. Mobile keyboard positioning remains managed by the existing viewport code. */
.bd-messenger-page{margin:0}
.bd-messenger-main{max-width:none;width:100%;padding:0;margin:0}
.bd-messenger-intro{display:none}
.bd-messenger-layout{width:100%;height:calc(100dvh - 76px);min-height:0;border:0;border-radius:0;box-shadow:none;grid-template-columns:clamp(300px,27vw,410px) minmax(0,1fr)}
.bd-message-bubble{font-size:15px;padding:12px 16px 9px;line-height:1.55}
.bd-thread-messages{padding:24px clamp(18px,4vw,70px);gap:10px}
.bd-chat-compose textarea{font-size:15px;min-height:50px}
.bd-messenger-topbar{padding-inline:clamp(12px,2vw,32px)}
.bd-messenger-page.bd-messenger-compact .bd-messenger-topbar{display:none}
.bd-messenger-page.bd-messenger-compact .bd-messenger-layout{height:100dvh;min-height:0;border-radius:0}
.bd-messenger-page.bd-messenger-compact .bd-messenger-gate{margin:1rem}
@media(max-width:760px){.bd-messenger-layout{height:calc(100dvh - 60px);min-height:0;grid-template-columns:1fr;border-radius:0}.bd-thread-messages{padding:16px 14px}.bd-message-bubble{font-size:14px}.bd-messenger-page.bd-conversation-open .bd-messenger-layout{height:var(--bd-visible-height,100dvh)}}
/* Clear hierarchy: readable messages, secondary metadata and smaller commerce controls. */
.bd-message-bubble{font-size:14px!important;line-height:1.5;letter-spacing:normal;max-width:100%;padding:9px 12px 7px}
.bd-message-time{font-size:11px!important;line-height:1.4;opacity:.9}
.bd-thread-title h2{font-size:15px;line-height:1.35}.bd-thread-title p{font-size:13px}
.bd-commerce-bar{font-size:13px}.bd-commerce-bar button,.bd-deal-btn{font-size:13px!important;line-height:1.35;padding:8px 11px!important;min-height:40px}
.bd-chat-compose textarea{font-size:16px!important;line-height:1.45}.bd-thread-bottom small{font-size:11px;line-height:1.5}
.bd-chat-item .bd-chat-title{font-size:14px;line-height:1.45}.bd-chat-item .bd-chat-subtitle{font-size:12px;line-height:1.5}
@media(max-width:760px){.bd-message-row{max-width:94%}.bd-message-bubble{font-size:14px!important}.bd-thread-messages{padding:14px 12px;gap:10px}.bd-thread-header{height:auto;min-height:65px}.bd-commerce-bar button,.bd-deal-btn{font-size:12px!important}}

.bd-context-toggle{border:1px solid #b4cde5;background:#eff7ff;color:#185886;border-radius:999px;padding:7px 11px;font-size:12px;line-height:1.3;min-height:38px;flex:0 0 auto}.bd-thread-title p:empty{display:none}.bd-thread-extras{padding-block:8px!important}.bd-item-context{gap:10px}.bd-item-kicker{font-size:10px}.bd-item-info strong{font-size:13px}.bd-item-image,.bd-item-placeholder{width:44px!important;height:44px!important;min-height:44px!important}.bd-member-context{padding-block:7px!important}html[data-bs-theme=dark] .bd-context-toggle{background:#24557f;color:#e6f5ff;border-color:#6b9dc7}@media(max-width:600px){.bd-context-toggle{font-size:11px;padding:6px 9px}.bd-thread-secure{display:none}.bd-thread-title{min-width:0}}
.bd-message-types{position:relative;padding:0 14px 12px;z-index:15;flex:0 0 auto}
.bd-message-type-toggle{width:100%;display:flex!important;align-items:center;gap:10px;text-align:left;padding:11px 12px!important;border:1px solid #c1dbf2!important;border-radius:16px!important;background:linear-gradient(115deg,#edf7ff,#f8fcff)!important;color:#17496e!important;box-shadow:0 4px 14px #12558c0c}
.bd-type-trigger-copy{display:grid;gap:3px;flex:1;min-width:0}.bd-type-trigger-copy small{font-size:9px;letter-spacing:.11em;color:#4a7494}.bd-type-trigger-copy strong{font-size:13px;line-height:1.4;white-space:normal}.bd-message-type-toggle>.badge{background:#d5eaff;color:#15578e;font-size:12px}
.bd-type-symbol{display:grid;place-items:center;width:35px;height:35px;flex:0 0 35px;border-radius:12px;background:#dcefff;color:#1378bd;font-size:19px}
.bd-message-type-menu{width:calc(100% - 28px);min-width:0;padding:8px!important;border:1px solid #c4dcef!important;border-radius:18px!important;background:#fff;box-shadow:0 14px 36px #0b42652b;max-height:min(420px,calc(100dvh - 260px));overflow-y:auto;overscroll-behavior:contain}
.bd-type-menu-heading{font-size:11px;font-weight:750;padding:7px 9px 10px;color:#526c83}.bd-message-type-menu .bd-type-option{display:flex;align-items:center;gap:9px;min-height:58px;width:100%;padding:8px!important;border:1px solid transparent;border-radius:12px;white-space:normal;text-align:left;color:#203e59;background:transparent}
.bd-type-option-copy{display:grid;gap:3px;min-width:0;flex:1}.bd-type-option-copy strong{font-size:12px;line-height:1.35}.bd-type-option-copy small{font-size:10px;line-height:1.35;color:#688297}.bd-type-count{background:#e9f1f8;color:#43647f;font-size:11px;min-width:24px}
.bd-message-type-menu .bd-type-option:hover,.bd-message-type-menu .bd-type-option:focus-visible{background:#edf6ff;border-color:#bddaf2}.bd-message-type-menu .bd-type-option.active{background:#e1f1ff;border-color:#96c4eb;color:#085a96}.bd-type-option.active .bd-type-count{background:#1479d3;color:#fff}
.bd-type-unread{background:#fff0e6;color:#ba5b13}.bd-type-employment{background:#eeeaff;color:#6e4cbe}.bd-type-property{background:#e2f5ee;color:#147b5b}.bd-type-vehicle{background:#e7eefc;color:#3b63ad}.bd-type-service{background:#fff1d8;color:#9c6c10}.bd-type-count-note{display:block;font-size:9px;color:#6c8396;padding:9px 8px 4px}
html[data-bs-theme=dark] .bd-message-type-toggle{background:#20496e!important;color:#edf7ff!important;border-color:#5c85a6!important}html[data-bs-theme=dark] .bd-type-trigger-copy small{color:#bad5e8}html[data-bs-theme=dark] .bd-message-type-menu{background:#173b5d;border-color:#6087a9!important}html[data-bs-theme=dark] .bd-message-type-menu .bd-type-option{color:#e5f3fd}html[data-bs-theme=dark] .bd-type-option-copy small,html[data-bs-theme=dark] .bd-type-menu-heading,html[data-bs-theme=dark] .bd-type-count-note{color:#b8d0e2}html[data-bs-theme=dark] .bd-message-type-menu .bd-type-option:is(.active,:hover){background:#245a86;border-color:#6ca2ca}
@media(max-width:390px){.bd-message-types{padding-inline:10px}.bd-message-type-menu{width:calc(100% - 20px)}.bd-type-option-copy small{font-size:10px}}

.bd-type-option-copy strong{font-size:13px}.bd-type-option-copy small{font-size:11px}.bd-type-trigger-copy strong{font-size:14px}.bd-type-count-note{font-size:10px}

.bd-messenger-compact.bd-conversation-open .bd-messenger-sidebar{display:none!important}.bd-messenger-compact.bd-conversation-open .bd-messenger-layout{grid-template-columns:minmax(0,1fr)}
