/* ============================================================================
   Chat interno — sidebar + thread + bubbles + composer.
   Modern flat: fundo neutro, bubbles bem arredondadas (radius 14px) com canto
   vivo (4px) no lado do sender. Cor primária do projeto pras enviadas. Status
   online/offline como dot 11px sobreposto no canto do avatar.
   Tokens: usa apenas variáveis definidas em tokens.css. Versões antigas usavam
   --wt-surface / --wt-surface-2 / --wt-fg-muted que não existem (silenciosamente
   transparente). Agora usa --wt-card / --wt-bg-2 / --wt-bg-3 / --wt-fg-3.
   ============================================================================ */

.wt-chat-page {
    display: grid;
    grid-template-columns: 320px 1fr;
    height: 100%;
    min-height: 0;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */

.wt-chat-sidebar {
    border-right: 1px solid var(--wt-border);
    overflow-y: auto;
    background: var(--wt-card);
}

.wt-chat-sidebar-search {
    padding: 8px;
    border-bottom: 1px solid var(--wt-border);
}
.wt-chat-sidebar-search input {
    width: 100%;
    padding: 6px 10px;
    border-radius: var(--wt-r-sm);
    border: 1px solid var(--wt-border);
    background: var(--wt-bg-2);
    color: var(--wt-fg);
    font-size: 13px;
}

.wt-chat-sidebar-section-title {
    padding: 10px 12px 6px;
    font-size: 10px;
    text-transform: uppercase;
    color: var(--wt-fg-3);
    letter-spacing: 0.06em;
    font-weight: 600;
}

.wt-chat-sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wt-chat-sidebar-row {
    width: 100%;
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    background: transparent;
    border: 0;
    cursor: pointer;
    text-align: left;
}
.wt-chat-sidebar-row:hover {
    background: var(--wt-bg-3);
}
li.is-selected .wt-chat-sidebar-row {
    background: var(--wt-primary-soft);
}

/* Avatar wrapper precisa de position:relative pro pseudo-elemento do status dot. */
.wt-chat-sidebar-avatar {
    position: relative;
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
}
.wt-chat-sidebar-avatar .wt-avatar {
    width: 100%;
    height: 100%;
}
.wt-chat-sidebar-avatar::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 2px solid var(--wt-card);
    background: var(--wt-fg-4);
}
.wt-chat-sidebar-avatar.is-online::after {
    background: var(--wt-success);
}
/* Quando o item está selecionado, o ring do dot deve combinar com o fundo destacado. */
li.is-selected .wt-chat-sidebar-avatar::after {
    border-color: var(--wt-primary-soft);
}

/* Versão menor pro card "Iniciar conversa" (sem time, sem preview) */
.wt-chat-sidebar-row.is-compact {
    padding: 6px 12px;
}
.wt-chat-sidebar-row.is-compact .wt-chat-sidebar-avatar {
    width: 32px;
    height: 32px;
}

.wt-chat-sidebar-row-body {
    flex: 1;
    min-width: 0;
}

.wt-chat-sidebar-row-line1 {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    align-items: baseline;
}
.wt-chat-sidebar-row-line2 {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    align-items: center;
    margin-top: 1px;
}

.wt-chat-sidebar-row-name {
    font-weight: 600;
    color: var(--wt-fg);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wt-chat-sidebar-row-time {
    color: var(--wt-fg-3);
    font-size: 10.5px;
    flex-shrink: 0;
}

.wt-chat-sidebar-row-preview {
    flex: 1;
    color: var(--wt-fg-3);
    font-size: 11.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wt-chat-sidebar-row-unread {
    background: var(--wt-primary);
    color: white;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
    flex-shrink: 0;
}

/* ── Thread (right pane) ─────────────────────────────────────────────────── */

.wt-chat-thread {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    background: var(--wt-bg);
    height: 100%;
}

.wt-chat-thread-head {
    padding: 10px 14px;
    border-bottom: 1px solid var(--wt-border);
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--wt-card);
}

.wt-chat-thread-head-avatar {
    position: relative;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
}
.wt-chat-thread-head-avatar .wt-avatar {
    width: 100%;
    height: 100%;
}
.wt-chat-thread-head-avatar::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--wt-card);
    background: var(--wt-fg-4);
}
.wt-chat-thread-head-avatar.is-online::after {
    background: var(--wt-success);
}

