/* Complemento do style.css para o chat próprio */
.conversa { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--fundo-chat); position: relative; }

.msg { position: relative; white-space: pre-wrap; }
.msg.user { background: var(--roxo); color: #fff; }
.msg.agente { align-self: flex-start; background: #fff; border: 1px solid var(--borda); border-bottom-left-radius: 6px; }
.msg.sistema { align-self: center; background: transparent; color: var(--texto-suave); font-size: 12.5px; padding: 4px 10px; text-align: center; }
.msg a { color: inherit; text-decoration: underline; word-break: break-all; }
.msg .hora { display: block; margin-top: 4px; font-size: 10.5px; opacity: .65; text-align: right; }
.msg .hora .chk { margin-left: 4px; }
.msg.falhou { background: #FDECEC; color: var(--erro); border: 1px solid #F5C6C6; }
.msg.enviando { opacity: .7; }

.msg .midia-img { display: block; max-width: 100%; max-height: 320px; border-radius: 12px; cursor: zoom-in; background: rgba(0,0,0,.05); }
.msg .midia-video { display: block; max-width: 100%; max-height: 320px; border-radius: 12px; background: #000; }
.msg audio { display: block; width: 240px; max-width: 100%; height: 40px; }
.msg .legenda { display: block; margin-top: 6px; }
.msg .arquivo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; padding: 4px 2px; }
.msg .arquivo .ico { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,201,40,.25); font-size: 18px; }
.msg.user .arquivo .ico { background: rgba(255,255,255,.18); }
.msg .arquivo .nome { font-weight: 600; font-size: 14px; word-break: break-word; }
.msg .arquivo .tam { display: block; font-size: 11.5px; opacity: .7; font-weight: 400; }
.msg .progresso { height: 4px; border-radius: 2px; background: rgba(255,255,255,.3); margin-top: 8px; overflow: hidden; }
.msg .progresso i { display: block; height: 100%; width: 0; background: var(--amarelo); transition: width .2s; }

.composer textarea {
  flex: 1; min-width: 0; border: 0; outline: 0; resize: none; font: inherit; font-size: 16px; line-height: 1.4;
  background: transparent; color: var(--texto); padding: 11px 0; height: 44px; min-height: 44px; max-height: 120px; box-sizing: border-box;
}
.composer input[type=text] { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 16px; background: transparent; color: var(--texto); padding: 8px 0; }
#formMsg { padding-left: 6px; border-radius: 26px; align-items: flex-end; }
#formMsg .send, #formMsg .icon-btn { align-self: flex-end; }
#formMsg .send, #formMsg .icon-btn { margin-bottom: 0; }
.icon-btn { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: var(--roxo-claro); font-size: 21px; transition: background .2s; }
.icon-btn:hover { background: #F1EAFB; }

.gravando { justify-content: flex-start; gap: 12px; padding-left: 6px; }
.rec-dot { width: 12px; height: 12px; border-radius: 50%; background: #E53935; animation: pulsar 1s infinite; }
.rec-tempo { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--texto); }
.rec-label { flex: 1; color: var(--texto-suave); font-size: 14px; }
@keyframes pulsar { 50% { opacity: .3; } }

.aviso-conexao { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); background: var(--roxo-escuro); color: #fff; font-size: 12px; padding: 5px 12px; border-radius: 999px; z-index: 3; }

.visualizador { position: fixed; inset: 0; z-index: 50; background: rgba(15, 5, 30, .92); display: grid; place-items: center; cursor: zoom-out; padding: 16px; }
.visualizador img { max-width: 100%; max-height: 100%; border-radius: 8px; }

.chat-header .hd-btn { margin-left: 4px; }

.ico-inline { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--roxo); color: #fff; vertical-align: -5px; margin: 0 2px; }
.ico-inline svg { width: 14px; height: 14px; }

.separador-dia { align-self: center; margin: 8px 0 2px; }
.separador-dia span { display: inline-block; font-size: 11.5px; font-weight: 600; color: var(--texto-suave); background: #EAE3F5; padding: 3px 12px; border-radius: 999px; }

.btn-novas { position: absolute; left: 50%; transform: translateX(-50%); bottom: 96px; z-index: 4;
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px;
  background: var(--roxo); color: #fff; font-size: 13px; font-weight: 600; box-shadow: 0 6px 18px rgba(46,15,92,.35); animation: pop .25s ease; }
.btn-novas svg { width: 16px; height: 16px; }
.btn-novas[hidden] { display: none !important; }

.historico-titulo span { background: var(--roxo); color: #fff; }
