/* New replies remain visible until their existing read receipt is recorded. */
.bichmi-v2__thread-link.has-unread-replies { border-color:#dc454b; background:color-mix(in srgb, #df3f48 12%, var(--chat-surface, #fff)); animation:bichmi-reply-pulse 1.8s ease-in-out infinite; }
.bichmi-v2__thread-link.has-unread-replies strong { color:#c9313e; }
.bichmi-v2__thread-link.has-unread-replies .bichmi-v2__thread-unread { min-width:20px; height:20px; border-radius:999px; background:#d52e3e; color:#fff; box-shadow:0 0 0 3px rgba(223,63,72,.15); }
.bichmi-v2__message.is-unread-reply { outline:2px solid rgba(220,69,75,.55); outline-offset:2px; animation:bichmi-reply-pulse 1.8s ease-in-out infinite; }
.bichmi-v2__new-reply-dot { position:absolute; top:8px; right:-6px; width:12px; height:12px; border-radius:50%; background:#e23846; border:2px solid var(--chat-surface,#fff); box-shadow:0 0 0 2px rgba(223,63,72,.14); pointer-events:none; }
@keyframes bichmi-reply-pulse { 0%,100% {box-shadow:0 0 0 0 rgba(223,63,72,.10);} 50% {box-shadow:0 0 0 5px rgba(223,63,72,.25);} }
:is([data-theme="dark"],[data-ui-mode="atmosphere"],[data-ui-mode="watersphere"]) .bichmi-v2__thread-link.has-unread-replies strong {color:#ff8c94;}
/* Keep compact reply panels inside the available phone width. */
.bichmi-v2.bichmi-v2--compact .bichmi-v2__thread-panel { inset:0; width:auto; min-width:0; max-width:100%; box-sizing:border-box; }
@media (max-width:600px) {
  #cleanCrmApp.clean-route-bichmi > .clean-main { grid-template-columns:minmax(0,1fr); }
  #cleanCrmApp .page-scroll--bichmi { min-width:0; width:100%; max-width:100%; margin-inline:0; box-sizing:border-box; }
  #cleanCrmApp :is(.bichmi-live-page,.bichmi-react-shell,.bichmi-react-shell__host,.bichmi-initial-frame) { min-width:0; max-width:100%; box-sizing:border-box; }
  .bichmi-v2 .bichmi-v2__chat.has-thread { padding-right:0; min-width:0; }
  .bichmi-v2 .bichmi-v2__chat.has-thread > .bichmi-v2__thread-panel { inset:0; width:auto; min-width:0; max-width:100%; box-sizing:border-box; }
  .bichmi-v2 .bichmi-v2__thread-panel .bichmi-v2__composer { min-width:0; }
  .bichmi-v2 .bichmi-v2__thread-panel .bichmi-v2__message { overflow-wrap:anywhere; }
}
@media (prefers-reduced-motion:reduce) { .bichmi-v2__thread-link.has-unread-replies,.bichmi-v2__message.is-unread-reply { animation:none; } }
