﻿/* Chat styles refatorados para usar variáveis do novo tema */
.avatar { width:40px; height:40px; border-radius:999px; display:flex; align-items:center; justify-content:center; font-size:1rem; }
.avatar-32 { width:32px; height:32px; font-size:.85rem; }
.avatar-40 { width:40px; height:40px; }
.avatar-text { font-weight:600; }

.bg-gradient { background: linear-gradient(140deg,var(--color-primary),var(--color-accent));}

/* Lista de chats */
.chat-list .list-group-item { border-left:0; border-right:0; }
.chat-item:hover { background: var(--color-bg-alt); }
body.dark-mode .chat-item:hover { background:#252c37; }

/* Modal de chat */
.chat-modal { border-radius: var(--radius-lg); overflow:hidden; }

.chat-timeline { background: var(--color-surface-alt); height:70vh; max-height:70vh; overflow-y:auto; padding:16px; }
body.dark-mode .chat-timeline { background:#1d232c; }

/* Linha do tempo */
.msg-row { margin-bottom:8px; display:flex; gap:8px; }
.msg-row.me { justify-content:flex-end; }
.msg-row.you { justify-content:flex-start; }

.bubble { max-width:75%; padding:10px 12px; border-radius:14px; position:relative; font-size:.95rem; box-shadow:0 1px 1px rgba(0,0,0,.05); background:var(--color-surface); border:1px solid var(--color-border); }
.bubble.me { background: #e3f4d7; border-color:#c7e7b4; border-bottom-right-radius:4px; }
.bubble.you { background: var(--color-surface); border-bottom-left-radius:4px; }
body.dark-mode .bubble { background:#252c37; border-color:#303a46; color:var(--color-text); }
body.dark-mode .bubble.me { background:#244b33; border-color:#2f6143; }
body.dark-mode .bubble.you { background:#252c37; }

.bubble .meta { display:block; margin-top:6px; font-size:.7rem; color:var(--color-text-muted); text-align:right; }
body.dark-mode .bubble .meta { color:var(--color-text-faint); }

.bubble .bot-tag { display:inline-block; font-size:.65rem; font-weight:600; background:var(--color-accent); color:#fff; padding:2px 4px; border-radius:4px; margin-bottom:4px; }

.bubble .sender { display:block; font-weight:600; margin-bottom:4px; color:var(--color-text-soft); }
body.dark-mode .bubble .sender { color:var(--color-text-soft); }

.bubble .chat-media { max-width:180px; height:auto; border-radius:10px; display:block; cursor:pointer; margin-top:4px; }
.bubble .audio { display:flex; align-items:center; gap:8px; }
.bubble .audio audio { width:220px; }

/* Destaque temporário */
.bubble.highlighted { animation: chat-highlight 2s ease-in-out; background-color: #fff9d6; }
body.dark-mode .bubble.highlighted { background:#3a4857; }
@keyframes chat-highlight { from { box-shadow:0 0 0 0.5rem rgba(250,204,21,.5);} to { box-shadow:none; } }

/* Scrollbar interno do chat */
.chat-timeline::-webkit-scrollbar { width:8px; }
.chat-timeline::-webkit-scrollbar-thumb { background:var(--color-border-strong); border-radius:6px; }
.chat-timeline::-webkit-scrollbar-thumb:hover { background:var(--color-primary); }
body.dark-mode .chat-timeline::-webkit-scrollbar-thumb { background:#344150; }
body.dark-mode .chat-timeline::-webkit-scrollbar-thumb:hover { background:var(--color-primary); }