/* NOWI — somente Voltar e largura do nome no celular. Homologação · 31/10/2026.
 * Mantém o botão, seu texto acessível, o ícone e o handler de navegação nativos.
 * Não seleciona ações de status, menus, compositor ou painel lateral.
 */
@media (max-width:767px) {
  .conversation-details-wrap > div:has(> .header-actions-wrap) > div:first-child > button:has(> .i-lucide-chevron-left) {
    font-size:0!important;
    line-height:0;
    flex:0 0 44px;
    width:44px;
    min-height:44px;
    justify-content:center;
    margin-inline-end:4px!important;
  }
  .conversation-details-wrap > div:has(> .header-actions-wrap) > div:first-child > button > .i-lucide-chevron-left {
    font-size:20px;
    line-height:24px;
    margin:0;
  }
  .conversation-details-wrap > div:has(> .header-actions-wrap) > div:first-child > div:has(> .conversation--header--actions) {
    flex:1 1 0%;
    min-width:0;
  }
}

/* NOWI — cabeçalho padronizado nos dois temas e em todos os formatos. 31/10/2026. */
body ninja-keys {--ninja-accent-color:#ff87ae!important}
.nowi-hml-status-icon {display:none}
.nowi-round-shortcut {display:none}
  body .conversation-details-wrap > .nowi-hml-round-header {
    display:flex;flex-direction:row;align-items:center;justify-content:space-between;
    flex:0 0 auto;gap:4px;height:auto;min-height:64px;padding:8px!important;
    background:#fff;color:#111;border-bottom:1px solid #e5e2e5;
  }
  body.dark .conversation-details-wrap > .nowi-hml-round-header {background:#25262b;color:#f7f5f0;border-color:#46474f}
  body .nowi-hml-round-header > :first-child {flex:1 1 0%;width:auto;min-width:0}
  body .nowi-hml-round-header > :first-child > button:has(> .i-lucide-chevron-left) {
    margin-inline-end:0!important;flex:0 0 44px;width:44px;min-height:44px;
    padding:0;border:0;border-radius:50%;font-size:0!important;line-height:0;
    justify-content:center;background:#f4f2f4;color:#242126;touch-action:manipulation;
  }
  body.dark .nowi-hml-round-header > :first-child > button:has(> .i-lucide-chevron-left) {background:#36343a;color:#f7f5f0}
  body .nowi-hml-round-header > :first-child > button > .i-lucide-chevron-left {font-size:20px;line-height:24px;margin:0}
  body .nowi-hml-round-header .conversation--header--actions {font-size:11px;line-height:16px;margin-top:2px}
  body .nowi-hml-round-header > :first-child > div:has(> .conversation--header--actions) {margin-inline-start:4px;min-width:0;flex:1 1 0%}
  body .nowi-hml-round-header > .header-actions-wrap {width:auto;flex:0 0 auto;gap:2px;justify-content:flex-end}
  body .nowi-hml-round-header [data-nowi-round-action=phone] {order:-2}
  body .nowi-hml-round-header [data-nowi-round-action=snooze] {order:-1}
  body .nowi-hml-round-header.nowi-round-phone-integrated #nowi-ligar-cabecalho {display:none!important}
  body .nowi-hml-round-header .actions--container,
  body .nowi-hml-round-header .resolve-actions {gap:2px}
  body .nowi-hml-round-header .nowi-hml-status-group {
    display:flex;align-items:center;gap:2px;box-shadow:none!important;outline:0!important;
    border:0!important;background:transparent!important;border-radius:0;transform:none!important;
  }
  body .nowi-hml-round-header .nowi-hml-status-group > button,
  body .nowi-hml-round-header #nowi-ligar-cabecalho,
  body .nowi-hml-round-header .actions--container > .group > button,
  body .nowi-hml-round-header > .header-actions-wrap > button {
    display:inline-flex!important;align-items:center;justify-content:center;gap:0!important;
    flex:0 0 44px;width:44px!important;height:44px!important;min-width:44px;min-height:44px;
    padding:0!important;margin:0!important;border-radius:50%!important;
    background:#f4f2f4!important;color:#242126!important;-webkit-text-fill-color:#242126!important;
    border:0!important;outline:0!important;box-shadow:none!important;touch-action:manipulation;
  }
  body.dark .nowi-hml-round-header .nowi-hml-status-group > button,
  body.dark .nowi-hml-round-header #nowi-ligar-cabecalho,
  body.dark .nowi-hml-round-header .actions--container > .group > button,
  body.dark .nowi-hml-round-header > .header-actions-wrap > button {
    background:#36343a!important;color:#f7f5f0!important;-webkit-text-fill-color:#f7f5f0!important;
  }
  body .nowi-hml-round-header .nowi-hml-status-group > button.nowi-hml-status-primary[aria-label="Resolver"],
  body.dark .nowi-hml-round-header .nowi-hml-status-group > button.nowi-hml-status-primary[aria-label="Resolver"] {
    background:#15803d!important;color:#fff!important;-webkit-text-fill-color:#fff!important;
  }
  body .nowi-hml-round-header .nowi-hml-status-primary > .min-w-0,
  body .nowi-hml-round-header #nowi-ligar-cabecalho > span {font-size:0;width:0;overflow:hidden}
  body .nowi-hml-round-header .nowi-hml-status-icon {display:inline-block;flex-shrink:0;width:20px;height:20px}
  body .nowi-hml-round-header #nowi-ligar-cabecalho > svg {width:20px!important;height:20px!important}
  body .nowi-hml-round-header .nowi-round-shortcut > span {display:block;width:20px;height:20px}
  body .nowi-hml-round-header .nowi-round-shortcut:disabled {opacity:.38;cursor:not-allowed}
  body .nowi-hml-round-header [data-nowi-round-action=phone] {position:relative}
  body .nowi-hml-round-header [data-nowi-round-action=phone]::after {
    content:'';position:absolute;right:5px;bottom:5px;width:7px;height:7px;
    border:1px solid #fff;border-radius:50%;background:#4b9273;
  }
  body .nowi-hml-round-header [data-call-state=off]::after {background:#8c8c92}
  body .nowi-hml-round-header [data-call-state=attention]::after {background:#b52d3c}
  body .nowi-hml-round-header [data-nowi-round-action=phone]:not([data-missed=""])::before {
    content:attr(data-missed);position:absolute;right:-2px;top:-3px;min-width:16px;height:16px;
    padding:0 3px;border-radius:9px;background:#b52d3c;color:#fff;font-size:10px;line-height:16px;
  }
  body .nowi-hml-round-header .i-lucide-chevron-down,
  body .nowi-hml-round-header .i-lucide-more-vertical {width:18px;height:18px}
  body .nowi-hml-round-header button:focus-visible {outline:2px solid #a22758!important;outline-offset:2px}
  body.dark .nowi-hml-round-header button:focus-visible {outline-color:#ff87ae!important}
  body .nowi-hml-round-header .resolve-actions > div:has(> ul) {inset-inline-start:auto;inset-inline-end:0}
@media(max-width:430px) {
  /* O nome tem prioridade sobre a foto. */
  body .nowi-hml-round-header > :first-child > span.group\/avatar {display:none}
}
@media(max-width:359px) {
  /* Cinco alvos de toque + nome não cabem com legibilidade numa linha em 320 px. */
  body .conversation-details-wrap > .nowi-hml-round-header {flex-wrap:wrap}
  body .nowi-hml-round-header > :first-child {flex:1 1 100%}
  body .nowi-hml-round-header > .header-actions-wrap {width:100%;justify-content:flex-end}
}

/* Ferramentas nativas do editor: círculos; Enviar mantém o rótulo em cápsula. */
body .conversation-details-wrap .resizable-editor-wrapper .reply-box .left-wrap button,
body .conversation-details-wrap .resizable-editor-wrapper .reply-box button:has(> .i-ph-sparkle-fill),
body .conversation-details-wrap .resizable-editor-wrapper .reply-box button:has(> .i-lucide-maximize-2),
body .conversation-details-wrap .resizable-editor-wrapper .reply-box button:has(> .i-lucide-minimize-2) {
  width:44px!important;height:44px!important;min-width:44px;min-height:44px;
  padding:0!important;border-radius:50%!important;flex-shrink:0;justify-content:center;
}
body .conversation-details-wrap .resizable-editor-wrapper .reply-box .right-wrap button {
  border-radius:999px!important;min-height:44px;padding-inline:18px;
}