.wt-chat-thread-head-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.wt-chat-thread-head-name {
    font-weight: 600;
    font-size: 13.5px;
    color: var(--wt-fg);
}
.wt-chat-thread-head-status {
    font-size: 11px;
    margin-top: 1px;
}
.wt-chat-thread-head-status.is-ok {
    color: var(--wt-success);
}
.wt-chat-thread-head-status.is-off {
    color: var(--wt-fg-3);
}

/* ── Mensagens area ──────────────────────────────────────────────────────── */

.wt-chat-thread-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: var(--wt-bg-2);
}

.wt-chat-thread-typing {
    color: var(--wt-fg-3);
    font-size: 12px;
    font-style: italic;
    padding: 6px 12px;
}
.wt-chat-thread-loading {
    text-align: center;
    color: var(--wt-fg-3);
    padding: 8px;
    font-size: 12px;
}

/* ── Day chip (separador de data) ────────────────────────────────────────── */

.wt-chat-day-chip {
    align-self: center;
    background: var(--wt-card);
    border: 1px solid var(--wt-border);
    color: var(--wt-fg-3);
    font-size: 10.5px;
    padding: 3px 10px;
    border-radius: 999px;
    margin: 10px 0 6px;
}

/* ── Bubble row + avatar inline ──────────────────────────────────────────── */

.wt-chat-bubble-row {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}
.wt-chat-bubble-row.is-own {
    justify-content: flex-end;
}
.wt-chat-bubble-row.is-continuation {
    margin-top: 0;
}
.wt-chat-bubble-row:not(.is-continuation) {
    margin-top: 8px;
}

.wt-chat-bubble-avatar {
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
}
.wt-chat-bubble-avatar .wt-avatar {
    width: 100%;
    height: 100%;
}
.wt-chat-bubble-avatar-spacer {
    width: 28px;
    flex: 0 0 auto;
}

/* ── Bubble ──────────────────────────────────────────────────────────────── */

.wt-chat-bubble {
    max-width: 70%;
    padding: 7px 11px;
    border-radius: 14px;
    position: relative;
    font-size: 13px;
    line-height: 1.4;
}

/* Recebida */
.wt-chat-bubble-row:not(.is-own) .wt-chat-bubble {
    background: var(--wt-card);
    border: 1px solid var(--wt-border);
    color: var(--wt-fg);
    border-bottom-left-radius: 4px;
}
.wt-chat-bubble-row:not(.is-own).is-continuation .wt-chat-bubble {
    border-top-left-radius: 4px;
}

/* Enviada */
.wt-chat-bubble-row.is-own .wt-chat-bubble {
    background: var(--wt-primary);
    color: white;
    border-bottom-right-radius: 4px;
}
.wt-chat-bubble-row.is-own.is-continuation .wt-chat-bubble {
    border-top-right-radius: 4px;
}

.wt-chat-bubble.is-deleted {
    color: var(--wt-fg-3);
    font-style: italic;
}

.wt-chat-bubble-deleted {
    font-style: italic;
    color: var(--wt-fg-3);
    font-size: 12px;
}

/* Reply quote (citação dentro da bubble) */
.wt-chat-bubble-reply {
    border-left: 3px solid var(--wt-primary);
    padding: 4px 6px;
    font-size: 11.5px;
    opacity: 0.85;
    margin-bottom: 4px;
    background: var(--wt-bg-2);
    border-radius: 6px;
    color: var(--wt-fg);
}
.wt-chat-bubble-row.is-own .wt-chat-bubble-reply {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-left-color: rgba(255, 255, 255, 0.6);
}
.wt-chat-bubble-reply-name { font-weight: 600; display: block; }

/* Attachments */
.wt-chat-bubble-image {
    max-width: min(280px, 100%);
    max-height: 280px;
    border-radius: 8px;
    display: block;
    margin-top: 2px;
    object-fit: contain;
    cursor: zoom-in;
}
.wt-chat-bubble-audio {
    max-width: 100%;
    width: 240px;
    display: block;
    margin-top: 2px;
}
.wt-chat-bubble-doc {
    display: inline-block;
    padding: 6px 10px;
    background: var(--wt-bg-2);
    border-radius: 6px;
    color: var(--wt-fg);
    font-size: 12px;
    text-decoration: none;
    margin-top: 2px;
}
.wt-chat-bubble-row.is-own .wt-chat-bubble-doc {
    background: rgba(255, 255, 255, 0.18);
    color: white;
}

