/* =========================================================
   Módulo WhatsApp — inbox unificado (dentro do Artefato)
   Usa container queries: o layout se adapta à largura do
   painel (lado a lado, tela cheia ou mobile).
   ========================================================= */
.wa {
  --wa-bg: #f3f3f2; --wa-panel: #fff; --wa-line: rgb(0 0 0 / .07);
  --wa-in: #fff; --wa-out: #ece7fd; --wa-muted: #737373;
  --wa-hover: rgb(0 0 0 / .035); --wa-active: rgb(0 0 0 / .06);
  --wa-accent: #7c3aed; --wa-read: #0ea5e9; --wa-dot: rgb(0 0 0 / .045);
  position: absolute; inset: 0; display: flex; overflow: hidden;
  container-type: inline-size; container-name: wa;
  background: var(--wa-panel); font-size: 14px;
}
.dark .wa {
  --wa-bg: #141414; --wa-panel: #1b1b1b; --wa-line: rgb(255 255 255 / .07);
  --wa-in: #262626; --wa-out: #33285a; --wa-muted: #a3a3a3;
  --wa-hover: rgb(255 255 255 / .04); --wa-active: rgb(255 255 255 / .07);
  --wa-accent: #a78bfa; --wa-read: #38bdf8; --wa-dot: rgb(255 255 255 / .035);
}

/* ---------- Lista ---------- */
.wa-list { width: 360px; flex-shrink: 0; display: flex; flex-direction: column; border-right: 1px solid var(--wa-line); background: var(--wa-panel); }
.wa-list-head { padding: 12px 12px 6px; display: flex; flex-direction: column; gap: 10px; }
.wa-numsel-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px; border-radius: 12px;
  border: 1px solid var(--wa-line); font-size: 13.5px; font-weight: 500; text-align: left;
  transition: background-color .2s, border-color .2s;
}
.wa-numsel-btn:hover { background: var(--wa-hover); }
.wa-numsel-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.wa-numsel-btn .chev { transition: transform .3s var(--ease-out); margin-left: auto; }
.wa-dots { display: inline-flex; }
.wa-dots i { height: 12px; width: 12px; border-radius: 999px; background: var(--n); border: 2px solid var(--wa-panel); transition: opacity .25s, transform .3s var(--ease-out); }
.wa-dots i + i { margin-left: -4px; }
.wa-dots i.off { opacity: .2; transform: scale(.8); }

.wa-search { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 10px; background: var(--wa-hover); transition: box-shadow .2s, background-color .2s; }
.wa-search:focus-within { background: var(--wa-panel); box-shadow: 0 0 0 1px rgb(139 92 246 / .5), 0 0 0 4px rgb(139 92 246 / .1); }
.wa-search input { flex: 1; min-width: 0; background: transparent; outline: none; font-size: 13.5px; }
.wa-search input::placeholder { color: rgb(163 163 163); }
.wa-search input::-webkit-search-cancel-button { display: none; }

.wa-chips { display: flex; gap: 6px; overflow-x: auto; }
.wa-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; white-space: nowrap;
  font-size: 13px; background: var(--wa-hover); color: var(--wa-muted); transition: background-color .2s, color .2s, transform .15s;
}
.wa-chip b { font-weight: 600; font-size: 11px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--wa-accent); color: #fff; }
.wa-chip:hover { color: inherit; }
.wa-chip:active { transform: scale(.96); }
.wa-chip.active { background: rgb(124 58 237 / .12); color: var(--wa-accent); font-weight: 500; }

