/* Conta do cliente e comanda. Usa as cores e fontes de estilo.css. */

input[type="email"], input[type="password"], input[type="date"] {
  width: 100%; min-height: 52px; padding: 12px 14px;
  background: var(--branco); color: var(--preto);
  border: 2px solid var(--preto); border-radius: 0;
  font-family: var(--sans); font-size: 18px; line-height: 1.4;
}
input[readonly] { background: var(--papel); color: var(--cinza); }

/* Topo: conta e comanda ao lado do botão de orçamento */
.topo__conta { display: flex; align-items: center; gap: 8px 20px; margin-left: auto; }
.topo__link, .topo__comanda {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  text-decoration: none; color: var(--preto);
}
.topo__link[aria-current="page"], .topo__comanda[aria-current="page"] {
  text-decoration: underline; text-decoration-thickness: 3px; text-decoration-color: var(--vermelho);
}
.topo__bolha {
  display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px;
  background: var(--vermelho); color: var(--branco);
  font-family: var(--display); font-weight: 800; font-size: 17px; letter-spacing: 0;
}
.topo__conta + .botao { margin-left: 0; }
@media (max-width: 1020px) {
  .topo__conta { order: 2; }
  .topo .botao { order: 2; }
}
@media (max-width: 560px) {
  .topo__conta { order: 4; width: 100%; margin-left: 0; justify-content: flex-start; }
}

/* Aviso da prévia */
.aviso-previa {
  margin: 0; padding: 12px 16px; border-left: 6px solid var(--vermelho);
  background: var(--branco); font-size: 15px; line-height: 1.5; color: var(--grafite);
}

/* Abas criar / entrar */
.abas { display: flex; flex-wrap: wrap; gap: 0; border-bottom: 4px solid var(--preto); }
.abas button {
  min-height: 48px; padding: 8px 20px; border: 0; background: transparent; cursor: pointer;
  font-family: var(--display); font-weight: 800; font-size: 22px; text-transform: uppercase; color: var(--cinza);
}
.abas button[aria-selected="true"] { background: var(--preto); color: var(--branco); }
.abas button:focus-visible { outline: 3px solid var(--vermelho); outline-offset: 2px; }

/* Cartão branco */
.cartao { background: var(--branco); border: 4px solid var(--preto); padding: clamp(20px, 4vw, 36px); box-shadow: 10px 10px 0 var(--preto); max-width: 860px; }
.cartao h2 { margin: 0; }
.botao--borda { border-color: var(--preto); }
@media (min-width: 700px) { .cartao .campos-linha { grid-template-columns: 1fr 1fr; } }

/* Aviso de comanda aberta */
.aviso-comanda { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; background: var(--preto); color: var(--branco); padding: 16px 20px; max-width: 860px; }
.aviso-comanda p { margin: 0; color: var(--branco); font-weight: 600; }
.aviso-comanda .botao { background: var(--vermelho); border-color: var(--vermelho); font-size: 20px; min-height: 44px; }

