#tr-comms .tr-message-preview-notice{font-size:12px;color:#718097;margin:0 0 16px;line-height:1.5}
#tr-comms .tr-source-label{display:inline-flex;align-items:center;border-radius:4px;padding:3px 7px;font-size:11px;font-weight:500;line-height:1.3;vertical-align:middle;white-space:nowrap}
#tr-comms .tr-source-email{background:#edf2fb;color:#426495}
#tr-comms .tr-source-text{background:#edf5f1;color:#426e58}
#tr-comms .tr-message-source{margin-bottom:8px}
#tr-comms .tr-message-body{white-space:pre-wrap;overflow-wrap:anywhere}
#tr-comms .tr-email summary .tr-source-label{margin-right:5px}
#tr-comms .tr-message-preview-bar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:16px}
#tr-comms .tr-message-preview-bar .tr-message-preview-notice{margin:0}
#tr-comms .tr-signature-example{display:flex;align-items:center;gap:7px;font-size:11px;color:#718097}
#tr-comms .tr-signature-example select{border:1px solid #dce3ee;background:#fff;border-radius:5px;padding:5px;color:#52617a;font:inherit}
#tr-comms .tr-presale-history{border:1px solid #dce3ee;border-radius:8px;background:#fff;margin-bottom:18px}
#tr-comms .tr-presale-history>summary{padding:15px 17px;cursor:pointer;color:#52617a;line-height:1.6}
#tr-comms .tr-presale-title{font-size:14px;font-weight:600}
#tr-comms .tr-history-count{font-size:11px;color:#7b899e;margin-left:10px;white-space:nowrap}
#tr-comms .tr-history-description{display:block;font-size:12px;color:#7b899e;padding-left:17px}
#tr-comms .tr-history-content{border-top:1px solid #e5eaf2;padding:0 17px 4px;background:#fafbfd;border-radius:0 0 8px 8px}
#tr-comms .tr-signature-event{font-size:12px;color:#57735e;margin:10px 0 18px}
#tr-comms .tr-presale-history>summary:focus-visible{outline:2px solid #0567ee;outline-offset:2px;border-radius:6px}

/* Homeowner replies only. Call cards, internal chat and notes keep their existing styles. */
#tr-comms :is(.tr-message-bubble.tr-out:not([data-quo-call-id]), .tr-email.tr-out){
  max-width:92%;margin-left:auto;background:#5578a5;border-color:#5578a5;
  color:#fff;border-radius:18px 18px 5px 18px;overflow-wrap:anywhere;
}
#tr-comms :is(.tr-message-bubble.tr-out:not([data-quo-call-id]), .tr-email.tr-out) :is(.tr-message-body,.tr-message-meta,.tr-muted,summary){color:#fff}
#tr-comms .tr-email.tr-out summary{white-space:normal;overflow-wrap:anywhere;border-radius:inherit}
#tr-comms :is(.tr-message-bubble.tr-out:not([data-quo-call-id]), .tr-email.tr-out) .tr-source-label{background:transparent;color:#fff;border:1px solid #ffffff80}
#tr-comms :is(.tr-message-bubble.tr-out:not([data-quo-call-id]), .tr-email.tr-out) a{color:#fff;text-decoration:underline;text-underline-offset:2px;overflow-wrap:anywhere}
#tr-comms :is(.tr-message-bubble.tr-out:not([data-quo-call-id]), .tr-email.tr-out) :is(a,summary):focus-visible{outline:2px solid #fff;outline-offset:-3px}
/* Attachment cards remain light with dark text, including under custom branding. */
#tr-comms :is(.tr-message-bubble.tr-out:not([data-quo-call-id]), .tr-email.tr-out) .tr-file{background:#fff;color:#344258;border-color:#dce3ee;min-width:0;overflow-wrap:anywhere}
#tr-comms :is(.tr-message-bubble.tr-out:not([data-quo-call-id]), .tr-email.tr-out) .tr-file :is(a,.tr-muted){color:#344258}
#tr-comms :is(.tr-message-bubble.tr-out:not([data-quo-call-id]), .tr-email.tr-out) .tr-file a:focus-visible{outline-color:#5578a5}