.wa-convs { flex: 1; overflow-y: auto; padding: 4px 6px 10px; }
.wa-conv {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 10px; border-radius: 12px; text-align: left;
  transition: background-color .15s; animation: fade-in .3s var(--ease-out) both;
}
.wa-conv:hover { background: var(--wa-hover); }
.wa-conv.active { background: var(--wa-active); }
.wa-conv-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.wa-conv-top, .wa-conv-bottom { display: flex; align-items: center; gap: 6px; min-width: 0; }
.wa-conv-name { font-size: 14.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-conv-time { margin-left: auto; font-size: 11.5px; color: var(--wa-muted); white-space: nowrap; }
.wa-conv.unread .wa-conv-time { color: var(--wa-accent); font-weight: 600; }
.wa-conv-preview { flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--wa-muted); }
.wa-conv.unread .wa-conv-preview { color: inherit; }
.wa-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; font-size: 11px; font-weight: 600; background: var(--wa-accent); color: #fff; animation: pop-in .3s var(--ease-out); }
.dark .wa-badge { color: #1b1b1b; }
.wa-typing-txt { color: var(--wa-accent); font-weight: 500; }

.wa-numtag {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 4px; height: 18px; padding: 0 7px 0 6px; border-radius: 999px;
  font-size: 10.5px; font-weight: 600; letter-spacing: .01em; white-space: nowrap;
  color: var(--n); background: color-mix(in srgb, var(--n) 13%, transparent);
}
.wa-numtag::before { content: ''; height: 6px; width: 6px; border-radius: 999px; background: var(--n); }
.wa-numtag.lg { height: 26px; padding: 0 12px 0 10px; font-size: 12px; }
.wa-numdot { height: 10px; width: 10px; border-radius: 999px; background: var(--n); flex-shrink: 0; box-shadow: 0 0 0 3px color-mix(in srgb, var(--n) 20%, transparent); }

.wa-empty-list { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 48px 20px; text-align: center; color: var(--wa-muted); font-size: 13.5px; animation: fade-in .3s; }

/* Avatar */
.wa-avatar {
  flex-shrink: 0; display: grid; place-items: center; height: 46px; width: 46px; border-radius: 999px;
  font-size: 15px; font-weight: 600; color: #fff; background: var(--c, #a3a3a3);
  background-image: linear-gradient(135deg, rgb(255 255 255 / .18), transparent);
}
.wa-avatar.group { background: var(--wa-active); color: var(--wa-muted); }
.wa-chat-head .wa-avatar { height: 40px; width: 40px; font-size: 14px; }
.wa-avatar.xl { height: 104px; width: 104px; font-size: 34px; }
.wa-contact .wa-avatar { height: 42px; width: 42px; }

/* ---------- Conversa ---------- */
.wa-chat { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--wa-bg); }
.wa-chat-inner { position: absolute; inset: 0; display: flex; flex-direction: column; }
.wa-welcome {
  margin: auto; max-width: 420px; padding: 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px;
  animation: fade-up .5s var(--ease-out) both;
}
.wa-welcome-art { display: grid; place-items: center; height: 84px; width: 84px; border-radius: 28px; margin-bottom: 6px;
  background: linear-gradient(135deg, rgb(139 92 246 / .16), rgb(14 165 233 / .16)); color: var(--wa-accent); }
