/* Editor do dono: "Meu cardápio" e "Minha loja" (22/11/2026). Só tokens do design system (--ds-*, ds/fila-ds.css):
   nenhuma cor da marca mora aqui. Celular primeiro: uma coluna, ação principal na barra de baixo, alvos de 44/56 px.
   A partir de 1100 px a prévia do cliente (iframe 390) fica fixa à direita. */
.ed { background: none; display: block; padding-bottom: 170px; }
.ed-pag .d-cab { margin-bottom: var(--ds-e2); }
.ed-col { display: grid; gap: var(--ds-e5); max-width: 720px; min-width: 0; }
.ed-cab { display: grid; gap: var(--ds-e2); }
.ed-cab h2 { font-size: var(--ds-t4); font-family: var(--ds-f-texto); font-weight: 700; line-height: 1.1; }
.ed-cab .ds-chips { margin-top: var(--ds-e2); }
.ed-acoes-topo { display: flex; gap: var(--ds-e3); }
.ed-acoes-topo .ds-btn { min-width: 200px; }
.ed-carregando { padding: var(--ds-e7) 0; color: var(--ds-tinta2); }
.ed-secao { gap: var(--ds-e4); }
.ed-secao h3, .ed-grupo h3, .ed-mais h3 { font-size: var(--ds-t2); }
.ed textarea { width: 100%; padding: var(--ds-e3) var(--ds-e4); border: 0; border-radius: var(--ds-raio); background: var(--ds-sup2); color: var(--ds-tinta); font: 400 var(--ds-t2)/1.4 var(--ds-f-texto); resize: vertical; min-height: 76px; box-shadow: inset 0 0 0 2px transparent; }
.ed textarea:focus { outline: 0; box-shadow: inset 0 0 0 2px var(--ds-acao); }
.ed .ds-campo > span { display: flex; justify-content: space-between; gap: var(--ds-e2); }
.ed .ds-campo small { font-weight: 400; font-size: var(--ds-t1); }
.ed-op[hidden] { display: none; }
.ed [aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--ds-erro) !important; }
.ed-erro { color: var(--ds-erro); min-height: 0; }
.ed-erro:empty { display: none; }

