/* Chat no padrão dos apps de serviço. Referência: modelos da CometChat inspirados em TaskRabbit, Urban Company, Uber,
   Airbnb e Fiverr (cometchat.com/templates): lista com 2 linhas e foto redonda, duas colunas no computador com as
   informações atrás do ⓘ, balões simples com a hora dentro. Só aparência; carregado por último. */

/* Foto sempre redonda, em qualquer tamanho */
.inbox-app .avatar-wrapper { border-radius: 50%; }
.inbox-app .avatar-wrapper img,
.inbox-app .avatar-wrapper .avatar-initials { width: 100%; height: 100%; border-radius: 50% !important; object-fit: cover; }
.inbox-app .thread .avatar-wrapper img { border: 0 !important; }

/* Lista: nome e hora; prévia e não lidas. Sem terceira linha nem traço colorido */
.inbox-app .thread { gap: 12px; padding: 10px 12px !important; margin: 0 !important; border: 0 !important; border-radius: 14px !important; box-shadow: none !important; }
.inbox-app .thread::before { display: none !important; }
.inbox-app .thread--active { background: var(--chat-surface-2) !important; box-shadow: none !important; }
.inbox-app .thread__info { gap: 2px; }
.inbox-app .thread__head strong { font-size: 15px; font-weight: 700; }
.inbox-app .thread__head span { font-size: 12px; color: var(--chat-text-dim); }
.inbox-app .thread__info p { font-size: 13.5px; line-height: 1.35; color: var(--chat-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-app .thread small { display: none; }
.inbox-app .thread em { background: var(--chat-gold); color: #1a1426; font-style: normal; font-weight: 800; }

/* ⓘ no computador também: abre e fecha o painel de informações */
.inbox-app .chat-head__context-btn { display: inline-flex !important; align-items: center; justify-content: center; }

/* Balões: os meus na cor da marca, os do outro neutros, hora dentro */
.inbox-app .bubble { border-radius: 14px; }
.inbox-app .bubble--in { border-bottom-left-radius: 14px; }
.inbox-app .bubble--out { border-bottom-right-radius: 14px; }
.inbox-app .bubble::before { display: none !important; }

/* Evento do sistema: frase pequena e centralizada, sem caixa (não compete com as mensagens) */
.inbox-app .bubble--system {
    max-width: min(520px, 88%);
    padding: 2px 8px !important;
    margin: 12px auto !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--chat-text-muted) !important;
    font-size: 13px !important;
    font-weight: 500;
    line-height: 1.4;
}
.inbox-app .bubble--system p { color: inherit; font-size: inherit; }
.inbox-app .bubble--system.bubble--system--alert { border: 0 !important; background: transparent !important; color: var(--chat-gold) !important; }

/* Linhas discretas ("Sobre o seu pedido", "Versão antiga"): ícone ao lado do texto */
.inbox-app .bubble--offer--ghost {
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 6px;
    align-self: center;
    width: auto !important;
    max-width: 92%;
    margin: 8px auto !important;
    padding: 2px 8px !important;
    font-size: 13px;
    line-height: 1.35;
    text-align: left;
}
.inbox-app .bubble--offer--ghost .material-symbols-rounded { flex: none; font-size: 16px; }

/* Faixa do pedido sem contorno */
.inbox-app .contract-top-bar { border: 0 !important; box-shadow: none !important; }

/* Painel de informações: dados em linhas, ações como lista */
.inbox-app .context-section__title { margin-bottom: 8px; font-size: 13px; font-weight: 700; color: var(--chat-text-dim); text-transform: none; letter-spacing: 0; }
.inbox-app .metric-row { align-items: baseline; gap: 12px; padding: 6px 0; }
.inbox-app .metric-label { font-size: 13.5px; color: var(--chat-text-muted); white-space: nowrap; }
.inbox-app .metric-value { min-width: 0; font-size: 13.5px; font-weight: 600; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-app #chat-sidebar-actions { display: grid; gap: 2px; }
.inbox-app #chat-sidebar-actions button,
.inbox-app #chat-sidebar-actions a { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 0 10px; border: 0 !important; border-radius: 10px; background: transparent !important; box-shadow: none !important; font-size: 14px; font-weight: 600; text-align: left; justify-content: flex-start; }
.inbox-app #chat-sidebar-actions button:hover,
.inbox-app #chat-sidebar-actions a:hover { background: var(--chat-surface-2) !important; }

@media (max-width: 1100px) {
    .inbox-app .thread { border-radius: 0 !important; }
    .inbox-app .thread--active { background: transparent !important; }
    .inbox-app .bubble--offer--ghost { flex-wrap: wrap; }
}

/* Computador sem o painel: a conversa ocupa todo o espaço */
@media (min-width: 1101px) {
    .inbox-app.inbox-app--no-context { grid-template-columns: var(--inbox-sidebar-w, 300px) minmax(0, 1fr) !important; }
    .inbox-app.inbox-app--no-context .inbox-chat { width: 100%; max-width: none; grid-column: 2; }
    .inbox-app.inbox-app--no-context .inbox-context { display: none !important; }
}
