/* UNYXFLUX — Novo Pedido V2 — Atendimentos em andamento fullscreen */
body.np-atend-open{
  overflow:hidden !important;
}

/* Quando a tela de Atendimentos estiver aberta, a navegação inferior global do app
   precisa sumir inteira. Antes apenas o FAB global (#addBtn) era ocultado, mas o
   item ativo "Pedidos" continuava aparecendo por baixo/ao lado do rodapé interno. */
body.np-atend-open #unyxMobileBottomNavV2,
body.np-atend-open .unyx-mobile-bottom-nav-v2,
body.np-atend-open .mobile-bottom-nav,
body.np-atend-open .bottom-nav,
body.np-atend-open #addBtn,
body.np-atend-open .unyx-mobile-bottom-nav-v2__slot-add,
body.np-atend-open .unyx-mobile-bottom-nav-v2__slot-add #addBtn{
  display:none !important;
  visibility:hidden !important;
  pointer-events:none !important;
}

.np-atend-screen,
.np-atend-screen *{
  box-sizing:border-box;
}

.np-atend-screen{
  position:fixed;
  inset:0;
  z-index:9999;
  display:none;
  width:100vw;
  height:100dvh;
  overflow:hidden;
  background:var(--unyx-d-bg,#f8f9fd);
  color:var(--unyx-d-text,#08112f);
  font-family:Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.np-atend-page{
  width:100%;
  height:100%;
  min-height:100dvh;
  display:flex;
  flex-direction:column;
  background:linear-gradient(180deg, var(--unyx-d-bg,#ffffff) 0%, var(--unyx-d-bg,#f8f9fd) 100%);
}

.np-atend-header{
  flex:0 0 auto;
  height:58px;
  padding:10px 16px 8px;
  display:grid;
  grid-template-columns:44px 1fr 44px;
  align-items:center;
  gap:8px;
  background:var(--unyx-d-card,#fff);
  border-bottom:1px solid rgba(106, 97, 160, .12);
}

.np-atend-icon-btn,
.np-atend-new-btn,
.np-atend-card-main,
.np-atend-delete{
  border:0;
  appearance:none;
  -webkit-appearance:none;
  font:inherit;
  cursor:pointer;
  background:transparent;
}

.np-atend-icon-btn{
  width:40px;
  height:40px;
  border-radius:14px;
  display:grid;
  place-items:center;
  color:var(--unyx-d-text,#0c1433);
}

.np-atend-icon-btn:active,
.np-atend-card-main:active,
.np-atend-new-btn:active{
  transform:scale(.985);
}

.np-atend-icon-btn img{
  width:22px;
  height:22px;
  display:block;
}

.np-atend-header-title{
  justify-self:center;
  font-size:15px;
  font-weight:900;
  letter-spacing:-.02em;
  color:var(--unyx-d-text,#07112d);
}

.np-atend-main{
  flex:1 1 auto;
  overflow:auto;
  padding:18px 16px calc(24px + env(safe-area-inset-bottom, 0px));
  -webkit-overflow-scrolling:touch;
}

.np-atend-section-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}

.np-atend-section-row h2{
  margin:0;
  font-size:11px;
  line-height:1.2;
  font-weight:900;
  letter-spacing:.035em;
  color:var(--unyx-d-text,#4f5568);
}

.np-atend-resumo{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:5px;
  max-width:58%;
}

.np-atend-resumo span{
  display:inline-flex;
  align-items:center;
  min-height:20px;
  padding:3px 7px;
  border-radius:999px;
  background:var(--unyx-d-tint-purple,#f1edff);
  color:var(--unyx-d-tone-purple,#4f22ff);
  font-size:10px;
  font-weight:850;
  white-space:nowrap;
}

.np-atend-list{
  display:grid;
  gap:12px;
}

.np-atend-card{
  position:relative;
  border-radius:15px;
  background:var(--unyx-d-card,#fff);
  border:1px solid var(--unyx-d-line,#eceef6);
  box-shadow:0 9px 24px rgba(15, 23, 42, .055);
  overflow:hidden;
}

.np-atend-card.is-active{
  border-color:#6d3cff;
  box-shadow:0 12px 28px rgba(79, 34, 255, .10);
}

.np-atend-card-main{
  width:100%;
  min-height:72px;
  padding:14px 38px 13px 13px;
  display:grid !important;
  grid-template-columns:38px minmax(0, 1fr) auto;
  align-items:center;
  gap:12px;
  text-align:left;
  color:inherit;
}

.np-atend-avatar{
  width:38px;
  height:38px;
  border-radius:999px;
  display:grid;
  place-items:center;
  color:#fff;
  font-size:13px;
  font-weight:950;
  letter-spacing:-.03em;
  background:#5b2cff;
}

.np-atend-avatar.tone-1{ background:linear-gradient(135deg, #6a37ff, #4f22ff); }
.np-atend-avatar.tone-2{ background:linear-gradient(135deg, #14b86f, #07954f); }
.np-atend-avatar.tone-3{ background:linear-gradient(135deg, #f8b419, #f59e0b); }
.np-atend-avatar.tone-4{ background:linear-gradient(135deg, #2f72ff, #1e55d8); }
.np-atend-avatar.tone-5{ background:linear-gradient(135deg, #667085, #344054); }

.np-atend-card-info{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:3px;
}

.np-atend-card-info strong{
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:13px;
  font-weight:950;
  color:var(--unyx-d-text,#09122f);
}

.np-atend-card-info span,
.np-atend-card-info small{
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:11px;
  line-height:1.2;
}

.np-atend-card-info span{
  color:var(--unyx-d-text,#1c2642);
  font-weight:750;
}

.np-atend-card-info small{
  color:var(--unyx-d-text,#596179);
  font-weight:650;
}

.np-atend-card-side{
  min-width:78px;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:5px;
  color:var(--unyx-d-text,#09122f);
}

.np-atend-card-side strong{
  font-size:12px;
  font-weight:950;
  white-space:nowrap;
}

.np-atend-card-side img{
  width:13px;
  height:13px;
  color:var(--unyx-d-tone-purple,#6d3cff);
  opacity:.8;
}

.np-atend-delete{
  position:absolute;
  right:8px;
  bottom:6px;
  width:24px;
  height:24px;
  border-radius:9px;
  display:grid;
  place-items:center;
  opacity:.45;
}

.np-atend-delete:hover,
.np-atend-delete:focus-visible{
  opacity:1;
  background:var(--unyx-d-tint-red,#fff1f1);
}

.np-atend-delete img{
  width:14px;
  height:14px;
}

.np-atend-card-foot{
  display:none;
}

.np-atend-new-btn{
  width:100%;
  min-height:52px;
  margin-top:16px;
  border:1.5px dashed #6d3cff;
  border-radius:15px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  background:rgba(var(--unyx-d-card-rgb,255,255,255),0.82);
  color:var(--unyx-d-tone-purple,#4f22ff);
  font-size:14px;
  font-weight:950;
  box-shadow:0 8px 18px rgba(79,34,255,.035);
}

.np-atend-new-btn span{
  width:23px;
  height:23px;
  border-radius:999px;
  display:grid;
  place-items:center;
  border:2px solid currentColor;
  font-size:18px;
  line-height:18px;
}

.np-atend-empty{
  min-height:210px;
  border-radius:18px;
  border:1.5px dashed rgba(109, 60, 255, .34);
  background:var(--unyx-d-card,#fff);
  display:grid;
  place-items:center;
  align-content:center;
  gap:10px;
  padding:28px 18px;
  text-align:center;
  box-shadow:0 10px 26px rgba(15, 23, 42, .045);
}

.np-atend-empty::before,
.np-atend-empty > img{
  grid-area:1 / 1;
}

/* O filtro do modo escuro deve atingir apenas o SVG. */
.np-atend-empty::before{
  content:"";
  width:44px;
  height:44px;
  border-radius:14px;
  background:var(--unyx-d-tint-purple,#f1edff);
}

.np-atend-empty > img{
  width:24px;
  height:24px;
}

.np-atend-empty strong{
  color:var(--unyx-d-text,#09122f);
  font-size:16px;
  font-weight:950;
}

.np-atend-empty span{
  max-width:260px;
  color:var(--unyx-d-text,#596179);
  font-size:13px;
  line-height:1.4;
  font-weight:600;
}

/* Campanha "Novo Pedido fullscreen mobile — remoção das abas" (2026-09-20):
   a barra inferior própria de Atendimentos (.np-atend-bottom) foi removida
   do HTML (ensureRoot() em novo_pedido_atendimentos_view.js) — 3 dos 4 itens
   nunca tiveram função (aria-disabled) e o único ativo era um noop. As regras
   de estilo correspondentes foram removidas junto para não deixar CSS órfão. */

@media (min-width: 720px){
  .np-atend-screen{
    background:var(--unyx-d-bg,#f8f9fd);
  }
  .np-atend-page{
    max-width:none;
    margin:0;
    border-left:0;
    border-right:0;
  }
}

/* Campanha "Novo Pedido fullscreen mobile" (2026-09-20): a Fase 4 escondia
   este cabeçalho porque a barra compartilhada do shell ficava por cima dele
   (duas barras ao mesmo tempo). Agora a tela pede ao shell para esconder a
   barra compartilhada quando abre (ver novo_pedido_atendimentos_view.js),
   então este cabeçalho volta a ser o único visível em apresentação
   fullscreen. Em apresentação embutida (.np-atend-embedded) ele continua
   oculto — ver regra mais abaixo, que permanece intacta. */

/* Campanha 2026-09-16 — Atendimentos/Pedidos em andamento embutidos.
   No módulo consumidor a página própria mobile continua existindo, mas dentro
   do content host; a navegação global do módulo permanece autoridade. */
.np-atend-screen.np-atend-embedded{
  position:relative;
  inset:auto;
  z-index:auto;
  width:100%;
  height:auto;
  min-height:0;
  overflow:visible;
}
.np-atend-screen.np-atend-embedded .np-atend-page{
  width:100%;
  height:auto;
  min-height:0;
}
.np-atend-screen.np-atend-embedded .np-atend-header{
  display:none;
}
.np-atend-screen.np-atend-embedded .np-atend-main{
  overflow:visible;
  padding:18px 16px 24px;
}

/* Modo escuro — ícones da tela de Atendimentos (fechar, seta, lixeira, estados vazios).
   São SVG com currentColor carregados via <img>: como imagem, currentColor vira preto e some no
   fundo escuro. Mesma técnica do fluxo (novo_pedido_flow_v1.css). Ícones "-roxo" têm cor fixa e ficam de fora. */
html.unyx-dark-theme .np-atend-screen img[src$=".svg"]:not([src*="roxo"]){
  filter:brightness(0) invert(1);
}
html.unyx-dark-theme .np-atend-card-side img{ opacity:.7; }