/* lista de itens: alça · foto · nome e preço · setas */
.ed-grupo { display: grid; gap: var(--ds-e3); }
.ed-grupo h3 { display: flex; align-items: baseline; gap: var(--ds-e2); }
.ed-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--ds-e2); }
.ed-linha { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: var(--ds-e2); background: var(--ds-sup); border-radius: var(--ds-raio); padding: var(--ds-e1) var(--ds-e2) var(--ds-e1) var(--ds-e1); transition: box-shadow var(--ds-dur) var(--ds-ease), transform var(--ds-dur) var(--ds-ease); }
.ed-linha.is-arrastando { box-shadow: var(--ds-sombra-flutua); transform: scale(1.01); position: relative; z-index: 2; }
.ed-alca { display: grid; place-items: center; width: 36px; height: 44px; color: var(--ds-tinta2); cursor: grab; touch-action: none; border-radius: var(--ds-r-p); }
.ed-alca:active { cursor: grabbing; }
.ed-abrir { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: var(--ds-e3); align-items: center; min-height: 64px; padding: var(--ds-e1) 0; border: 0; background: none; color: inherit; text-align: left; font: inherit; cursor: pointer; border-radius: var(--ds-r-p); }
.ed-mini { width: 52px; height: 52px; border-radius: calc(var(--ds-raio) - 4px); overflow: hidden; display: grid; place-items: center; background: var(--ds-sup2); font: var(--ds-titulo-peso) var(--ds-t3)/1 var(--ds-f-titulo); color: var(--ds-tinta2); }
.ed-mini img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ed-txt { display: grid; gap: 2px; min-width: 0; }
.ed-txt b { font-size: var(--ds-t2); line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-txt > span { font-size: var(--ds-t1); color: var(--ds-tinta2); }
.ed-etqs { display: flex; gap: var(--ds-e1); }
.ed-etq { font-style: normal; font-size: var(--ds-t1); font-weight: 700; padding: 0 var(--ds-e2); border-radius: var(--ds-r-pilula); background: var(--ds-acao-suave); color: var(--ds-tinta); }
.ed-etq--acabou { background: var(--ds-erro-suave); color: var(--ds-erro); }
.ed-setas { display: inline-flex; gap: 2px; }
.ed-ico { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: var(--ds-r-p); background: var(--ds-sup2); color: var(--ds-tinta); cursor: pointer; transition: transform var(--ds-dur) var(--ds-ease); }
.ed-ico:active { transform: scale(.96); }
.ed-ico:disabled { opacity: .35; cursor: default; }
.ed-vazio-cat { padding: var(--ds-e2) 0; }
.ed-linha--cat { grid-template-columns: 36px minmax(0, 1fr) auto auto; grid-template-areas: "alca nome nome nome" ". conta setas tirar"; padding: var(--ds-e2); }
.ed-linha--cat > .ed-alca { grid-area: alca; } .ed-linha--cat > .ed-campo-linha { grid-area: nome; } .ed-linha--cat > .ed-conta { grid-area: conta; justify-self: start; }
.ed-linha--cat > .ed-setas { grid-area: setas; } .ed-linha--cat > .ed-ico { grid-area: tirar; }
@media (min-width: 700px) { .ed-linha--cat { grid-template-columns: 36px minmax(0, 1fr) auto auto auto; grid-template-areas: "alca nome conta setas tirar"; } }
.ed-campo-linha input { min-height: var(--ds-toque-p); }
.ed-conta { min-width: 2ch; text-align: right; }

/* item aberto */
.ed-voltar { justify-self: start; display: inline-flex; align-items: center; gap: var(--ds-e2); min-height: var(--ds-toque-p); padding: 0 var(--ds-e3) 0 0; border: 0; background: none; color: var(--ds-acao-texto); font: 700 var(--ds-t2)/1 var(--ds-f-texto); cursor: pointer; }
.ed-foto { aspect-ratio: 4 / 3; max-width: 420px; width: 100%; border-radius: var(--ds-raio); overflow: hidden; background: var(--ds-sup2); display: grid; place-items: center; }
.ed-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ed-foto-vazia { padding: var(--ds-e5); text-align: center; color: var(--ds-tinta2); font-size: var(--ds-t1); max-width: 30ch; }
.ed-foto-botoes { display: flex; flex-wrap: wrap; gap: var(--ds-e2); }
.ed-foto-botoes .ds-btn { flex: 1 1 auto; white-space: nowrap; }
.ed-foto-botoes label { position: relative; }
.ed-foto-botoes label:focus-within { outline: 3px solid var(--ds-acao); outline-offset: 3px; }
.ed-rs { position: relative; display: block; }
.ed-rs i { position: absolute; left: var(--ds-e4); top: 50%; transform: translateY(-50%); font-style: normal; font-weight: 700; color: var(--ds-tinta2); pointer-events: none; }
.ed .ed-rs input { padding-left: 48px; font-variant-numeric: tabular-nums; }
.ed-switch { display: grid; grid-template-columns: minmax(0, 1fr) 52px; gap: var(--ds-e3); align-items: center; min-height: var(--ds-toque); cursor: pointer; }
.ed-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ed-switch-txt { display: grid; gap: 2px; }
.ed-switch > i { width: 52px; height: 32px; border-radius: var(--ds-r-pilula); background: var(--ds-sup2); position: relative; transition: background var(--ds-dur) var(--ds-ease); box-shadow: inset 0 0 0 1px var(--ds-linha); }
.ed-switch > i::after { content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: var(--ds-tinta2); transition: transform var(--ds-dur) var(--ds-ease), background var(--ds-dur) var(--ds-ease); }
.ed-switch input:checked ~ i { background: var(--ds-acao); }
.ed-switch input:checked ~ i::after { transform: translateX(20px); background: var(--ds-sobre-acao); }
.ed-switch input:focus-visible ~ i { outline: 3px solid var(--ds-acao); outline-offset: 3px; }
.ed-mais > div { gap: var(--ds-e4); }
.ed-tams, .ed-ops { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--ds-e3); }
/* tamanho: nome em cima; preço, quantos sabores e tirar embaixo (cabe em 390) */
.ed-tam { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: var(--ds-e2); align-items: end; padding-bottom: var(--ds-e3); border-bottom: 1px solid var(--ds-linha); }
.ed-tam > label:first-child { grid-column: 1 / -1; }
.ed-tam--3 { grid-template-columns: minmax(0, 1fr) 88px 44px; }
.ed-op { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--ds-e2) var(--ds-e3); align-items: end; padding-bottom: var(--ds-e3); border-bottom: 1px solid var(--ds-linha); }
.ed-op > label:first-child { grid-column: 1 / -1; }
.ed-op:not(:has(select)) > .ed-check { grid-column: 1; }
@media (min-width: 700px) {
  .ed-tam { grid-template-columns: minmax(0, 1fr) 140px 44px; } .ed-tam > label:first-child { grid-column: auto; }
  .ed-tam--3 { grid-template-columns: minmax(0, 1fr) 140px 88px 44px; }
  .ed-op { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 128px; } .ed-op > label:first-child { grid-column: auto; }
  .ed-op:not(:has(select)) { grid-template-columns: minmax(0, 1.4fr) 128px; }
  .ed-op > .ed-check { grid-column: 1; }
  .ed-op > .ed-op-fim { grid-column: -2 / -1; }
}
@media (min-width: 1100px) { body:has(.faixa-demo) .ed-previa { top: 56px !important; } }
.ed-check { display: flex; align-items: center; gap: var(--ds-e2); min-height: var(--ds-toque-p); font-weight: 700; font-size: var(--ds-t1); cursor: pointer; }
.ed-check input { width: 22px; height: 22px; accent-color: var(--ds-acao); }
.ed-op-fim { display: flex; justify-content: flex-end; gap: 2px; }
.ed-apagar { display: flex; }
.ed .ed-perigo { color: var(--ds-erro); background: var(--ds-erro-suave); }

