/* Chat features shared by every conversation: replies, reactions, message menu, stickers, checklists, search. */
.bz-quote { display: flex; flex-direction: column; align-items: flex-start; gap: 0; width: 100%; margin: 2px 0 4px; padding: 4px 8px;
  border: 0; border-left: 3px solid currentColor; border-radius: 6px; background: rgba(127,127,127,.12); color: inherit; text-align: left; font-size: .8rem; line-height: 1.3; opacity: .9; }
.bz-quote b { font-size: .74rem; } .bz-quote span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.bz-msg.is-mine .bz-quote { background: rgba(255,255,255,.16); }
.bz-reactions { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 2px; }
.bz-react { display: inline-flex; align-items: center; gap: 3px; min-height: 28px; padding: 0 8px; border-radius: 999px; border: 1px solid rgba(127,127,127,.35);
  background: rgba(127,127,127,.1); color: inherit; font-size: .82rem; line-height: 1; }
.bz-react span { font-size: .72rem; font-weight: 700; }
.bz-react.is-mine { border-color: #2563eb; background: rgba(37,99,235,.18); }
.bz-msg.is-mine .bz-react { border-color: rgba(255,255,255,.4); background: rgba(255,255,255,.14); }
.bz-msg.is-mine .bz-react.is-mine { background: rgba(255,255,255,.32); }
.bz-more { margin-left: 4px; min-width: 32px; min-height: 28px; padding: 0 6px; border: 0; border-radius: 8px; background: transparent; color: inherit; opacity: .7; }
.bz-more:hover, .bz-more:focus-visible { opacity: 1; background: rgba(127,127,127,.18); }
.bz-deleted { font-style: italic; opacity: .75; }
.bz-msg.is-flash .bz-bubble { box-shadow: 0 0 0 3px rgba(245,158,11,.75); transition: box-shadow .2s; }
.bz-msg.bz-hit .bz-bubble { box-shadow: 0 0 0 2px rgba(245,158,11,.55); }
.bz-msg.bz-hit-current .bz-bubble { box-shadow: 0 0 0 3px #f59e0b; }
/* Stickers */
.bz-sticker { display: inline-flex; align-items: center; justify-content: center; width: 96px; height: 96px; border-radius: 28px;
  background: radial-gradient(circle at 30% 25%, rgba(255,255,255,.55), transparent 55%), var(--bz-sticker, #2563eb); color: #fff; font-size: 52px; box-shadow: 0 6px 16px rgba(0,0,0,.18); }
.bz-msg.is-sticker .bz-bubble { background: transparent !important; border-color: transparent !important; box-shadow: none !important; padding-left: 0; padding-right: 0; }
.bz-msg.is-sticker .bz-meta { color: var(--text-muted); }
.bz-sticker-panel { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; padding: 8px; max-height: 220px; overflow: auto; }
.bz-sticker-panel button { border: 0; background: transparent; padding: 0; min-height: 64px; }
.bz-sticker-panel .bz-sticker { width: 60px; height: 60px; border-radius: 18px; font-size: 32px; }
/* Checklists */
.bz-checklist { list-style: none; margin: 2px 0 4px; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.bz-checklist label { display: flex; gap: 8px; align-items: flex-start; min-height: 32px; padding: 4px 0; cursor: pointer; }
.bz-checklist input { width: 20px; height: 20px; margin-top: 1px; flex: 0 0 auto; accent-color: #16a34a; }
.bz-checklist input:checked + span { text-decoration: line-through; opacity: .75; }
.bz-checklist-panel { padding: 8px; }
/* Message menu: bottom sheet on phones, small popover elsewhere */
.bz-menu-backdrop { position: fixed; inset: 0; z-index: 2000; background: rgba(15,23,42,.35); }
.bz-menu { position: fixed; left: 0; right: 0; bottom: 0; z-index: 2001; display: flex; flex-direction: column; gap: 2px;
  padding: 10px 10px calc(10px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; background: var(--bg-card, #fff); color: var(--text-primary, #111); box-shadow: 0 -8px 30px rgba(0,0,0,.25); }
.bz-menu.is-floating { right: auto; bottom: auto; width: 260px; border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.bz-menu > button { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: inherit; font-size: .95rem; text-align: left; }
.bz-menu > button:hover, .bz-menu > button:focus-visible { background: rgba(127,127,127,.14); }
.bz-menu > button.is-danger { color: #dc2626; }
.bz-menu .bz-menu-cancel { justify-content: center; font-weight: 700; }
.bz-menu-reactions { display: flex; justify-content: space-between; gap: 2px; padding: 2px 2px 8px; border-bottom: 1px solid rgba(127,127,127,.2); margin-bottom: 4px; }
.bz-menu-reactions button { flex: 1 1 0; min-height: 44px; border: 0; border-radius: 10px; background: transparent; font-size: 1.35rem; }
.bz-menu-reactions button:hover, .bz-menu-reactions button:focus-visible { background: rgba(127,127,127,.14); }
/* Composer additions */
.bz-reply-bar { display: flex; align-items: center; gap: 8px; padding: 6px 10px; margin-bottom: 6px; border-left: 3px solid #2563eb; border-radius: 8px; background: rgba(37,99,235,.08); font-size: .82rem; }
.bz-reply-text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bz-reply-cancel { border: 0; background: transparent; color: inherit; min-width: 36px; min-height: 36px; }
.bz-attach-menu { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; padding: 8px; }
.bz-attach-menu button { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 64px; border: 1px solid rgba(127,127,127,.25); border-radius: 12px; background: transparent; color: inherit; font-size: .74rem; }
.bz-attach-menu i { font-size: 1.3rem; }
.chat-emoji-panel:not(.d-none) { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 2px; max-height: 210px; overflow: auto; padding: 6px; }
.chat-emoji-panel .chat-emoji-item { min-height: 40px; font-size: 1.25rem; padding: 0; border: 0; background: transparent; }
.bz-send-failed { color: #dc2626; font-weight: 600; }
.bz-thread-search { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-bottom: 1px solid rgba(127,127,127,.2); }
.bz-thread-search input { flex: 1 1 auto; min-width: 0; }
.bz-thread-search small { min-width: 48px; text-align: right; color: var(--text-muted); }
@media (max-width: 420px) { .bz-attach-menu { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.bzm-search-btn { margin-left: auto; min-width: 44px; min-height: 44px; border: 0; border-radius: 12px; background: transparent; color: inherit; font-size: 1.1rem; }
.bzm-search-btn[aria-expanded="true"] { background: rgba(127,127,127,.15); }

/* "New messages" divider: where unread messages start when a conversation is opened. */
.bz-unread-divider { display: flex; align-items: center; gap: 8px; margin: 10px 0 6px; color: var(--bs-danger, #dc3545); font-size: .75rem; font-weight: 600; }
.bz-unread-divider::before, .bz-unread-divider::after { content: ""; flex: 1; height: 1px; background: currentColor; opacity: .45; }
