/* "Nova conversa" (27/11/2026): the button of the conversation list, the dialog in the center pane
   (/conversations/new) and the "Iniciar conversa" button of the contact list. */

/* list head: the button sits with the Minhas / Não lidas / Anúncios chips; the row wraps instead of cutting them */
.cv-lhead{flex-wrap:wrap;row-gap:8px}
/* row 1: title + "Nova conversa"; row 2: the filter chips, from the left */
.cv-lhead h3{flex:1 1 auto}
.cv-lhead .cv-mine{margin-left:0}
.cv-lhead .cv-new{flex:none;display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 12px;border-radius:20px;font-size:12.5px;font-weight:650;text-decoration:none!important}
.cv-lhead .cv-new svg.i{width:14px;height:14px}

/* the dialog */
.cv.is-new .cv-center{overflow-y:auto}
/* flex:none — the center column is a flex column: a shrinking card let the form overflow it (phones) */
.sc{flex:none;width:100%;max-width:600px;margin:24px auto;padding:20px 22px;border:1px solid var(--line);border-radius:16px;background:var(--card);box-shadow:0 8px 28px rgba(0,0,0,.06);display:grid;gap:14px;box-sizing:border-box}
.sc [hidden]{display:none!important}
.sc-h{display:flex;align-items:flex-start;gap:12px}
.sc-h>div{flex:1;min-width:0}
.sc-h h2{margin:0 0 2px;font-size:18px;font-weight:750;letter-spacing:-.3px;text-transform:none;color:var(--txt)}
.sc-h p{margin:0;line-height:1.45}
.sc-h .btn{flex:none}
.sc-ic{flex:none;width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:var(--acc-bg);color:var(--acc)}
.sc-ic svg.i{width:19px;height:19px}
.sc>.alert{margin:0}
.sc-to{display:grid;gap:8px}
.sc-lbl{font-size:11px;color:var(--mut);text-transform:uppercase;letter-spacing:.5px}
.sc-search{display:flex;align-items:center;gap:8px;margin:0}
.sc-search input{flex:1;min-width:0;height:36px}
.sc-search button{flex:none}
.sc-results{list-style:none;margin:0;padding:4px;border:1px solid var(--line);border-radius:12px;display:grid;gap:2px;max-height:280px;overflow-y:auto}
.sc-results a{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:9px;color:var(--txt);text-decoration:none!important}
.sc-results a:hover,.sc-results a:focus-visible{background:var(--hover)}
.sc-picked{display:flex;align-items:center;gap:10px;padding:10px 12px;border:1px solid var(--acc-line);border-radius:12px;background:var(--acc-bg)}
.sc-pick-t{flex:1;min-width:0;display:grid;gap:1px}
.sc-pick-t b,.sc-pick-t span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sc-pick-go{flex:none;display:inline-flex;align-items:center;gap:2px;font-size:12.5px;font-weight:600;color:var(--acc)}
.sc-pick-go svg.i{width:14px;height:14px}
.sc-f{display:grid;gap:2px;margin:0}
.sc-or{display:flex;align-items:center;gap:10px;margin:0 0 10px;color:var(--mut);font-size:12.5px}
.sc-or::before,.sc-or::after{content:"";flex:1;height:1px;background:var(--line)}
.sc-f label.f textarea{min-height:96px;resize:vertical}
.sc-f input[aria-invalid=true]{border-color:var(--bad)}
.sc-status{display:grid;gap:10px;margin:0 0 12px}
.sc-status:not(:has(>:not([hidden]))){display:none}
.sc-status .alert{margin:0;line-height:1.45}
.sc-status .alert a{font-weight:650}
.sc-first{border:1.5px solid var(--warn-line);background:var(--warn-bg);border-radius:12px;padding:12px 14px;display:grid;gap:8px;font-size:13.5px;line-height:1.5}
.sc-first-h{display:flex;align-items:flex-start;gap:8px}
.sc-first-h svg.i{flex:none;width:18px;height:18px;margin-top:1px;color:var(--warn)}
.sc-first p{margin:0}
.sc-first .sc-confirm{justify-self:start;height:auto;min-height:32px;padding:6px 12px;white-space:normal;line-height:1.35}
.sc-first .sc-confirm span{white-space:normal}
.sc-acts{display:flex;justify-content:flex-end;align-items:center;gap:8px;margin-top:4px}
.sc-f.sc-checking .sc-status{opacity:.6}
.cv-started{margin:8px 16px 0}

/* phones: the dialog takes the whole column (the list hides, like an open conversation) */
@media(max-width:820px){
  .cv.is-new .cv-left{display:none}
  .cv.is-new .cv-center{display:flex}
  /* bottom room so the floating "Ajuda" button never covers Send */
  .sc{margin:0;border:0;border-radius:0;box-shadow:none;padding:16px 16px 92px;min-height:100%;align-content:start}
  .sc-acts button[type=submit]{flex:1;justify-content:center}
}