.wt-chat-bubble-text {
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Meta line (time + ✓✓ + edited) */
.wt-chat-bubble-meta {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: flex-end;
    margin-top: 3px;
    font-size: 9.5px;
    opacity: 0.65;
}
.wt-chat-bubble-row.is-own .wt-chat-bubble-meta {
    color: rgba(255, 255, 255, 0.95);
    opacity: 0.85;
}
.wt-chat-bubble-ticks.is-read {
    color: oklch(0.78 0.14 230);
}

/* Reactions */
.wt-chat-bubble-reactions {
    display: flex;
    gap: 4px;
    margin-top: 4px;
}
.wt-chat-bubble-reaction-chip {
    background: var(--wt-card);
    border: 1px solid var(--wt-border);
    border-radius: 999px;
    padding: 1px 6px;
    font-size: 11px;
    cursor: pointer;
}

/* Hover menu (responder/reagir/editar/apagar) */
.wt-chat-bubble-menu {
    position: absolute;
    top: -28px;
    right: 0;
    display: flex;
    gap: 2px;
    background: var(--wt-card);
    border: 1px solid var(--wt-border);
    border-radius: 6px;
    padding: 2px;
    box-shadow: var(--wt-shadow-lg);
}
.wt-chat-bubble-menu button {
    width: 24px;
    height: 24px;
    background: transparent;
    border: 0;
    cursor: pointer;
    font-size: 12px;
    color: var(--wt-fg);
}
.wt-chat-bubble-menu button:hover {
    background: var(--wt-bg-3);
}

/* ── Composer (pílula) ───────────────────────────────────────────────────── */

.wt-chat-composer {
    padding: 10px 14px;
    background: var(--wt-card);
    border-top: 1px solid var(--wt-border);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Banner de reply/edit acima da pílula */
.wt-chat-composer-mode {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: var(--wt-bg-3);
    border-left: 3px solid var(--wt-primary);
    border-radius: 8px;
    font-size: 12px;
    color: var(--wt-fg);
}
.wt-chat-composer-mode button {
    background: transparent;
    border: 0;
    color: var(--wt-fg-3);
    cursor: pointer;
    font-size: 13px;
}
.wt-chat-composer-mode button:hover {
    color: var(--wt-fg);
}

/* Preview de anexos antes de mandar */
.wt-chat-composer-attachments {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.wt-chat-composer-attachment {
    position: relative;
}
.wt-chat-composer-attachment img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}
.wt-chat-composer-attachment span {
    display: inline-block;
    padding: 18px 10px;
    background: var(--wt-bg-3);
    border-radius: 8px;
    font-size: 11px;
    color: var(--wt-fg-3);
}
.wt-chat-composer-attachment button {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: var(--wt-fg);
    color: var(--wt-bg);
    border: 0;
    cursor: pointer;
    font-size: 10px;
    line-height: 1;
}

/* A pílula em si: input + botões inline, border-radius alto */
.wt-chat-composer-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--wt-bg-2);
    border: 1px solid var(--wt-border);
    border-radius: 22px;
    padding: 4px 6px 4px 10px;
    transition: border-color 0.15s;
}
.wt-chat-composer-pill:focus-within {
    border-color: var(--wt-primary);
}

.wt-chat-composer-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: transparent;
    border: 0;
    cursor: pointer;
    color: var(--wt-fg-3);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.wt-chat-composer-btn:hover {
    background: var(--wt-bg-3);
    color: var(--wt-fg);
}

.wt-chat-composer-input {
    flex: 1;
    resize: none;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--wt-fg);
    font-size: 13.5px;
    line-height: 1.4;
    min-height: 22px;
    max-height: 120px;
    padding: 4px 0;
    font-family: inherit;
}
.wt-chat-composer-input::placeholder {
    color: var(--wt-fg-3);
}

