/* Chinflip · Mensajes por WhatsApp */
.wa-btn { background: #00a884; box-shadow: 0 6px 16px #00a88440; }
.wa-btn:hover { background: #008f6f; }
.wa { display: grid; grid-template-columns: 360px minmax(0, 1fr); height: calc(100vh - 190px); min-height: 560px; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.wa-side { display: grid; grid-template-rows: auto auto 1fr; min-height: 0; border-right: 1px solid #e9edef; }
.wa-search { padding: 12px 12px 6px; }
.wa-search input { width: 100%; height: 38px; padding: 0 14px; border: 0; border-radius: 10px; background: #f0f2f5; }
.wa-filters { display: flex; gap: 6px; padding: 6px 12px 10px; overflow-x: auto; border-bottom: 1px solid #e9edef; }
.wa-filters .filter-chip { padding: 5px 11px; font-size: .78rem; white-space: nowrap; background: #f0f2f5; border-color: transparent; }
.wa-filters .filter-chip[aria-pressed="true"] { background: #d9fdd3; color: #0b5c43; border-color: transparent; }
.wa-filters .filter-chip[aria-pressed="true"] small { color: #0b5c43; }
.wa-list { margin: 0; padding: 0; list-style: none; overflow-y: auto; }
.wa-item { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; align-items: center; width: 100%; padding: 10px 14px; border: 0; border-bottom: 1px solid #f0f2f5; background: #fff; text-align: left; }
.wa-item:hover { background: #f5f6f6; }
.wa-item[aria-current="true"] { background: #f0f2f5; }
.wa-item .portrait { width: 48px; }
.wa-item-text { display: grid; gap: 3px; min-width: 0; }
.wa-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.wa-row b { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .9rem; font-weight: 600; }
.wa-row time { color: #667781; font-size: .72rem; }
.wa-row small { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #667781; font-size: .8rem; }
.wa-dot { width: 10px; height: 10px; flex: none; border-radius: 50%; background: #25d366; }
.wa-dot[data-k="missing"] { background: #e2687a; }
.wa-dot[data-k="late"] { background: #f0a43a; }
.wa-dot[data-k="pending"] { background: #4f86f7; }
.wa-dot[data-k="bday"] { background: #e27ac0; }
.wa-nonum { flex: none; padding: 1px 6px; border-radius: 99px; background: #f0f2f5; color: #667781; font-size: .66rem; font-style: normal; font-weight: 700; }
.wa-chat { display: grid; grid-template-rows: auto 1fr auto; min-height: 0; background-color: #efeae2;
  background-image: radial-gradient(#d9d2c5 1px, transparent 1.2px), radial-gradient(#e4ddd1 1px, transparent 1.2px); background-size: 22px 22px, 22px 22px; background-position: 0 0, 11px 11px; }
.wa-empty { display: grid; place-content: center; gap: 6px; height: 100%; padding: 30px; text-align: center; color: #667781; }
.wa-empty b { color: var(--ink); font-size: 1.1rem; }
.wa-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; background: #f0f2f5; border-bottom: 1px solid #e9edef; }
.wa-who { display: flex; align-items: center; gap: 12px; min-width: 0; border: 0; background: none; text-align: left; }
.wa-who .portrait { width: 42px; }
.wa-who b, .wa-who small { display: block; }
.wa-who b { font-size: .95rem; }
.wa-who small { color: #667781; font-size: .78rem; }
.wa-tel { display: flex; align-items: center; gap: 6px; }
.wa-cc { color: #667781; font-size: .85rem; font-weight: 700; }
.wa-tel input { width: 150px; height: 36px; padding: 0 10px; border: 1px solid #d1d7db; border-radius: 8px; background: #fff; font-variant-numeric: tabular-nums; }
.wa-tel .control { width: auto; min-height: 36px; padding: 0 12px; }
.wa-body { display: flex; flex-direction: column; gap: 6px; min-height: 0; padding: 18px 8%; overflow-y: auto; }
.wa-day { align-self: center; margin: 8px 0 4px; padding: 4px 12px; border-radius: 8px; background: #fff; color: #54656f; font-size: .74rem; font-weight: 600; box-shadow: 0 1px 1px #0b141a14; }
.wa-system { align-self: center; max-width: 80%; padding: 6px 12px; border-radius: 8px; background: #fff4c4; color: #54656f; font-size: .8rem; text-align: center; box-shadow: 0 1px 1px #0b141a14; }
.wa-bubble { position: relative; max-width: 72%; padding: 7px 10px 6px; border-radius: 10px; font-size: .9rem; line-height: 1.4; box-shadow: 0 1px 1px #0b141a20; }
.wa-bubble.out { align-self: flex-end; background: #d9fdd3; border-top-right-radius: 2px; }
.wa-bubble p { margin: 0; white-space: pre-wrap; }
.wa-meta { display: flex; justify-content: flex-end; gap: 8px; margin-top: 2px; color: #667781; font-size: .68rem; }
.wa-check { color: #53bdeb; font-weight: 700; }
.wa-foot { display: grid; gap: 8px; padding: 10px 14px 12px; background: #f0f2f5; border-top: 1px solid #e9edef; }
.wa-templates { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.wa-tpl { flex: none; padding: 6px 12px; border: 1px solid #d1d7db; border-radius: 99px; background: #fff; font-size: .78rem; font-weight: 600; color: #3b4a54; }
.wa-tpl[data-sug]::before { content: "★ "; color: #f5b324; }
.wa-tpl[aria-pressed="true"] { background: #00a884; border-color: #00a884; color: #fff; }
.wa-tpl[aria-pressed="true"]::before { color: #fff; }
.wa-write { display: flex; align-items: end; gap: 10px; }
.wa-write textarea { flex: 1; min-height: 64px; max-height: 160px; padding: 10px 12px; border: 0; border-radius: 10px; background: #fff; font-size: .9rem; resize: vertical; }
.wa-send { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border: 0; border-radius: 50%; background: #00a884; color: #fff; }
.wa-send:hover { background: #008f6f; }
.wa-send svg { width: 22px; height: 22px; fill: currentColor; }
.wa-hint { color: #667781; font-size: .72rem; }
.wa-file { border: 0; border-radius: 10px; padding: 9px 16px; font-weight: 700; background: #00a884; color: #fff; text-align: left; }
.wa-file:hover { background: #008f6f; }
.grupo-dialog { width: min(680px, calc(100% - 24px)); }
.grupo-dialog .form-row { margin: 14px 0 8px; }
.grupo-dialog label { display: grid; gap: 5px; font-size: .85rem; font-weight: 650; }
.grupo-lista { display: grid; gap: 6px; max-height: 52vh; margin: 12px 0 0; padding: 0; list-style: none; overflow-y: auto; }
.grupo-item { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; }
.grupo-item[data-done] { background: #f2faf5; border-color: #cfe9db; }
.grupo-item .portrait { width: 40px; }
.grupo-item b, .grupo-item small { display: block; }
.grupo-item b { font-size: .86rem; }
.grupo-item small { color: var(--muted); font-size: .74rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.wa-open { border: 0; border-radius: 8px; padding: 7px 12px; background: #00a884; color: #fff; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.wa-open:disabled { background: #2fa36b; }
@media (max-width: 900px) {
  .wa { grid-template-columns: 1fr; height: auto; }
  .wa-side { max-height: 320px; border-right: 0; border-bottom: 1px solid #e9edef; }
  .wa-chat { min-height: 520px; }
  .wa-body { padding: 14px; }
  .wa-bubble { max-width: 90%; }
}
textarea { font: inherit; color: inherit; }
.wa-write textarea { font-family: inherit; }
/* Filtros que se acomodan en dos renglones en vez de cortarse */
.wa-filters { flex-wrap: wrap; overflow-x: visible; }
.wa-empty .faces { justify-content: center; margin-bottom: 8px; }
.wa-empty .faces .portrait { width: 52px; margin-left: -12px; box-shadow: 0 0 0 3px #efeae2; }
.wa-empty span:last-child { max-width: 340px; }
