/* ── Flash no contador ── */
@keyframes flash-contador {
  0%   { background-color: transparent;               color: #ffdd57; transform: scale(1);   }
  20%  { background-color: rgba(255, 221, 87, 0.55);                                         }
  40%  {                                              color: #fff;    transform: scale(1.2);  }
  100% { background-color: transparent;               color: #ffdd57; transform: scale(1);   }
}
.item-buttons span.flash {
  animation: flash-contador 0.3s ease-out;
}
body {
  font-family: sans-serif;
  background: #121212;
  color: #fff;
  padding: 20px;
  padding-top: 50px;  
  margin: 0 auto;
  text-align: center;
  max-width: 900px;
}
h2 {
  color: #ffdd57;
  margin-bottom: 30px;
}
summary {
  color: #ffdd57;
}
.item {
  margin-bottom: 30px;
  padding: 10px;
  border-radius: 10px;
  background: #1f1f1f;
}
.item-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}
.item-buttons button {
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 1.5rem;
}
.item-buttons span {
  min-width: 40px;
  display: inline-block;
  border-radius: 4px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: bold;
  color: #ffdd57;
}
.item-total {
  margin-top: 6px;
  font-size: .9em;
  color: #ccc;
}
button {
  padding: 12px 14px;
  font-size: 14px;
  background: #fff;
  color: #121212;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: .1s;
}
button:hover {
  transform: scale(1.05);
}
.financeiro {
  margin: 20px auto 0;
  max-width: 350px;
  background: #1f1f1f;
  padding: 20px;
  border-radius: 12px;
  text-align: left;
}
.resultado-card {
  margin-top: 40px;
  border: 2px solid #ffdd57;
  box-shadow: 0 0 10px rgba(255, 221, 87, 0.25);
}
/* ── Carga Necessária — destaque principal ── */
.pagar-card {
  text-align: center;
  background: #ffdd57;
  border: none;
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 0 0 32px rgba(255, 221, 87, 0.45);
}
.pagar-card strong {
  color: #121212;
  font-size: 1.0rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.pagar-card #carregar {
  display: block;
  margin-top: 10px;
  font-size: 3.0rem;
  font-weight: 900;
  color: #121212;
  letter-spacing: -1px;
  line-height: 1;
}
.troco-card {
  text-align: center;
  color: #ccc;
  border-color: #888;
}

.troco-card #troco {
  display: block;
  margin-top: 8px;
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
}
.entrada-card {
  border: 2px solid #888;
}
.resumo-caixa {
  margin-top: 20px;
  border: 2px solid #444;
}
.resumo-caixa pre {
  margin: 0;
  font-family: monospace;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre;
  color: #fff;
}
.financeiro label {
  display: block;
  margin-bottom: 15px;
  font-size: .95em;
}
.financeiro input {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  box-sizing: border-box;
}
summary {
  background: #333;
  padding: 10px;
  border-radius: 5px;
  margin-bottom: 5px;
  cursor: pointer;
  font-weight: bold;
  list-style: none;
  font-size: 1.03rem;
}
#pedido {
  margin-top: 40px;
  background: #1c1c1c;
  padding: 20px;
  border-radius: 10px;
  border: 2px solid #444;
}
#pedido h3 {
  color: #ffdd57;
}
#lista-pedido {
  list-style: none;
  padding: 0;
}
#lista-pedido li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0;
  font-size: .95em;
}
.qtd {
  width: 35px;
  text-align: right;
  font-weight: bold;
  flex-shrink: 0;
}
.resumo-item {
  text-align: left;
}

.link-item {
  color: #ffdd57;
  text-decoration: underline;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  touch-action: manipulation;
}
#btn-limpar {
  margin-top: 25px;
  width: 200px;
}
.rodape {
  margin-top: 50px;
  text-align: right;
  font-size: .75rem;
  color: #777;
}
/* ── Modal de confirmação ── */
#modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 200;
  align-items: center;
  justify-content: center;
}
#modal-overlay.ativo {
  display: flex;
}
#modal-box {
  background: #1f1f1f;
  border: 2px solid #ffdd57;
  border-radius: 16px;
  padding: 28px 24px;
  max-width: 320px;
  width: 90%;
  text-align: center;
  box-shadow: 0 0 30px rgba(255,221,87,0.2);
}
#modal-box p {
  margin: 0 0 24px;
  font-size: 1.05rem;
  color: #f0f0f0;
  line-height: 1.5;
}
.modal-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
}
.modal-btns button {
  flex: 1;
  padding: 12px;
  font-size: 0.95rem;
  border-radius: 10px;
}
#btn-confirmar-limpar {
  background: #e53935;
  color: #fff;
}
#btn-cancelar-limpar {
  background: #333;
  color: #fff;
}
@media (max-width: 600px) {
  .item-buttons button {
    padding: 12px 14px;
    font-size: 14px;
  }
  .item-buttons {
    flex-wrap: wrap;
    gap: 8px;
  }
  .financeiro {
    max-width: 100%;
  }
}
/* ── Sticky bar ── */
#sticky-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: #1a1a1a;
  border-top: 2px solid #999;
  border-bottom: 2px solid #999;
  box-shadow: 0 -4px 15px rgba(255, 221, 87, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 20px;
}

#sticky-total-label {
  font-size: 1rem;
  font-weight: bold;
  color: #c9c9c9;
  white-space: nowrap;
}

#sticky-total-valor {
  font-size: 1.5rem;
  font-weight: bold;
  color: #ffdd57;
  white-space: nowrap;
}

#sticky-ver-resumo {
  padding: 6px 15px;
  background: #fff0ae;
  color: #121212;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  flex-shrink: 0;
}

@media (max-width: 600px) {
  #sticky-bar {
    padding: 8px 14px;
    gap: 8px;
  }
  #sticky-total-label {
    font-size: 0.85rem;
  }
  #sticky-total-valor {
    font-size: 1.3rem;
  }
}