/* O botão send é primary circle; substitui o mic quando há texto */
.wt-chat-composer-send {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--wt-primary);
    color: white;
    border: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    flex-shrink: 0;
}
.wt-chat-composer-send:hover {
    background: var(--wt-primary-hover);
}
.wt-chat-composer-send:disabled {
    background: var(--wt-bg-3);
    color: var(--wt-fg-3);
    cursor: not-allowed;
}

/* Emoji picker — popup acima do botão emoji */
.wt-chat-composer-emoji-wrap {
    position: relative;
    display: inline-flex;
}
.wt-chat-composer-emoji-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
}
.wt-chat-composer-emoji-popup {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    z-index: 50;
    width: 260px;
    padding: 6px;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 2px;
    background: var(--wt-card);
    border: 1px solid var(--wt-border);
    border-radius: 10px;
    box-shadow: var(--wt-shadow-lg);
}
.wt-chat-composer-emoji-cell {
    width: 36px;
    height: 36px;
    font-size: 20px;
    line-height: 36px;
    background: transparent;
    border: 0;
    cursor: pointer;
    border-radius: 6px;
    text-align: center;
    padding: 0;
}
.wt-chat-composer-emoji-cell:hover {
    background: var(--wt-bg-3);
}

/* ── Empty state (nenhuma conversa selecionada) ──────────────────────────── */

.wt-chat-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--wt-fg-3);
    font-size: 14px;
}

/* ============================================================================
   Menu suspenso do botão "Fechar" na header do painel de atendimento.
   Padrão visual herdado do wt-wa-status-popup (mesmo backdrop + popup ancorado).
   ============================================================================ */

.painel-close-menu-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.painel-close-menu-trigger {
    gap: 6px;
}

.painel-close-menu-caret {
    margin-left: 2px;
    opacity: 0.85;
}

.painel-close-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 199;
    background: transparent;
}

.painel-close-menu-popup {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 200;
    min-width: 260px;
    background: var(--wt-card);
    border: 1px solid var(--wt-border);
    border-radius: 10px;
    box-shadow: var(--wt-shadow-lg);
    overflow: hidden;
    padding: 4px 0;
}

.painel-close-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 14px;
    background: transparent;
    border: 0;
    text-align: left;
    font-size: 13px;
    color: var(--wt-fg);
    cursor: pointer;
    transition: background 0.12s;
}

.painel-close-menu-item:hover:not(:disabled) {
    background: var(--wt-bg-2);
}

.painel-close-menu-item:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.painel-close-menu-item svg {
    flex-shrink: 0;
    color: var(--wt-fg-3);
}

/* ===== Grupos: botao novo grupo na sidebar ===== */
.wt-chat-sidebar-search { display: flex; gap: 6px; align-items: center; }
.wt-chat-sidebar-search input { flex: 1; min-width: 0; }
.wt-chat-sidebar-newgroup {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--wt-border);
    border-radius: var(--wt-r-sm);
    background: var(--wt-bg-2);
    color: var(--wt-fg-2);
    cursor: pointer;
}
.wt-chat-sidebar-newgroup:hover { background: var(--wt-bg-3); color: var(--wt-fg); }

/* ===== Grupos: modal de criacao ===== */
.wt-chat-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
}
.wt-chat-modal {
    width: min(420px, calc(100vw - 32px));
    max-height: min(560px, calc(100vh - 64px));
    display: flex;
    flex-direction: column;
    border-radius: var(--wt-r-lg);
    border: 1px solid var(--wt-border);
    background: var(--wt-bg);
    color: var(--wt-fg);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}