/* Lista de comandas fechadas */
.pedidos { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; max-width: 860px; }
.pedido { background: var(--branco); border: 4px solid var(--preto); padding: 20px 24px; display: grid; gap: 10px; }
.pedido__cabeca { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; }
.pedido__cabeca strong { font-family: var(--display); font-weight: 800; font-size: 28px; text-transform: uppercase; line-height: 1; }
.pedido__status { background: var(--vermelho); color: var(--branco); padding: 4px 10px; font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.pedido .rotulo { margin: 0; }
.pedido__itens { margin: 0; padding-left: 20px; }
.pedido__total { margin: 0; font-weight: 600; }

/* Comanda */
.comanda { display: grid; gap: clamp(28px, 4vw, 48px); align-items: start; }
@media (min-width: 900px) { .comanda { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
.comanda__lista { display: grid; gap: 20px; }
.itens { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.item { background: var(--branco); border: 4px solid var(--preto); padding: 20px 24px; display: grid; gap: 14px; }
.item__topo { display: grid; gap: 4px; }
.item__nome { margin: 0; font-family: var(--display); font-weight: 900; font-size: clamp(30px, 3.4vw, 40px); line-height: 1; text-transform: uppercase; }
.item__vale { margin: 0; color: var(--vermelho); font-weight: 700; }
.item__controles { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.qtd-botao {
  width: 44px; height: 44px; border: 3px solid var(--preto); background: var(--branco); color: var(--preto);
  font-size: 24px; font-weight: 700; line-height: 1; cursor: pointer;
}
.qtd-botao:hover { background: var(--preto); color: var(--branco); }
.qtd-botao:disabled { opacity: 0.35; cursor: not-allowed; background: var(--branco); color: var(--preto); }
.item__qtd { min-width: 40px; text-align: center; font-family: var(--display); font-weight: 900; font-size: 32px; }
.item__tirar { margin-left: auto; min-height: 44px; padding: 0 4px; border: 0; background: none; color: var(--cinza); font: inherit; font-size: 15px; text-decoration: underline; cursor: pointer; }
.item__tirar:hover { color: var(--vermelho); }
.qtd-botao:focus-visible, .item__tirar:focus-visible { outline: 3px solid var(--vermelho); outline-offset: 2px; }

.cresumo { position: relative; }
@media (min-width: 900px) { .cresumo { position: sticky; top: 120px; } }
.cresumo__corpo { padding: clamp(20px, 3vw, 32px); }
.cresumo__linha { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; border-bottom: 2px solid var(--cinza-claro); padding-bottom: 12px; }
.cresumo__linha span { font-weight: 600; }
.cresumo__linha strong { font-family: var(--display); font-weight: 900; font-size: clamp(34px, 3.6vw, 46px); line-height: 1; white-space: nowrap; }
.cresumo__linha--vale, .cresumo__linha--vale strong { color: var(--vermelho); }
.cresumo__nota { margin: 0; color: var(--cinza); font-size: 15px; line-height: 1.5; }
.cresumo__quem { display: grid; gap: 4px; }
.cresumo__quem p { margin: 0; font-weight: 600; }
.cresumo .botao { width: 100%; }

/* Tela larga: com conta e comanda no topo, tudo numa linha só. */
@media (min-width: 1180px) {
  .topo { flex-wrap: nowrap; gap: 12px 20px; }
  .topo .marca { flex-shrink: 0; }
  .topo .marca__sub { white-space: nowrap; }
  .topo nav { gap: 4px 18px; flex-wrap: nowrap; }
  .topo nav a, .topo__link, .topo__comanda { letter-spacing: 0.12em; white-space: nowrap; }
  .topo__conta { gap: 16px; padding-left: 18px; border-left: 2px solid var(--cinza-claro); }
  .topo .botao { font-size: 19px; padding: 6px 14px; white-space: nowrap; }
}

/* Faixa intermediária: links numa segunda linha, como no celular. */
@media (min-width: 1021px) and (max-width: 1179px) {
  .topo nav { order: 3; width: 100%; border-top: 2px solid var(--preto); padding-top: 4px; }
  .topo__conta { margin-left: auto; }
  .topo .botao { margin-left: 0; }
}

/* Popup de cadastro / item na comanda */
.modal {
  width: min(680px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 0; overflow: auto;
  border: 4px solid var(--preto); box-shadow: 12px 12px 0 var(--vermelho); background: var(--branco); color: var(--preto);
}
.modal::backdrop { background: rgba(17, 17, 17, 0.62); }
.modal__faixa { position: sticky; top: 0; z-index: 1; flex-wrap: nowrap; }
.modal__faixa .faixa__titulo { font-size: clamp(28px, 4vw, 40px); }
.modal__fechar {
  flex: none; width: 44px; height: 44px; border: 2px solid var(--branco); background: transparent; color: var(--branco);
  font-size: 28px; line-height: 1; cursor: pointer;
}
.modal__fechar:hover { background: var(--branco); color: var(--preto); }
.modal__corpo { padding: clamp(18px, 4vw, 32px); }
.modal__texto { margin: 0; font-size: 18px; line-height: 1.5; }
.modal__previa { margin: 0; font-size: 14px; color: var(--cinza); }
.modal .campos-linha { gap: 16px; }
@media (min-width: 620px) { .modal .campos-linha { grid-template-columns: 1fr 1fr; } }
.modal .botao[type="submit"] { width: 100%; }
.modal :focus-visible { outline: 3px solid var(--vermelho); outline-offset: 2px; }
html.com-modal { overflow: hidden; }
@media (prefers-reduced-motion: no-preference) {
  .modal[open] { animation: modal-entra 0.22s ease-out; }
  @keyframes modal-entra { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
}
.campos-linha > .campo { align-content: start; }
@media (max-width: 560px) { .modal { box-shadow: 6px 6px 0 var(--vermelho); width: calc(100% - 20px); } }

/* ---------- Topo no celular: logo, comanda e botão Menu numa linha só ---------- */
.topo__menu, .topo nav .nav__conta { display: none; }
@media (max-width: 760px) {
  .barra .topo { flex-wrap: wrap; gap: 0 12px; padding-top: 10px; padding-bottom: 10px; }
  .topo .marca { order: 1; margin-right: auto; }
  .topo__conta { order: 2; width: auto; margin-left: 0; gap: 0; }
  .topo__link { display: none; }
  .topo__comanda { min-height: 44px; padding: 0 4px; font-size: 12px; letter-spacing: 0.12em; }
  .topo__menu {
    order: 3; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px;
    background: var(--preto); color: var(--branco); border: 0; cursor: pointer;
    font-family: var(--display); font-weight: 800; font-size: 19px; text-transform: uppercase; letter-spacing: 0.03em;
  }
  .topo__menu:focus-visible { outline: 3px solid var(--vermelho); outline-offset: 2px; }
  .topo__menu-icone { display: grid; gap: 4px; width: 18px; }
  .topo__menu-icone span { display: block; height: 2px; background: currentColor; transition: transform 0.2s ease, opacity 0.2s ease; }
  .menu-aberto .topo__menu-icone span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .menu-aberto .topo__menu-icone span:nth-child(2) { opacity: 0; }
  .menu-aberto .topo__menu-icone span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

  /* Fechado: só a primeira linha. */
  .topo nav, .topo > .botao { display: none; }

  /* Aberto: lista de páginas e o botão de orçamento. */
  .menu-aberto nav {
    order: 4; display: grid; width: 100%; gap: 0; margin-top: 10px; padding-top: 0; border-top: 4px solid var(--preto);
  }
  .menu-aberto nav a, .menu-aberto nav .nav__conta {
    display: flex; align-items: center; min-height: 56px; padding: 0 4px;
    border-bottom: 2px solid var(--cinza-claro);
    font-family: var(--display); font-weight: 800; font-size: 26px; letter-spacing: 0.02em; text-transform: uppercase; text-decoration: none;
  }
  .menu-aberto nav a[aria-current="page"] { color: var(--vermelho); text-decoration: none; box-shadow: inset 6px 0 0 var(--vermelho); padding-left: 16px; }
  .menu-aberto nav .nav__conta { font-family: var(--sans); font-weight: 600; font-size: 15px; letter-spacing: 0.14em; color: var(--cinza); border-bottom: 0; }
  .menu-aberto > .botao { order: 5; display: flex; width: 100%; margin: 8px 0 6px; font-size: 22px; min-height: 52px; }
}
@media (max-width: 380px) {
  .barra .marca__sub { display: none; }
  .topo__menu-texto { display: none; }
}

/* Popup: rola só para cima e para baixo (sem arrastar para os lados). */
.modal { overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; -webkit-overflow-scrolling: touch; }
.modal * { min-width: 0; max-width: 100%; }
.modal input, .modal select { width: 100%; }
/* No iPhone, o campo de data costuma ficar mais largo que a tela: */
input[type="date"] { -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%; text-align: left; }
input[type="date"]::-webkit-date-and-time-value { text-align: left; }
html.com-modal, html.com-modal body { overflow: hidden; overscroll-behavior: none; }

/* Ícone do carrinho (comanda) */
.topo__carrinho { width: 28px; height: 25px; flex: none; }
@media (min-width: 761px) { .topo__carrinho { width: 24px; height: 21px; } }

/* Celular: Menu à esquerda, logo no centro, carrinho à direita. */
@media (max-width: 760px) {
  .barra .topo { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; column-gap: 8px; }
  .topo__menu { order: 0; grid-column: 1; grid-row: 1; justify-self: start; }
  .topo .marca { grid-column: 2; grid-row: 1; justify-self: center; margin: 0; }
  .topo__conta { grid-column: 3; grid-row: 1; justify-self: end; }
  .topo__comanda { gap: 2px; padding: 0 2px; position: relative; }
  .topo__comanda-texto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .topo__comanda .topo__bolha { min-width: 22px; height: 22px; font-size: 15px; padding: 0 5px; }
  .menu-aberto nav { grid-column: 1 / -1; grid-row: 2; }
  .menu-aberto > .botao { grid-column: 1 / -1; grid-row: 3; }
  .barra .marca__texto { justify-items: center; }
}
@media (max-width: 380px) {
  .topo__menu { padding: 0 11px; }
}

/* O carrinho fala por si: o texto "Comanda" fica só para leitores de tela. */
.topo__comanda-texto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.topo__comanda { position: relative; }
@media (min-width: 761px) { .topo__carrinho { width: 28px; height: 25px; } }
.modal__sem-conta { justify-self: center; min-height: 44px; padding: 0 8px; border: 0; background: none; color: var(--cinza); font: inherit; font-size: 15px; text-decoration: underline; cursor: pointer; }
.modal__sem-conta:hover { color: var(--vermelho); }

/* Ficha de orçamento dentro da comanda */
.item--orcamento { border-left-width: 10px; border-left-color: var(--vermelho); }
.item__ficha { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; font-size: 16px; }
.item__ficha dt { font-weight: 600; color: var(--cinza); }
.item__ficha dd { margin: 0; }
.item--orcamento .item__tirar { margin-left: 0; }
.comanda-imagem { margin: 0; display: grid; gap: 8px; max-width: 520px; }
.comanda-imagem img { width: 100%; height: auto; border: 2px solid var(--cinza-claro); background: var(--papel); }
.comanda-imagem figcaption { font-size: 14px; color: var(--cinza); }
#enviar-whatsapp[aria-disabled="true"] { pointer-events: none; }

/* Topo: a logo encosta na margem esquerda da página e o menu ocupa a largura toda. */
.barra .topo { max-width: none; }
/* Telas médias: o menu cabe numa linha só, mesmo com o Home. */
@media (min-width: 761px) and (max-width: 1020px) {
  .topo nav { flex-wrap: nowrap; gap: 4px 14px; }
  .topo nav a { letter-spacing: 0.08em; font-size: 12px; white-space: nowrap; }
}
.item__fichas { display: grid; gap: 8px; }
.item__ficha-titulo { margin: 6px 0 0; font-family: var(--display); font-weight: 800; text-transform: uppercase; color: var(--vermelho); font-size: 18px; }

/* ---------- Login com o Google e e-mail ---------- */
.botao--google { background: var(--branco); color: var(--preto); border: 3px solid var(--preto); display: inline-flex; align-items: center; justify-content: center; gap: 12px; width: 100%; }
.botao--google:hover { background: #f2efe9; }
.botao--google[disabled] { opacity: 0.6; cursor: wait; }
.icone-google { width: 22px; height: 22px; flex: none; }
.ou { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 14px; color: #555; }
.ou::before, .ou::after { content: ""; flex: 1; height: 2px; background: currentColor; opacity: 0.25; }
.link-botao { background: none; border: 0; padding: 8px 4px; font: inherit; font-size: 15px; text-decoration: underline; cursor: pointer; color: inherit; min-height: 44px; }
.modal__conta { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.aviso-confirmar { border-color: var(--vermelho); }
.aviso-confirmar .botoes { gap: 12px; }
.aviso-confirmar .botao--claro { background: var(--branco); color: var(--preto); border-color: var(--branco); }
