
.bro-customer-messaging-layout{display:grid;grid-template-columns:minmax(320px,.95fr) minmax(320px,1.05fr);gap:12px;align-items:start}
.bro-customer-messaging-layout>.customer-message-card{min-width:0;margin:0}
.bro-sms-thread-card{position:sticky;top:58px;align-self:start;background:#fff;border:1px solid #d8e2ec;border-radius:12px;padding:12px;min-width:0}
.bro-sms-thread-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;padding-bottom:8px;border-bottom:1px solid #e4e9ee}
.bro-sms-thread-heading strong{font-size:15px}
.bro-sms-history{display:flex;flex-direction:column;gap:8px;max-height:380px;min-height:130px;overflow-y:auto;padding:12px 4px}
.bro-sms-bubble{max-width:92%;padding:9px 12px;border:1px solid #e0e6ee;border-radius:12px;background:#f2f6fb;white-space:pre-wrap;word-break:break-word;font-size:14px;line-height:1.4}
.bro-sms-bubble.sent{align-self:flex-end;background:#eaf8ed;border-color:#cfe7d5}
.bro-sms-bubble.received{align-self:flex-start}
.bro-sms-bubble small{display:block;margin-top:5px;font-size:11px;color:#5e7282}
.bro-sms-reply-form{display:flex;flex-direction:column;gap:7px;border-top:1px solid #e0e6ed;padding-top:11px}
.bro-sms-reply-form label{font-weight:700;font-size:13px}
.bro-sms-reply-form textarea{width:100%;min-height:62px;padding:9px;border:1px solid #b7c4d2;border-radius:8px;font:inherit;resize:vertical}
.bro-sms-reply-form button{align-self:flex-end}
.bro-sms-match-details{margin-top:14px;padding:10px;border:1px solid #d4e0ec;border-radius:9px;background:#f8fafc}
.bro-sms-match-details summary{cursor:pointer;font-weight:700}
.bro-sms-match-details p{font-size:12px;color:#586b7d}
.bro-sms-match-fields{display:grid;grid-template-columns:95px minmax(100px,1fr) auto;gap:6px;margin:9px 0}
.bro-sms-match-fields select,.bro-sms-match-fields input,.bro-sms-match-details>select,.bro-sms-relation input{padding:8px;width:100%;min-width:0;border:1px solid #b7c4d2;border-radius:7px;font:inherit;background:white}
.bro-sms-relation{display:block;font-size:12px;margin:8px 0}
.bro-sms-relation input{display:block;margin-top:5px}
.bro-sms-selected{border:2px solid #1968af!important;background:#eff7ff!important}
@media(max-width:950px){.bro-customer-messaging-layout{grid-template-columns:1fr}.bro-sms-thread-card{position:static}.bro-sms-history{max-height:310px}}
@media(max-width:440px){.bro-sms-match-fields{grid-template-columns:1fr 1fr}.bro-sms-match-fields input{grid-column:1/-1;grid-row:1}.bro-sms-match-fields button{grid-column:2}.bro-sms-match-fields select{grid-column:1}}

/* BRO 2026-10-19: Customers can dismiss a text thread and return to a full-width inbox. */
.bro-customer-messaging-layout.bro-thread-closed{grid-template-columns:minmax(0,1fr)}
.bro-customer-messaging-layout.bro-thread-closed>.bro-sms-thread-card{display:none!important}
.bro-sms-thread-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
#broSmsClose{background:#f1f5f9;border:1px solid #b9c8d8;color:#284360;min-height:36px;font-weight:800;white-space:nowrap}
#broSmsClose:hover,#broSmsClose:focus-visible{background:#e3effa;border-color:#6b9ac6;outline-offset:2px}
@media(max-width:950px){.bro-customer-messaging-layout:not(.bro-thread-closed)>.customer-message-card{display:none}.bro-customer-messaging-layout:not(.bro-thread-closed)>.bro-sms-thread-card{display:block;position:static}}