.wt-chat-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    font-weight: 600;
    border-bottom: 1px solid var(--wt-border);
}
.wt-chat-modal-close {
    border: none;
    background: transparent;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    color: var(--wt-fg-3);
}
.wt-chat-modal-close:hover { color: var(--wt-fg); }
.wt-chat-modal-body {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
}
.wt-chat-modal-label { font-size: 11px; font-weight: 600; color: var(--wt-fg-3); margin-top: 6px; text-transform: uppercase; letter-spacing: 0.04em; }
.wt-chat-modal-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--wt-border);
    border-radius: var(--wt-r-sm);
    background: var(--wt-bg-2);
    color: var(--wt-fg);
    font-size: 13px;
}
.wt-chat-modal-userlist {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid var(--wt-border);
    border-radius: var(--wt-r-sm);
}
.wt-chat-modal-userrow {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 6px 10px;
    border: none;
    background: transparent;
    color: var(--wt-fg);
    cursor: pointer;
    text-align: left;
    font-size: 13px;
}
.wt-chat-modal-userrow:hover { background: var(--wt-bg-2); }
.wt-chat-modal-userrow.is-selected { background: var(--wt-primary-soft); }
.wt-chat-modal-username { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wt-chat-modal-usercheck { color: var(--wt-primary); font-weight: 700; width: 16px; }
.wt-chat-modal-error { color: var(--wt-danger); font-size: 12px; }
.wt-chat-modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--wt-border);
}
.wt-chat-modal-btn {
    padding: 8px 14px;
    border-radius: var(--wt-r-sm);
    border: 1px solid var(--wt-border);
    background: var(--wt-bg-2);
    color: var(--wt-fg);
    cursor: pointer;
    font-size: 13px;
}
.wt-chat-modal-btn:hover { background: var(--wt-bg-3); }
.wt-chat-modal-btn.is-primary {
    background: var(--wt-primary);
    border-color: var(--wt-primary);
    color: #fff;
}
.wt-chat-modal-btn.is-primary:hover { background: var(--wt-primary-hover); }
.wt-chat-modal-btn.is-danger { border-color: var(--wt-danger); color: var(--wt-danger); background: transparent; }
.wt-chat-modal-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== Grupos: mensagens de sistema ===== */
.wt-chat-system-msg {
    align-self: center;
    margin: 6px auto;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--wt-bg-3);
    color: var(--wt-fg-3);
    font-size: 11px;
    text-align: center;
    max-width: 80%;
}

/* ===== Grupos: nome do remetente no bubble ===== */
.wt-chat-bubble-sender {
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 2px;
    background: transparent !important; /* GetAvatarVariant pinta background; aqui so queremos a cor do texto */
    padding: 0;
}

/* ===== Grupos: header da thread ===== */
.wt-chat-thread-head-members {
    border: none;
    background: transparent;
    color: var(--wt-fg-3);
    font-size: 12px;
    cursor: pointer;
    padding: 0;
    text-align: left;
}
.wt-chat-thread-head-members:hover { color: var(--wt-fg); text-decoration: underline; }

/* ===== Grupos: painel de membros ===== */
.wt-chat-members-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: flex-end;
}
.wt-chat-members-panel {
    width: min(360px, 90vw);
    height: 100%;
    background: var(--wt-bg);
    color: var(--wt-fg);
    border-left: 1px solid var(--wt-border);
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    overflow-y: auto;
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.2);
}
.wt-chat-members-head { display: flex; align-items: center; gap: 8px; }
.wt-chat-members-title { flex: 1; font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wt-chat-members-subtitle { font-size: 12px; color: var(--wt-fg-3); }
.wt-chat-members-add {
    border: 1px dashed var(--wt-border);
    border-radius: var(--wt-r-sm);
    background: transparent;
    color: var(--wt-fg-2);
    padding: 8px;
    cursor: pointer;
    font-size: 13px;
}
.wt-chat-members-add:hover { background: var(--wt-bg-2); color: var(--wt-fg); }
.wt-chat-members-list { list-style: none; margin: 0; padding: 0; flex: 1; }
.wt-chat-members-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.wt-chat-members-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.wt-chat-members-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--wt-primary-soft);
    color: var(--wt-primary);
}
.wt-chat-members-rowactions { display: flex; gap: 4px; }
.wt-chat-members-action {
    border: none;
    background: transparent;
    color: var(--wt-fg-3);
    cursor: pointer;
    padding: 2px 4px;
    font-size: 13px;
}
.wt-chat-members-action:hover { color: var(--wt-fg); }
.wt-chat-members-action.is-danger:hover { color: var(--wt-danger); }
.wt-chat-members-foot {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--wt-border);
}

/* ===== Grupos: modal de confirmacao inline (substitui confirm() nativo) ===== */
.wt-chat-confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 1100;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}
.wt-chat-confirm {
    width: min(340px, calc(100vw - 32px));
    background: var(--wt-bg);
    color: var(--wt-fg);
    border: 1px solid var(--wt-border);
    border-radius: var(--wt-r-lg);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.wt-chat-confirm-text { font-size: 14px; line-height: 1.45; }
