/* Chat do sinistro (App\Livewire\ClaimChat). Asset do Filament (AppServiceProvider), publicado em
   public/css/app/chat.css por "php artisan filament:assets": carrega com a página, por isso o modal
   já abre com o layout certo. */
.chat { display: grid; grid-template-columns: 20rem 1fr; height: min(70vh, 44rem); border: 1px solid var(--gray-200); border-radius: .75rem; overflow: hidden; }
.chat-list { overflow-y: auto; border-right: 1px solid var(--gray-200); background: var(--gray-50); }
.chat-item { display: flex; gap: .75rem; width: 100%; padding: .75rem 1rem; text-align: left; border-bottom: 1px solid var(--gray-100); }
.chat-item:hover { background: var(--gray-100); }
.chat-item-active, .chat-item-active:hover { background: color-mix(in oklab, var(--primary-500) 12%, white); }
.chat-avatar { flex: none; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 9999px; background: var(--primary-500); color: #fff; }
.chat-item-text { flex: 1; min-width: 0; }
.chat-item-top, .chat-item-bottom { display: flex; justify-content: space-between; gap: .5rem; align-items: center; }
.chat-item-name { font-weight: 600; font-size: .875rem; color: var(--gray-950); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-item-time { font-size: .75rem; color: var(--gray-500); flex: none; }
.chat-item-preview { font-size: .8125rem; color: var(--gray-500); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-badge { flex: none; min-width: 1.25rem; padding: 0 .375rem; border-radius: 9999px; background: var(--primary-600); color: #fff; font-size: .75rem; font-weight: 600; text-align: center; }
.chat-thread { display: flex; flex-direction: column; min-width: 0; background: #fff; }
.chat-thread-header { padding: .875rem 1.25rem; border-bottom: 1px solid var(--gray-200); }
.chat-thread-title { font-weight: 600; color: var(--gray-950); }
.chat-thread-sub { font-size: .8125rem; color: var(--gray-500); }
.chat-messages { flex: 1; overflow-y: auto; padding: 1rem 1.25rem; display: flex; flex-direction: column; gap: .625rem; }
.chat-message { display: flex; }
.chat-message-mine { justify-content: flex-end; }
.chat-bubble { max-width: 75%; padding: .5rem .75rem; border-radius: .75rem; background: var(--gray-100); color: var(--gray-950); }
.chat-message-mine .chat-bubble { background: color-mix(in oklab, var(--primary-500) 18%, white); }
.chat-author { font-size: .75rem; font-weight: 600; color: var(--gray-600); }
.chat-body { font-size: .875rem; white-space: normal; overflow-wrap: anywhere; }
.chat-time { font-size: .6875rem; color: var(--gray-500); text-align: right; }
.chat-note { margin: auto; color: var(--gray-500); font-size: .875rem; text-align: center; }
.chat-compose { flex: none; display: flex; gap: .75rem; align-items: flex-end; padding: .75rem 1.25rem; border-top: 1px solid var(--gray-200); }
.chat-input { flex: 1; min-width: 0; height: 4.5rem; max-height: 8rem; field-sizing: fixed; resize: none; border: 1px solid var(--gray-300); border-radius: .5rem; padding: .5rem .75rem; font-size: .875rem; background: #fff; color: var(--gray-950); }
.chat-error { padding: 0 1.25rem .5rem; color: var(--danger-600); font-size: .8125rem; }
.chat-readonly { padding: .75rem 1.25rem; border-top: 1px solid var(--gray-200); color: var(--gray-500); font-size: .875rem; }
.dark .chat, .dark .chat-list, .dark .chat-item, .dark .chat-thread-header, .dark .chat-compose, .dark .chat-readonly { border-color: var(--gray-700); }
.dark .chat-list { background: var(--gray-900); }
.dark .chat-thread, .dark .chat-input { background: var(--gray-950); color: #fff; }
.dark .chat-item-name, .dark .chat-thread-title, .dark .chat-bubble { color: #fff; }
.dark .chat-bubble { background: var(--gray-800); }
.dark .chat-message-mine .chat-bubble, .dark .chat-item-active { background: color-mix(in oklab, var(--primary-500) 30%, black); }
@media (max-width: 720px) {
    .chat { grid-template-columns: 1fr; grid-template-rows: auto 1fr; height: 80vh; }
    .chat-list { max-height: 11rem; border-right: 0; border-bottom: 1px solid var(--gray-200); }
}
.chat-compose > button { flex: none; }
