/* 以 Frest 主題為基礎的專案樣式 */
body, .app-brand-text, h1, h2, h3, h4, h5, h6 {
    font-family: "IBM Plex Sans", "Noto Sans TC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* 品牌標誌（LINE 綠） */
.brand-mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 8px;
    background: #06c755; color: #fff; font-size: 1.15rem;
}

.min-w-0 { min-width: 0; }
.text-heading { color: var(--bs-heading-color, #516377); }
.layout-navbar .badge-notifications { position: absolute; top: 2px; right: -6px; font-size: .65rem; }

/* 對話列表 */
.conv-item.has-unread .conv-name { color: var(--bs-primary); font-weight: 600; }

/* ---------- 對話頁（覆寫 Frest app-chat 固定高度，改為彈性版面以容納提示列） ---------- */
.cc-chat.app-chat { height: calc(100vh - 11rem); height: calc(100dvh - 11rem); min-height: 460px; }
.cc-chat .app-chat-contacts { height: 100%; }
.cc-chat .app-chat-contacts .sidebar-body { height: calc(100% - 4.6rem); overflow-y: auto; }
.cc-chat .app-chat-history { height: 100%; }
.cc-chat .chat-history-wrapper { display: flex; flex-direction: column; height: 100%; }
.cc-chat .app-chat-history .chat-history-body { flex: 1 1 auto; height: auto; min-height: 0; overflow-y: auto; }
.cc-chat .app-chat-history .chat-history-footer { margin: 0 1rem 1rem; background: var(--bs-paper-bg, #fff); }
.cc-chat .chat-contact-list-item a { text-decoration: none; }
.cc-chat .chat-contact-status .badge { font-size: .7rem; vertical-align: 1px; }
.cc-chat .chat-message-wrapper { max-width: min(75%, 640px); }
.cc-chat .chat-message-right .chat-message-wrapper { display: flex; flex-direction: column; align-items: flex-end; }
.cc-chat .chat-message-text { display: inline-block; max-width: 100%; }
.cc-chat .msg-text { white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; }
.app-chat.cc-chat .app-chat-history .chat-history .chat-message.chat-message-right .chat-message-text.failed {
    background-color: #ffe5e5 !important; color: #d93a3b !important; border: 1px solid #ffc2c2;
}
.cc-chat .chat-message-wrapper > .text-muted { white-space: nowrap; }
.cc-chat .msg-error { white-space: normal; }
.cc-chat #blockedBanner { flex: 0 0 auto; }
.cc-chat #msgText { resize: none; max-height: 8rem; }
@media (max-width: 991.98px) {
    .cc-chat .chat-message-wrapper { max-width: 85%; }
}
@media (max-width: 575.98px) {
    .cc-chat.app-chat { height: calc(100dvh - 9rem); }
    .cc-chat .chat-history-header .btn { padding: .25rem .5rem; font-size: .75rem; }
}
