/* Codex: shared chat. All content styles work both inside a modal and in a future conversation page. */
.cruse-admin .cr-chat { display:flex; flex-direction:column; height:620px; max-height:calc(100vh - 70px); max-height:calc(100dvh - 70px); min-height:320px; background:var(--bs-body-bg,#fff); color:var(--bs-body-color,#29313d); font-size:13px; overflow:hidden; }
.cruse-admin .cr-chat-header { position:relative; padding:18px 20px 12px; flex-shrink:0; }
.cruse-admin .cr-chat-person { padding-left:75px; min-height:32px; }
.cruse-admin .cr-chat-person .cr-report-name { font-size:14px; }
.cruse-admin .cr-chat-destination { display:flex; align-items:center; gap:7px; padding-top:6px; font-size:11px; }
.cruse-admin .cr-chat-destination [dir=ltr] { font-family:Arial,sans-serif; }
.cruse-admin .cr-chat-tools { position:absolute; left:48px; top:18px; }
.cruse-admin .cr-chat-tools .btn { border-radius:50%; width:30px; height:30px; padding:0; min-height:0; }
.cruse-admin .cr-chat-tools .cr-chat-refresh { width:32px; height:32px; line-height:32px; color:var(--bs-body-color,#29313d); opacity:.5; border:0; background:transparent; box-shadow:none; font-size:17px; }
.cruse-admin .cr-chat-tools .cr-chat-refresh:hover,.cruse-admin .cr-chat-tools .cr-chat-refresh:focus-visible { opacity:.8; }
.cruse-admin .cr-chat-tools .cr-chat-refresh:disabled { opacity:.3; }
.cruse-admin .cr-chat-whatsapp .cr-chat-send { --bs-btn-bg:#06a322; --bs-btn-border-color:#06a322; --bs-btn-hover-bg:#07871e; --bs-btn-hover-border-color:#07871e; --bs-btn-active-bg:#07871e; --bs-btn-active-border-color:#07871e; --bs-btn-disabled-bg:#06a322; --bs-btn-disabled-border-color:#06a322; --bs-btn-focus-shadow-rgb:6,163,34; }
.cruse-admin .cr-chat-whatsapp .cr-chat-out .cr-chat-bubble { background:#e8f6ec; }
.cruse-admin[data-bs-theme=dark] .cr-chat-whatsapp .cr-chat-out .cr-chat-bubble { background:#1e3b2c; }
.cruse-admin .cr-chat-whatsapp .cr-chat-compose textarea:focus { border-color:#06a322; box-shadow:0 0 0 .2rem #06a32220; }
.cruse-admin .cr-chat-scope { padding:8px 16px; font-size:10px; text-align:center; background:var(--bs-tertiary-bg,#f6f8fa); }
.cruse-admin .cr-chat-inline-loading { display:flex; align-items:center; justify-content:center; gap:8px; min-height:34px; margin:8px auto; color:var(--bs-secondary-color,#687785); font-size:11px; }
.cruse-admin .cr-chat-messages { flex:1; min-height:0; overflow-y:auto; overscroll-behavior:contain; padding:0 18px 18px; background:var(--bs-tertiary-bg,#f6f8fa); }
.cruse-admin .cr-chat-messages .TitleDate { margin:20px auto 16px; padding:0 12px; max-width:none; width:max-content; cursor:default; text-align:center; font-size:10px; opacity:.65; }
.cruse-admin .cr-chat-messages .TitleDate:before,.cruse-admin .cr-chat-messages .TitleDate:after { display:none; }
.cruse-admin .cr-chat-message { display:flex; margin:8px 0; }
.cruse-admin .cr-chat-out { justify-content:flex-start; }
.cruse-admin .cr-chat-in { justify-content:flex-end; }
.cruse-admin .cr-chat-bubble { max-width:84%; min-width:72px; padding:10px 13px 5px; border-radius:18px; box-shadow:0 1px 2px #00000008; background:var(--bs-body-bg,#fff); }
.cruse-admin .cr-chat-out .cr-chat-bubble { background:#e8f1ff; border-bottom-right-radius:5px; }
.cruse-admin .cr-chat-in .cr-chat-bubble { border-bottom-left-radius:5px; }
.cruse-admin[data-bs-theme=dark] .cr-chat-out .cr-chat-bubble { background:#243b55; }
.cruse-admin .cr-chat-text { white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.95; text-align:start; }
.cruse-admin .cr-chat-meta { display:flex; direction:ltr; align-items:center; gap:5px; min-height:20px; margin-top:4px; color:var(--bs-secondary-color,#8a929c); }
.cruse-admin .cr-chat-meta time { font:10px Arial,sans-serif; }
.cruse-admin .cr-chat-meta .cr-report-icon { width:18px; height:18px; min-width:18px; font-size:12px; background:none; }
.cruse-admin .cr-chat-meta .cr-report-icon i { font-size:12px; }
.cruse-admin .cr-chat-notice { padding:0 16px; font-size:11px; color:var(--bs-secondary-color,#687785); }
.cruse-admin .cr-chat-notice:not(:empty) { padding-top:9px; padding-bottom:9px; }
.cruse-admin .cr-chat-compose { display:flex; align-items:flex-end; gap:10px; padding:12px 16px 5px; flex-shrink:0; }
.cruse-admin .cr-chat-compose textarea { border-radius:20px; padding:10px 14px; resize:none; min-height:42px; max-height:120px; font-size:13px; line-height:1.6; text-align:right; direction:rtl; }
.cruse-admin .cr-chat-send { width:42px; height:42px; min-height:42px; flex:0 0 42px; border-radius:50%; padding:0; }
.cruse-admin .cr-chat-foot { display:flex; justify-content:space-between; gap:10px; padding:4px 20px 12px; font-size:10px; }
.cruse-admin .cr-chat-foot [dir=ltr] { font-family:Arial,sans-serif; }
.cruse-admin .cr-chat-empty { text-align:center; margin:40px 0; opacity:.6; }
.cruse-admin .cr-chat-modal .modal-dialog { max-width:560px; }
.cruse-admin .cr-chat-modal.show .modal-dialog { animation:cruse-chat-modal-enter .18s ease-out; }
@keyframes cruse-chat-modal-enter { from { opacity:0; transform:translateY(-10px) scale(.98); } to { opacity:1; transform:translateY(0) scale(1); } }
.cruse-admin .cr-chat-modal .modal-content { border:0; border-radius:22px; overflow:hidden; }
.cruse-admin .cr-chat-modal .modal-header { position:absolute; left:15px; top:17px; z-index:2; padding:0!important; }
.cruse-admin .cr-chat-modal .modal-header .btn-close { margin:0; padding:8px; }
.cruse-admin .cr-chat-modal .modal-body { overflow:hidden; }
.cruse-admin .cr-chat-modal .cd-task-modal { padding:0; }
@media(max-width:575.98px) {
 .cruse-admin .cr-chat-modal .modal-dialog { margin:0; width:100%; max-width:none; height:100%; }
 .cruse-admin .cr-chat-modal .modal-content { height:100%; border-radius:0; }
 .cruse-admin .cr-chat-modal .modal-body,.cruse-admin .cr-chat-modal .cd-task-modal,.cruse-admin .cr-chat-container { height:100%; }
 .cruse-admin .cr-chat-modal .cr-chat { height:100%; max-height:none; min-height:0; }
 .cruse-admin .cr-chat-foot { padding-bottom:max(12px,env(safe-area-inset-bottom)); }
}