/* minha loja */
.ed-cor { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: var(--ds-e3); align-items: end; }
.ed-cor-amostra { display: block; width: 64px; height: var(--ds-toque); border-radius: var(--ds-raio); overflow: hidden; box-shadow: inset 0 0 0 1px var(--ds-linha); }
.ed-cor-amostra input { width: 100%; height: 100%; border: 0; padding: 0; background: none; cursor: pointer; }
.ed-cor-amostra:focus-within { outline: 3px solid var(--ds-acao); outline-offset: 3px; }
.ed-amostra { display: inline-block; width: 18px; height: 18px; border-radius: 4px; vertical-align: -3px; box-shadow: inset 0 0 0 1px var(--ds-linha); }
.ed-logo { min-height: 96px; display: grid; place-items: center start; padding: var(--ds-e3); border-radius: var(--ds-raio); background: var(--ds-sup2); }
.ed-logo img { max-height: 96px; max-width: 260px; object-fit: contain; }
.ed-logo-svg { display: block; width: min(220px, 60vw); --logo-tinta: var(--ds-acao); --logo-fundo-simbolo: var(--ds-acao); --logo-filete: var(--ds-papel); }
.ed-logo-svg svg { width: 100%; height: auto; display: block; }
.ed-estruturas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ds-e3); }
.ed-estrutura { display: grid; gap: var(--ds-e1); padding: var(--ds-e2); border-radius: var(--ds-raio); background: var(--ds-sup2); cursor: pointer; box-shadow: inset 0 0 0 2px transparent; transition: box-shadow var(--ds-dur) var(--ds-ease); }
.ed-estrutura svg { width: 100%; height: auto; aspect-ratio: 3 / 4; border-radius: calc(var(--ds-raio) - 4px); display: block; background: var(--ds-papel); }
.ed-estrutura b { font-size: var(--ds-t2); }
.ed-estrutura:has(input:checked) { box-shadow: inset 0 0 0 3px var(--ds-acao); background: var(--ds-acao-suave); }
.ed-estrutura:has(input:focus-visible) { outline: 3px solid var(--ds-acao); outline-offset: 3px; }
.ed-qrs { justify-self: start; }
.ed-versoes .ed-v-lista { list-style: none; margin: 0; padding: 0; display: grid; }
.ed-v-lista li { display: flex; justify-content: space-between; gap: var(--ds-e3); padding: var(--ds-e2) 0; border-top: 1px solid var(--ds-linha); }

