/* Chat de suporte (v0.1.58): mesmas cores da Aparência (--brand) e o mesmo formato do chat com o motorista. */
.sup-dlg { width: min(94vw, 460px); height: min(86dvh, 640px); }
.sup-dlg .chat-head { gap: 10px; }
.sup-titulo { display: inline-flex; align-items: center; gap: 8px; }
.sup-titulo .ic { color: var(--brand); }
.sup-fechar { min-width: 40px; min-height: 40px; }
.sup-ident { padding: 18px; display: grid; gap: 12px; overflow-y: auto; }
.sup-ident-txt { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.sup-ident .field { margin: 0; }
.sup-erro { margin: 0; color: var(--red, #dc2626); font-size: 14px; min-height: 1em; }
.sup-erro:empty { display: none; }
.sup-lista .msg { display: flex; flex-direction: column; gap: 4px; }
.sup-quem { font-size: 12px; font-weight: 700; color: var(--brand-600, var(--brand)); }
.sup-robo { background: #fff; }
.sup-atendente { background: #fff; border-left: 3px solid var(--brand); }
.sup-txt { white-space: pre-wrap; }
.sup-img img { display: block; max-width: 100%; max-height: 260px; border-radius: 10px; object-fit: cover; }
.sup-audio audio { width: min(240px, 60vw); height: 40px; }
.sup-video { max-width: 100%; max-height: 260px; border-radius: 10px; }
.sup-arq { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: inherit; overflow-wrap: anywhere; }
.msg.me .sup-arq, .msg.me .sup-baixar { color: var(--on-brand, #fff); }
.sup-baixar { display: block; font-size: 12px; margin-top: 4px; color: var(--brand-600, var(--brand)); }
.sup-botoes { display: flex; flex-wrap: wrap; gap: 8px; align-self: flex-start; max-width: 92%; }
.sup-botoes .btn { width: auto; margin: 0; padding: 9px 14px; font-size: 14px; border-radius: 999px; text-align: left; }
.sup-aviso { align-self: center; margin: 4px 0; font-size: 13px; color: var(--muted); text-align: center; max-width: 90%; }
.sup-form { align-items: center; }
.sup-form .sup-texto { flex: 1; min-width: 0; }
.sup-icone { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%; display: inline-grid; place-items: center; cursor: pointer;
  border: 2px solid color-mix(in srgb, var(--brand) 45%, #cbd5e1); background: #fff; color: var(--brand); }
.sup-icone .ic { width: 20px; height: 20px; vertical-align: 0; }
.sup-icone:hover { border-color: color-mix(in srgb, var(--brand) 70%, #cbd5e1); }
.sup-enviar { background: var(--brand); border-color: var(--brand); color: var(--on-brand, #fff); }
.sup-gravando { display: flex; align-items: center; gap: 10px; padding: 10px; border-top: 1px solid var(--line); background: #fff; }
.sup-gravando.hidden { display: none; }
.sup-gravando .btn { width: auto; margin: 0; }
.sup-gravando .btn.primary { margin-left: auto; }
.sup-ponto { width: 12px; height: 12px; border-radius: 50%; background: #dc2626; animation: sup-pisca 1s infinite; }
.sup-tempo { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink); }
@keyframes sup-pisca { 50% { opacity: .25; } }
.sup-fim { padding: 14px; border-top: 1px solid var(--line); background: #fff; text-align: center; }
.sup-fim-txt { margin: 0 0 10px; font-weight: 700; color: var(--ink); }
.sup-fim-acoes { display: flex; gap: 10px; }
.sup-fim-acoes .btn { margin: 0; flex: 1; }
.sup-badge { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #dc2626; margin-left: 2px; vertical-align: top; flex: 0 0 auto; }
.sup-badge.hidden { display: none; }
.sup-link { display: block; width: 100%; margin-top: 10px; text-align: center; font-size: 14px; font-weight: 600; color: var(--brand-600, var(--brand)); }
.sup-link .ic { color: var(--brand); }
.hidden { display: none !important; }
/* identificacao: a janela fica so do tamanho do formulario */
.sup-dlg:has(.sup-ident:not(.hidden)) { height: fit-content; }
.sup-fim-acoes .btn { font-size: 15px; padding: 13px 10px; }

/* v0.1.58: responder uma mensagem, citacao, mensagem apagada */
.sup-lista .msg { position: relative; touch-action: pan-y; }
.sup-cita { display: block; width: 100%; text-align: left; border: 0; border-left: 3px solid var(--brand); border-radius: 8px; background: rgba(15, 23, 42, .06); padding: 6px 9px; margin: 0 0 2px; font: inherit; font-size: 13px; line-height: 1.35; color: inherit; cursor: pointer; overflow: hidden; }
.sup-cita strong { display: block; font-size: 12px; color: var(--brand-600, var(--brand)); }
.sup-cita span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.msg.me .sup-cita { background: rgba(255, 255, 255, .18); border-left-color: var(--on-brand, #fff); }
.msg.me .sup-cita strong { color: var(--on-brand, #fff); }
.sup-resp-btn { position: absolute; top: 50%; transform: translateY(-50%); right: -40px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: #fff; color: var(--brand); box-shadow: var(--shadow-sm); display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .15s; }
.msg.me .sup-resp-btn { right: auto; left: -40px; }
.sup-resp-btn .ic { width: 17px; height: 17px; vertical-align: 0; }
@media (hover: hover) { .sup-lista .msg:hover .sup-resp-btn, .sup-resp-btn:focus-visible { opacity: 1; } }
@media (hover: none) { .sup-resp-btn { display: none; } }
.sup-respondendo { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; border-top: 1px solid var(--line); background: #fff; }
.sup-resp-txt { flex: 1; min-width: 0; border-left: 3px solid var(--brand); padding-left: 9px; font-size: 13px; line-height: 1.35; }
.sup-resp-quem { display: block; color: var(--brand-600, var(--brand)); font-size: 12px; }
.sup-resp-trecho { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sup-resp-x { min-width: 36px; min-height: 36px; }
.sup-apagada .sup-txt { font-style: italic; color: var(--muted); }
.msg.me.sup-apagada { background: color-mix(in srgb, var(--brand) 55%, #fff); }
.msg.me.sup-apagada .sup-txt { color: var(--on-brand, #fff); }
.sup-destaque { animation: sup-destaque 1.4s ease; }
@keyframes sup-destaque { 0%, 40% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 40%, transparent); } 100% { box-shadow: var(--shadow-sm); } }

/* v0.1.58: anexos (foto, localizacao, recibo), horario, digitando, resolvido e avaliacao */
.sup-form { position: relative; }
.sup-anexos { position: absolute; left: 10px; bottom: calc(100% + 6px); z-index: 3; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; display: grid; min-width: 240px; }
.sup-anexos button { display: flex; align-items: center; gap: 10px; border: 0; background: none; font: inherit; font-size: 15px; font-weight: 600; color: var(--ink); text-align: left; padding: 11px 12px; border-radius: 10px; cursor: pointer; }
.sup-anexos button:hover { background: var(--fill); }
.sup-anexos .ic { color: var(--brand); width: 20px; height: 20px; }
.sup-horario { margin: 0; padding: 10px 14px; font-size: 13px; line-height: 1.45; background: #fff7ed; color: #9a3412; border-bottom: 1px solid #fed7aa; }
.sup-digitando { align-self: flex-start; margin: 2px 0; font-size: 13px; font-style: italic; color: var(--muted); }
.sup-resolvido { margin-left: auto; border: 2px solid color-mix(in srgb, var(--brand) 45%, #cbd5e1); background: #fff; color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.sup-resolvido:hover { border-color: color-mix(in srgb, var(--brand) 70%, #cbd5e1); }
.sup-dlg .chat-head .sup-resolvido + .sup-fechar { margin-left: 0; }
.sup-avaliar { display: grid; gap: 8px; justify-items: center; margin: 4px 0 12px; }
.sup-aval-txt { margin: 0; font-size: 14px; color: var(--muted); }
.sup-estrelas { display: flex; gap: 4px; }
.sup-estrela { border: 0; background: none; font-size: 32px; line-height: 1; color: #cbd5e1; cursor: pointer; padding: 2px 4px; }
.sup-estrela.on { color: #f59e0b; }
.sup-aval-com { width: 100%; resize: vertical; }
.sup-aval-enviar { width: auto; margin: 0; }
.sup-aval-ok { margin: 0 0 10px; font-weight: 600; color: var(--brand-600, var(--brand)); }
.sup-aval-com { font: inherit; font-size: 14px; line-height: 1.4; padding: 10px 12px; border-radius: 12px; border: 2px solid color-mix(in srgb, var(--brand) 45%, #cbd5e1); background: #fff; color: var(--ink); box-sizing: border-box; }
.sup-aval-com:focus { outline: none; border-color: var(--brand); }

/* v0.1.60: totem — "Continuar no celular" (QR Code) */
.sup-celular { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; border: 2px solid color-mix(in srgb, var(--brand) 45%, #cbd5e1); background: #fff; color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; border-radius: 999px; padding: 6px 12px; cursor: pointer; white-space: nowrap; }
.sup-celular .ic { color: var(--brand); }
.sup-dlg .chat-head .sup-celular:not(.hidden) + .sup-resolvido { margin-left: 0; }
.sup-qr { padding: 18px; display: grid; gap: 14px; justify-items: center; text-align: center; border-bottom: 1px solid var(--line); background: #fff; }
.sup-qr-txt { margin: 0; font-size: 15px; line-height: 1.45; color: var(--ink); max-width: 320px; }
.sup-qr-img { width: 200px; height: 200px; }
.sup-qr-img svg { width: 100%; height: 100%; display: block; }
.sup-qr .sup-fim-acoes { width: 100%; }
.sup-dlg:has(.sup-qr:not(.hidden)) { height: fit-content; }
.sup-qr { border-bottom: 0; }
.sup-dlg:has(.sup-qr:not(.hidden)) .sup-lista,.sup-dlg:has(.sup-qr:not(.hidden)) .sup-form { display: none !important; }

/* v0.1.68: "Minhas conversas" (app e área do agente): lista das conversas e botão "Nova conversa" embaixo */
.sup-voltar { min-width: 40px; min-height: 40px; display: inline-grid; place-items: center; padding: 0; margin-right: -4px; color: var(--ink, #0f172a); }
.sup-voltar .ic { width: 22px; height: 22px; }
.sup-conversas { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.sup-conv-tit { margin: 4px 2px 10px; font-size: 13px; font-weight: 700; color: var(--muted, #64748b); text-transform: uppercase; letter-spacing: .04em; }
.sup-conv-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; overflow-y: auto; flex: 1 1 auto; min-height: 0; max-height: min(56vh, 520px); }
.sup-conv-lista li { min-width: 0; }
.sup-conv { width: 100%; display: flex; align-items: flex-start; gap: 12px; text-align: left; font: inherit; color: var(--ink, #0f172a); background: #fff; border: 1.5px solid var(--line, #e2e8f0); border-radius: 14px; padding: 12px; cursor: pointer; min-width: 0; }
.sup-conv:hover, .sup-conv:focus-visible { border-color: var(--brand); outline: none; }
.sup-conv.sup-conv-ativa { border-color: color-mix(in srgb, var(--brand) 55%, #e2e8f0); background: color-mix(in srgb, var(--brand) 5%, #fff); }
.sup-conv-ic { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--fill, #f1f5f9); color: var(--muted, #64748b); }
.sup-conv.sup-conv-ativa .sup-conv-ic { background: var(--brand); color: var(--on-brand, #fff); }
.sup-conv-ic .ic { width: 18px; height: 18px; }
.sup-conv-txt { flex: 1 1 auto; min-width: 0; display: grid; gap: 3px; }
.sup-conv-linha { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-width: 0; }
.sup-conv-linha b { font-size: 15px; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sup-conv-linha small { flex: 0 0 auto; font-size: 12px; color: var(--muted, #64748b); }
.sup-conv-previa { font-size: 13.5px; color: var(--muted, #475569); line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.sup-conv-status { justify-self: start; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.sup-conv-status.st-ativa { background: color-mix(in srgb, var(--brand) 14%, #fff); color: var(--brand-600, var(--brand)); }
.sup-conv-status.st-fim { background: var(--fill, #f1f5f9); color: var(--muted, #64748b); }
.sup-conv-vazia { list-style: none; padding: 18px 8px; text-align: center; color: var(--muted, #64748b); font-size: 14px; line-height: 1.45; }
.sup-conv-acoes { padding-top: 12px; }
.sup-conv-acoes .btn { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.sup-conversas { padding: 4px 14px 14px; }
.sup-conv-lista { align-content: start; }
/* v0.1.69: "Nova conversa" sempre embaixo, perto da borda (a lista cresce e rola; o botão não sobe) */
.sup-conv-lista { max-height: none; }
.sup-conv-acoes { margin-top: auto; padding-top: 12px; }
.sup-conversas { padding-bottom: 12px; }