.wa-welcome h3 { font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.wa-welcome p { font-size: 14px; line-height: 1.6; color: var(--wa-muted); }
.wa-welcome-nums { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 8px; }

.wa-chat-head {
  display: flex; align-items: center; gap: 6px; height: 62px; padding: 0 10px 0 12px; flex-shrink: 0;
  background: var(--wa-panel); border-bottom: 1px solid var(--wa-line); z-index: 3;
}
.wa-back { display: none; }
.wa-chat-who { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 4px 6px; border-radius: 12px; transition: background-color .15s; }
.wa-chat-who:hover { background: var(--wa-hover); }
.wa-status { display: block; font-size: 12.5px; color: var(--wa-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46cqw; }
.wa-liloo-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; margin-right: 4px; border-radius: 999px;
  font-size: 13px; font-weight: 500; color: var(--wa-accent);
  background: linear-gradient(135deg, rgb(139 92 246 / .12), rgb(14 165 233 / .12)); transition: transform .15s var(--ease-out), filter .2s;
}
.wa-liloo-btn:hover { filter: brightness(1.05) saturate(1.2); }
.wa-liloo-btn:active { transform: scale(.96); }

.wa-pinned { display: none; align-items: center; gap: 6px; padding: 6px 8px 6px 14px; background: var(--wa-panel); border-bottom: 1px solid var(--wa-line); z-index: 2; }
.wa-pinned.show { display: flex; animation: fade-in .3s; }
.wa-pinned-main { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; text-align: left; }

.wa-msgs {
  flex: 1; overflow-y: auto; padding: 10px 0 14px;
  background-image: radial-gradient(var(--wa-dot) 1.2px, transparent 1.2px); background-size: 20px 20px;
}
.wa-msgs.wa-fade { animation: fade-in .35s var(--ease-out); }
.wa-encrypt {
  display: flex; align-items: center; justify-content: center; gap: 6px; width: fit-content; max-width: 86%; margin: 6px auto 10px; padding: 6px 12px;
  border-radius: 10px; font-size: 12px; text-align: center; color: var(--wa-muted); background: var(--wa-panel); box-shadow: 0 1px 1px rgb(0 0 0 / .04);
}
.wa-day { position: sticky; top: 6px; z-index: 2; display: flex; justify-content: center; margin: 12px 0 8px; pointer-events: none; }
.wa-day span { padding: 5px 12px; border-radius: 9px; font-size: 12px; font-weight: 500; color: var(--wa-muted); background: var(--wa-panel); box-shadow: 0 1px 2px rgb(0 0 0 / .06); }
.wa-unread-sep { margin: 10px 0; padding: 6px; text-align: center; background: color-mix(in srgb, var(--wa-panel) 70%, transparent); }
.wa-unread-sep span { font-size: 12px; font-weight: 500; color: var(--wa-accent); background: var(--wa-panel); padding: 4px 12px; border-radius: 999px; }

/* Linhas e balões */
.wa-row { position: relative; display: flex; align-items: center; gap: 6px; padding: 1px 6%; }
.wa-row.in { justify-content: flex-start; }
.wa-row.out { justify-content: flex-end; flex-direction: row-reverse; }
.wa-row.out { justify-content: flex-start; }
.wa-row.first { margin-top: 8px; }
.wa-row.enter { animation: wa-in .35s var(--ease-out) both; }
.wa-row.flash .wa-bubble { animation: wa-flash 1.6s var(--ease-out); }
@keyframes wa-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes wa-flash { 0%, 50% { box-shadow: 0 0 0 4px rgb(139 92 246 / .35); } 100% { box-shadow: 0 1px .5px rgb(0 0 0 / .1); } }

.wa-stack { position: relative; display: flex; flex-direction: column; max-width: min(560px, 76%); min-width: 0; }
.wa-row.out .wa-stack { align-items: flex-end; }
.wa-bubble {
  position: relative; min-width: 84px; padding: 6px 8px 7px 9px; border-radius: 10px;
  background: var(--wa-in); box-shadow: 0 1px .5px rgb(0 0 0 / .1); line-height: 1.45; font-size: 14.2px; overflow-wrap: anywhere;
}
.wa-row.out .wa-bubble { background: var(--wa-out); }
.wa-row.first.in .wa-bubble { border-top-left-radius: 0; }
.wa-row.first.out .wa-bubble { border-top-right-radius: 0; }
.wa-row.first .wa-bubble::before { content: ''; position: absolute; top: 0; width: 8px; height: 13px; background: inherit; }
.wa-row.first.in .wa-bubble::before { left: -8px; clip-path: polygon(0 0, 100% 0, 100% 100%); }
.wa-row.first.out .wa-bubble::before { right: -8px; clip-path: polygon(0 0, 100% 0, 0 100%); }

.wa-sender { font-size: 12.5px; font-weight: 600; color: var(--c); margin-bottom: 2px; }
.wa-fwd { display: flex; align-items: center; gap: 4px; font-size: 12px; font-style: italic; color: var(--wa-muted); margin-bottom: 2px; }
.wa-text a { color: var(--wa-read); text-decoration: underline; text-underline-offset: 2px; }
.wa-text code { font-family: ui-monospace, Menlo, monospace; font-size: .9em; }
.wa-deleted { display: flex; align-items: center; gap: 6px; font-style: italic; color: var(--wa-muted); }
.wa-deleted .wa-meta { margin-left: auto; }

.wa-meta {
  float: right; position: relative; top: 5px; margin: 0 0 0 10px; display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; color: var(--wa-muted); white-space: nowrap; line-height: 15px;
}
.wa-meta [data-icon] { color: inherit; }
.wa-meta.on-media { position: absolute; float: none; right: 6px; bottom: 6px; top: auto; margin: 0; padding: 2px 6px; border-radius: 8px; color: #fff; background: rgb(0 0 0 / .35); }
.wa-tick { width: 16px; height: 11px; color: var(--wa-muted); }
.wa-tick.read { color: var(--wa-read); }
.wa-meta.on-media .wa-tick { color: #fff; }
.wa-meta.on-media .wa-tick.read { color: #7dd3fc; }
.wa-text-meta { display: flow-root; margin-top: -2px; }

/* Botão de opções (chevron) e reação rápida */
.wa-more {
  position: absolute; top: 3px; right: 3px; display: grid; place-items: center; height: 22px; width: 22px; border-radius: 999px;
  color: var(--wa-muted); background: inherit; opacity: 0; transform: translateY(-2px); transition: opacity .15s, transform .2s var(--ease-out);
  box-shadow: -8px 0 10px 2px var(--wa-in);
}
.wa-row.out .wa-more { box-shadow: -8px 0 10px 2px var(--wa-out); }
.wa-bubble:hover .wa-more, .wa-more:focus-visible { opacity: 1; transform: none; }
.wa-bubble.t-image .wa-more, .wa-bubble.t-video .wa-more { color: #fff; background: rgb(0 0 0 / .3); box-shadow: none; }
.wa-quick {
  display: grid; place-items: center; height: 30px; width: 30px; border-radius: 999px; flex-shrink: 0;
  color: var(--wa-muted); background: var(--wa-panel); box-shadow: 0 1px 3px rgb(0 0 0 / .1);
  opacity: 0; transform: scale(.8); transition: opacity .15s, transform .2s var(--ease-out);
}
.wa-row:hover .wa-quick { opacity: 1; transform: none; }
@media (hover: none) { .wa-more { opacity: 1; transform: none; } .wa-quick { display: none; } }

.wa-reactions {
  position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 2px; margin: -6px 8px 2px; padding: 1px 7px;
  font-size: 13px; border-radius: 999px; background: var(--wa-panel); border: 1px solid var(--wa-line); box-shadow: 0 1px 2px rgb(0 0 0 / .08);
  animation: pop-in .3s var(--ease-out); transition: transform .15s;
}
.wa-reactions:hover { transform: scale(1.06); }
.wa-reactions span { font-size: 11.5px; color: var(--wa-muted); margin-left: 2px; }

/* Citação (responder) */
.wa-quote {
  display: flex; align-items: stretch; gap: 8px; width: 100%; min-width: 180px; margin: 0 0 5px; padding: 6px 8px 6px 10px; border-radius: 7px; text-align: left;
  background: rgb(0 0 0 / .05); border-left: 4px solid var(--c); overflow: hidden; transition: background-color .15s;
}
.dark .wa-quote { background: rgb(255 255 255 / .06); }
button.wa-quote:hover { background: rgb(0 0 0 / .08); }
.dark button.wa-quote:hover { background: rgb(255 255 255 / .09); }
.wa-quote .q-name { display: block; font-size: 12.5px; font-weight: 600; color: var(--c); }
.wa-quote .q-text { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--wa-muted); min-width: 0; }
.wa-quote-thumb { height: 42px; width: 42px; border-radius: 6px; object-fit: cover; margin: -2px -4px -2px 0; }

/* Mídia */
.wa-bubble.t-image, .wa-bubble.t-video, .wa-bubble.t-location { padding: 3px; }
.wa-bubble.t-image .wa-text, .wa-bubble.t-video .wa-text, .wa-bubble.t-location .wa-text { padding: 5px 6px 3px; }
.wa-bubble.t-image .wa-sender, .wa-bubble.t-video .wa-sender, .wa-bubble.t-image .wa-quote, .wa-bubble.t-video .wa-quote { margin: 3px 4px 5px; width: auto; }
.wa-media { position: relative; display: block; width: min(330px, 62cqw); max-height: 380px; border-radius: 8px; overflow: hidden; background: var(--wa-active); }
.wa-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease-out); }
.wa-media:hover img { transform: scale(1.02); }
.wa-play-overlay { position: absolute; inset: 0; margin: auto; display: grid; place-items: center; height: 54px; width: 54px; border-radius: 999px; color: #fff; background: rgb(0 0 0 / .45); backdrop-filter: blur(4px); padding-left: 3px; }
.wa-play-overlay.lg { height: 76px; width: 76px; }
.wa-dur { position: absolute; left: 8px; bottom: 7px; display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: #fff; text-shadow: 0 1px 2px rgb(0 0 0 / .5); }

/* Áudio */
.wa-bubble.t-audio { padding: 7px 8px 5px 8px; }
.wa-audio { display: flex; align-items: center; gap: 8px; width: min(320px, 64cqw); }
.wa-audio-av { position: relative; flex-shrink: 0; display: grid; place-items: center; height: 46px; width: 46px; border-radius: 999px; font-size: 14px; font-weight: 600; color: #fff; background: var(--c); }
.wa-row.out .wa-audio-av { order: 3; }
.wa-audio-av .mic { position: absolute; right: -3px; bottom: -2px; display: grid; place-items: center; height: 20px; width: 20px; border-radius: 999px; color: var(--wa-muted); background: var(--wa-in); }
.wa-row.out .wa-audio-av .mic { background: var(--wa-out); left: -3px; right: auto; }
.wa-audio-av .mic.heard { color: var(--wa-read); }
.wa-audio-play { flex-shrink: 0; display: grid; place-items: center; height: 34px; width: 34px; border-radius: 999px; color: var(--wa-muted); transition: transform .15s, color .2s; }
.wa-audio-play:hover { color: inherit; }
.wa-audio-play:active { transform: scale(.9); }
.wa-audio-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding-top: 10px; }
.wa-wave { position: relative; display: flex; align-items: center; gap: 2px; height: 26px; cursor: pointer; }
.wa-wave i { flex: 1; min-width: 2px; height: var(--h); border-radius: 2px; background: color-mix(in srgb, var(--wa-muted) 55%, transparent); transition: background-color .15s; }
.wa-wave i.on { background: var(--wa-accent); }
.wa-wave-dot { position: absolute; left: 0; top: 50%; height: 12px; width: 12px; margin: -6px 0 0 -6px; border-radius: 999px; background: var(--wa-accent); transition: left .1s linear; box-shadow: 0 0 0 3px color-mix(in srgb, var(--wa-accent) 25%, transparent); }
.wa-audio-foot { display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: var(--wa-muted); }
.wa-audio-foot .wa-meta { float: none; top: 0; }
.wa-speed { flex-shrink: 0; height: 24px; min-width: 38px; padding: 0 6px; border-radius: 999px; font-size: 11.5px; font-weight: 600; color: var(--wa-muted); background: var(--wa-active); transition: background-color .2s; }
.wa-audio:not(.playing) .wa-speed { opacity: .7; }

/* Documento */
.wa-bubble.t-doc { padding: 4px 4px 4px; }
.wa-doc { display: flex; align-items: center; gap: 12px; width: min(330px, 64cqw); padding: 10px 12px; border-radius: 8px; background: rgb(0 0 0 / .04); transition: background-color .15s; }
.dark .wa-doc { background: rgb(255 255 255 / .05); }
.wa-doc:hover { background: rgb(0 0 0 / .07); }
.dark .wa-doc:hover { background: rgb(255 255 255 / .08); }
.wa-doc-ic { display: grid; place-items: center; height: 40px; width: 34px; flex-shrink: 0; border-radius: 6px; font-size: 9.5px; font-weight: 700; color: #fff; background: #64748b; }
.wa-doc-ic.ext-pdf { background: #ef4444; }
.wa-doc-ic.ext-docx, .wa-doc-ic.ext-doc { background: #3b82f6; }
.wa-doc-ic.ext-xlsx, .wa-doc-ic.ext-csv { background: #16a34a; }
.wa-doc-dl { display: grid; place-items: center; height: 32px; width: 32px; border-radius: 999px; border: 1px solid var(--wa-line); color: var(--wa-muted); }
.wa-bubble.t-doc .wa-text-meta { padding: 2px 6px 0; }

/* Localização e contato */
.wa-loc { position: relative; display: block; width: min(300px, 62cqw); aspect-ratio: 2 / 1; border-radius: 8px; overflow: hidden; }
.wa-loc img { width: 100%; height: 100%; object-fit: cover; }
.dark .wa-loc img { filter: invert(.9) hue-rotate(180deg) brightness(.9); }
.wa-loc-pin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -80%); color: #ef4444; filter: drop-shadow(0 3px 4px rgb(0 0 0 / .3)); }
.wa-loc-pin svg { fill: #ef4444; stroke: #fff; }
.wa-contact { display: flex; align-items: center; gap: 12px; min-width: 220px; padding: 6px 4px 10px; border-bottom: 1px solid var(--wa-line); }
.wa-contact .wa-meta { margin-left: auto; align-self: flex-end; }
.wa-contact-btn { display: block; width: 100%; padding: 8px 0 2px; font-size: 13.5px; font-weight: 500; color: var(--wa-accent); }

.wa-typing-bubble { min-width: 0; padding: 8px 14px; }
.wa-typing-bubble .typing { height: 18px; color: var(--wa-muted); }

.wa-jump {
  position: absolute; right: 18px; bottom: 92px; z-index: 4; display: grid; place-items: center; height: 40px; width: 40px; border-radius: 999px;
  color: var(--wa-muted); background: var(--wa-panel); box-shadow: 0 2px 8px rgb(0 0 0 / .15);
  opacity: 0; transform: translateY(10px) scale(.9); pointer-events: none; transition: opacity .25s, transform .3s var(--ease-out);
}
.wa-jump.show { opacity: 1; transform: none; pointer-events: auto; }

/* ---------- Rodapé: rascunho, resposta e composer ---------- */
.wa-bottom { flex-shrink: 0; background: var(--wa-panel); border-top: 1px solid var(--wa-line); z-index: 3; }
.wa-draft {
  margin: 10px 12px 0; padding: 12px 14px; border-radius: 16px; animation: fade-up .4s var(--ease-out) both;
  background: linear-gradient(135deg, rgb(139 92 246 / .09), rgb(14 165 233 / .09)); border: 1px solid rgb(139 92 246 / .25);
}
.wa-draft-head { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--wa-accent); }
.wa-draft p { margin-top: 6px; font-size: 14px; line-height: 1.55; }
.wa-draft-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin-top: 10px; }
.wa-draft-actions .btn { height: 32px; padding: 0 12px; font-size: 13px; }

.wa-replybar { display: none; align-items: center; gap: 8px; padding: 8px 12px 0 14px; }
.wa-replybar.show { display: flex; animation: fade-up .25s var(--ease-out); }
.wa-replybar .wa-quote { margin: 0; flex: 1; }

.wa-composer { display: flex; align-items: flex-end; gap: 4px; padding: 8px 10px; }
.wa-composer .btn-icon { height: 42px; width: 42px; border-radius: 999px; flex-shrink: 0; }
.wa-input { flex: 1; min-width: 0; display: flex; align-items: center; min-height: 42px; padding: 0 14px; border-radius: 22px; background: var(--wa-hover); transition: box-shadow .2s, background-color .2s; }
.wa-input:focus-within { background: var(--wa-panel); box-shadow: 0 0 0 1px var(--wa-line), 0 2px 10px -4px rgb(0 0 0 / .15); }
.wa-input textarea { width: 100%; resize: none; background: transparent; outline: none; padding: 10px 0; font-size: 14.5px; line-height: 22px; max-height: 140px; }
.wa-input textarea::placeholder { color: rgb(163 163 163); }
.wa-send { position: relative; display: grid; place-items: center; height: 42px; width: 42px; flex-shrink: 0; border-radius: 999px; color: #fff; background: #0d0d0d; transition: transform .2s var(--ease-out), background-color .25s; }
.dark .wa-send { background: #fff; color: #0d0d0d; }
.wa-send:hover { transform: scale(1.06); }
.wa-send:active { transform: scale(.94); }
.wa-send > span { position: absolute; display: grid; transition: opacity .2s, transform .35s var(--ease-out); }
.wa-send[data-state="mic"] .ic-send, .wa-send[data-state="send"] .ic-mic { opacity: 0; transform: scale(.4) rotate(-60deg); }
.wa-send .ic-send { padding-left: 2px; }

.wa-composer.recording { animation: fade-in .25s; }
.wa-rec { flex: 1; display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 14px; border-radius: 22px; background: var(--wa-hover); font-size: 14px; font-variant-numeric: tabular-nums; }
.wa-rec-dot { height: 10px; width: 10px; border-radius: 999px; background: #ef4444; animation: blink 1s steps(1) infinite; }
.wa-rec-wave { flex: 1; display: flex; align-items: center; gap: 3px; height: 24px; overflow: hidden; }
.wa-rec-wave i { flex: 1; min-width: 2px; max-width: 4px; height: 30%; border-radius: 2px; background: var(--wa-accent); animation: wa-rec 0.8s ease-in-out infinite alternate; }
@keyframes wa-rec { to { height: 100%; } }

/* ---------- Painel de dados ---------- */
.wa-info { width: 0; flex-shrink: 0; overflow-x: hidden; overflow-y: auto; background: var(--wa-panel); border-left: 1px solid transparent; transition: width .4s var(--ease-out), border-color .3s; }
.wa[data-info="open"] .wa-info { width: 340px; border-left-color: var(--wa-line); }
.wa-info > * { width: 340px; }
.wa-info-head { display: flex; align-items: center; gap: 8px; height: 62px; padding: 0 12px; border-bottom: 1px solid var(--wa-line); position: sticky; top: 0; background: var(--wa-panel); z-index: 1; }
.wa-info-hero { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 24px 16px 18px; text-align: center; border-bottom: 1px solid var(--wa-line); }
.wa-info-hero h4 { margin-top: 10px; font-size: 19px; font-weight: 600; }
.wa-info-hero p { font-size: 14px; color: var(--wa-muted); }
.wa-info-sec { padding: 14px 18px; border-bottom: 1px solid var(--wa-line); }
.wa-info-label { font-size: 12.5px; color: var(--wa-muted); margin-bottom: 8px; }
.wa-info-num { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; font-size: 14px; background: color-mix(in srgb, var(--n) 9%, transparent); }
.wa-tag { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 500; background: var(--wa-active); }
.wa-tag.add { background: transparent; border: 1px dashed var(--wa-line); color: var(--wa-muted); }
.wa-info-media { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.wa-info-media button { aspect-ratio: 1; border-radius: 8px; overflow: hidden; }
.wa-info-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s var(--ease-out); }
.wa-info-media button:hover img { transform: scale(1.06); }
.wa-info-actions { padding: 8px; }
.wa-info-actions.danger .menu-item { color: rgb(220 38 38); }
.dark .wa-info-actions.danger .menu-item { color: rgb(248 113 113); }

/* ---------- Menus flutuantes ---------- */
.wa-pop { position: absolute; z-index: 30; border-radius: 16px; border: 1px solid var(--wa-line); background: var(--wa-panel); box-shadow: 0 16px 40px -12px rgb(0 0 0 / .3); padding: 6px; }
.dark .wa-pop { background: #262626; }
.wa-pop-title { padding: 6px 10px 8px; font-size: 12px; font-weight: 500; color: var(--wa-muted); }
.wa-pop-foot { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 4px; margin-top: 4px; border-top: 1px solid var(--wa-line); font-size: 13px; }
.wa-pop-foot button { color: var(--wa-accent); font-weight: 500; }
.wa-numsel-menu { width: 300px; }
.wa-numopt { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; cursor: pointer; transition: background-color .15s; }
.wa-numopt:hover { background: var(--wa-hover); }
.wa-numopt input, .wa-fwd-item input { position: absolute; opacity: 0; pointer-events: none; }
.wa-check { display: grid; place-items: center; height: 18px; width: 18px; flex-shrink: 0; border-radius: 5px; border: 1.5px solid rgb(163 163 163); color: transparent; transition: background-color .2s, border-color .2s, color .2s, transform .2s var(--ease-out); }
input:checked + .wa-check { background: var(--wa-accent); border-color: var(--wa-accent); color: #fff; }
.dark input:checked + .wa-check { color: #1b1b1b; }
input:focus-visible + .wa-check { box-shadow: 0 0 0 3px rgb(139 92 246 / .3); }
.wa-ctx { width: 230px; }
.wa-ctx.emoji-only { width: auto; border-radius: 999px; padding: 4px; }
.wa-react-row { display: flex; gap: 2px; padding: 2px; }
.wa-ctx:not(.emoji-only) .wa-react-row { padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid var(--wa-line); justify-content: space-between; }
.wa-react-row button { display: grid; place-items: center; height: 34px; width: 34px; border-radius: 999px; font-size: 20px; transition: transform .2s var(--ease-out), background-color .15s; }
.wa-react-row button:hover { transform: scale(1.25); background: var(--wa-hover); }
.wa-react-row button.on { background: rgb(139 92 246 / .18); }
.wa-attach { width: 210px; }
.wa-emoji { width: 300px; }
.wa-emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; max-height: 220px; overflow-y: auto; }
.wa-emoji-grid button { aspect-ratio: 1; border-radius: 8px; font-size: 20px; transition: transform .15s, background-color .15s; }
.wa-emoji-grid button:hover { background: var(--wa-hover); transform: scale(1.15); }

/* Encaminhar */
.wa-fwd-modal { max-width: 460px; }
.wa-fwd-list { max-height: 340px; overflow-y: auto; margin: 10px -8px 0; }
.wa-fwd-item { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; cursor: pointer; transition: background-color .15s; position: relative; }
.wa-fwd-item:hover { background: rgb(0 0 0 / .04); }
.dark .wa-fwd-item:hover { background: rgb(255 255 255 / .05); }
.wa-fwd-item .wa-avatar { height: 40px; width: 40px; font-size: 14px; }
.wa-fwd-modal { --wa-accent: #7c3aed; --wa-line: rgb(0 0 0 / .08); --wa-muted: #737373; --wa-hover: rgb(0 0 0 / .04); --wa-active: rgb(0 0 0 / .06); }
.dark .wa-fwd-modal { --wa-accent: #a78bfa; --wa-line: rgb(255 255 255 / .1); --wa-muted: #a3a3a3; --wa-hover: rgb(255 255 255 / .05); --wa-active: rgb(255 255 255 / .07); }

/* Visualizador */
.wa-lightbox { position: fixed; inset: 0; z-index: 85; display: flex; flex-direction: column; background: rgb(10 10 10 / .92); color: #fff; opacity: 0; transition: opacity .3s; backdrop-filter: blur(6px); }
.wa-lightbox.open { opacity: 1; }
.wa-lb-bar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; }
.wa-lb-bar .wa-avatar { height: 40px; width: 40px; font-size: 14px; }
.wa-lb-bar .btn-icon { color: #e5e5e5; }
.wa-lb-bar .btn-icon:hover { background: rgb(255 255 255 / .1); color: #fff; }
.wa-lightbox figure { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 12px 24px 32px; }
.wa-lightbox img { max-width: 100%; max-height: calc(100% - 50px); border-radius: 10px; object-fit: contain; transform: scale(.94); transition: transform .45s var(--ease-out); box-shadow: 0 30px 80px -20px rgb(0 0 0 / .6); }
.wa-lightbox.open img { transform: none; }
.wa-lightbox figcaption { font-size: 15px; max-width: 640px; text-align: center; }

/* =========================================================
   RESPONSIVO por largura do painel (container queries)
   ========================================================= */
@container wa (max-width: 1100px) {
  .wa[data-info="open"] .wa-info, .wa-info { position: absolute; right: 0; top: 0; bottom: 0; z-index: 6; box-shadow: -20px 0 40px -20px rgb(0 0 0 / .25); }
  .wa-info { width: 0 !important; }
  .wa[data-info="open"] .wa-info { width: 340px !important; }
}
@container wa (max-width: 860px) {
  .wa-list { width: 300px; }
  .wa-liloo-btn span { display: none; }
  .wa-liloo-btn { width: 34px; padding: 0; justify-content: center; }
  .wa-row { padding: 1px 3%; }
}
@container wa (max-width: 680px) {
  .wa-list { position: absolute; inset: 0; width: 100%; border-right: 0; transition: transform .45s var(--ease-out), opacity .3s; }
  .wa-chat { position: absolute; inset: 0; transform: translateX(100%); transition: transform .45s var(--ease-out); box-shadow: -20px 0 40px -24px rgb(0 0 0 / .3); }
  .wa[data-view="chat"] .wa-chat { transform: none; }
  .wa[data-view="chat"] .wa-list { transform: translateX(-24%); opacity: 0; pointer-events: none; }
  .wa-back { display: inline-grid; margin-right: -4px; }
  .wa-row { padding: 1px 12px; }
  .wa-stack { max-width: 86%; }
  .wa-info { width: 100% !important; transform: translateX(100%); transition: transform .4s var(--ease-out); }
  .wa[data-info="open"] .wa-info { width: 100% !important; transform: none; }
  .wa-info > * { width: 100%; }
  .wa-status { max-width: 40cqw; }
}
@container wa (max-width: 420px) {
  .wa-chat-head .wa-numtag { display: none; }
  .wa-conv-top .wa-numtag { display: none; }
}