/* barra de baixo: estado + a ação principal */
.ed-barra { display: grid; gap: var(--ds-e2); justify-content: stretch; }
.ed-barra > .ed-barra-linha, .ed-barra > .ed-barra-botoes { display: flex; }   /* a barra do DS põe grid nos filhos */
.ed-barra-linha { display: flex; align-items: center; justify-content: space-between; gap: var(--ds-e3); }
.ed-estado { flex: 1 1 auto; margin: 0; }
.ed-barra-botoes { display: flex; gap: var(--ds-e2); justify-content: flex-end; }
.ed-barra-botoes .ds-btn { flex: 0 1 auto; }
.ed-barra-botoes .ds-btn:not(.ds-btn--sec) { flex: 1 1 160px; max-width: 280px; }
.ed-msg { padding: var(--ds-e2) var(--ds-e3); }
.ed .ed-ver { flex: none; min-height: var(--ds-toque-p); border-radius: var(--ds-r-pilula); padding: 0 var(--ds-e4); }

/* prévia (fica fora do #app para o iframe não recarregar a cada mudança) */
.ed-previa { display: none; }
body[data-ed-previa="1"] .ed-previa { display: grid; grid-template-rows: auto minmax(0, 1fr); position: fixed; inset: 0; z-index: 90; background: var(--ds-papel); }
.ed-previa-cab { display: flex; align-items: center; justify-content: space-between; gap: var(--ds-e3); padding: var(--ds-e3) var(--ds-e4); background: var(--ds-sup); }
.ed-previa-cab > div { display: grid; }
.ed-celular { min-height: 0; }
.ed-celular iframe { width: 100%; height: 100%; border: 0; display: block; background: var(--ds-papel); }
body[data-ed-previa="1"] { overflow: hidden; }

@media (min-width: 1100px) {
  body[data-ed="1"] .ed-pag { padding-right: 480px; }
  body[data-ed="1"] .ed-previa { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: var(--ds-e3); position: fixed; top: var(--ds-e5); right: var(--ds-e6); bottom: var(--ds-e5); width: 414px; z-index: 30; background: none; inset: var(--ds-e5) var(--ds-e6) var(--ds-e5) auto; }
  body[data-ed="1"] .ed-previa-cab { background: none; padding: 0 var(--ds-e2); }
  body[data-ed="1"] .ed-fechar, body[data-ed="1"] .ed .ed-ver { display: none; }
  body[data-ed="1"] .ed-celular { border-radius: 40px; padding: 12px; background: var(--ds-escuro); box-shadow: var(--ds-sombra-flutua); max-height: 860px; }
  body[data-ed="1"] .ed-celular iframe { width: 390px; border-radius: 28px; }
  .ed-barra { right: 480px; left: 0; border-radius: 0 var(--ds-raio) 0 0; }
  .ed-estruturas { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .ed-acoes-topo .ds-btn { flex: 1; }
  .ed-barra-botoes .ds-btn { flex: 1 1 0; max-width: none; }
}
.b-logo-img { display: block; width: 100%; height: auto; max-height: 120px; object-fit: contain; object-position: left center; }

/* tradução em espanhol e inglês (23/11) */
.ed-tr { margin-top: var(--ds-e4); }
.ed-tr-lista { display: grid; gap: var(--ds-e4); list-style: none; padding: 0; margin: 0; }
.ed-tr-linha { display: grid; gap: var(--ds-e2); padding-bottom: var(--ds-e3); border-bottom: 1px solid var(--ds-linha); }
.ed-tr-pt { display: grid; gap: 2px; font-weight: 600; overflow-wrap: anywhere; }
.ed-tr-pt .ds-nota { font-weight: 400; }
.ed-tr-pend { display: grid; gap: var(--ds-e2); margin-block: var(--ds-e3); }
@media (min-width: 720px) { .ed-tr-linha { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .ed-tr-pt { grid-column: 1 / -1; } }
