/* Espetaria Sabor em Brasas — pedido online (delivery, migration 019).
   Carrinho/checkout do site (js/delivery.js) e a página de acompanhamento
   (acompanhar.html, js/acompanhar.js). Usa as variáveis de css/styles.css. */

.dl-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* -------- botão do cardápio -------- */
.menu-item-add {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; white-space: nowrap;
  border: 1px solid var(--accent); background: var(--accent); color: var(--bg); padding: 8px 12px;
  transition: background .22s ease, border-color .22s ease, transform .15s ease;
}
.menu-item-add:hover { background: var(--accent-lighter); border-color: var(--accent-lighter); }
.menu-item-add:active { transform: scale(.97); }
.menu-item-add:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 3px; }
/* Celular: mesma linha do preço e do "Pedir" (grid-area add — ver
   .menu-item em css/styles.css), com área de toque de 48px. */
@media (max-width: 860px) {
  .menu-item-add {
    grid-area: add; justify-self: end; align-self: center;
    min-height: 48px; display: inline-flex; align-items: center; justify-content: center; padding: 12px 14px;
  }
}
@media (max-width: 380px) { .menu-item-add { padding: 12px 10px; letter-spacing: .1em; } }

/* -------- botão flutuante do carrinho / atalho do acompanhamento -------- */
.dl-fab, .dl-track {
  position: fixed; left: 18px; bottom: 18px; z-index: 56; display: inline-flex; align-items: center; gap: 10px;
  max-width: calc(100vw - 36px - 170px); min-height: 48px; padding: 12px 16px;
  font-family: var(--font-display); font-size: 13px; letter-spacing: .12em; text-transform: uppercase;
  box-shadow: 0 12px 34px rgba(0,0,0,.5);
}
.dl-fab { border: 1px solid var(--brass); background: #f3e7d3; color: #1a100b; }
.dl-fab:hover { background: #fff4e2; }
.dl-fab[hidden], .dl-track[hidden], .dl-overlay[hidden] { display: none; }
.dl-fab-icon { width: 20px; height: 20px; flex: none; }
.dl-fab-count {
  display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 999px; background: var(--accent); color: #fff; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0;
}
.dl-fab-total { white-space: nowrap; }
.dl-fab.is-bump { animation: dlBump .45s var(--ease-out); }
@keyframes dlBump { 0% { transform: scale(1); } 40% { transform: scale(1.08); } 100% { transform: scale(1); } }
.dl-track { border: 1px solid rgba(200,138,88,.5); background: rgba(13,13,15,.92); color: var(--ink); font-size: 12px; }
.dl-track:hover { color: var(--accent-lighter); border-color: var(--accent-light); }
.dl-track span { font-family: var(--font-mono); letter-spacing: .08em; color: var(--accent-light); }
@media (max-width: 520px) {
  .dl-fab-label { display: none; }
  .dl-fab, .dl-track { left: 12px; bottom: 14px; padding: 12px 14px; max-width: calc(100vw - 24px - 160px); }
}

/* -------- janela (bottom sheet no celular, gaveta lateral no desktop) -------- */
body.dl-open { overflow: hidden; }
.dl-overlay { position: fixed; inset: 0; z-index: 120; display: flex; justify-content: flex-end; align-items: stretch; background: rgba(5,5,6,.72); }
.dl-sheet {
  display: flex; flex-direction: column; width: min(460px, 100%); max-height: 100%; height: 100%;
  background: #17181b; color: var(--ink); border-left: 1px solid var(--border-brass);
  box-shadow: -24px 0 60px rgba(0,0,0,.5); animation: dlSlideIn .28s var(--ease-out);
}
@keyframes dlSlideIn { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 640px) {
  .dl-overlay { align-items: flex-end; }
  .dl-sheet { width: 100%; height: auto; max-height: 92vh; max-height: 92dvh; border-left: 0; border-top: 1px solid var(--border-brass); animation-name: dlSlideUp; }
  @keyframes dlSlideUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
}
.dl-head { display: flex; align-items: center; gap: 10px; padding: 16px 16px 12px; border-bottom: 1px solid rgba(255,255,255,.07); }
.dl-title { flex: 1 1 auto; min-width: 0; margin: 0; font-family: var(--font-display); font-size: 20px; letter-spacing: .06em; text-transform: uppercase; color: #fff; overflow-wrap: anywhere; }
.dl-icon-btn {
  flex: none; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid #3a3b40; background: transparent; color: var(--ink); font-size: 22px; line-height: 1;
}
.dl-icon-btn:hover { border-color: var(--accent); color: var(--accent-light); }
.dl-body { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.dl-foot { display: flex; flex-wrap: wrap; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid rgba(255,255,255,.07); background: #131416; }
.dl-foot .dl-btn { flex: 1 1 160px; }

.dl-note { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-dim); }
.dl-price { margin: 0; font-family: var(--font-display); font-size: 24px; color: var(--accent-light); }
.dl-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--brass); }
.dl-help { font-size: 12px; color: var(--ink-mute); }
.dl-error { font-size: 13px; color: #ff8a65; }
.dl-alert { margin: 0; padding: 12px 14px; border: 1px solid rgba(230,90,30,.45); border-left: 3px solid var(--accent); background: rgba(230,90,30,.12); font-size: 14px; line-height: 1.5; }
.dl-alert.is-error { border-color: rgba(255,138,101,.5); border-left-color: #ff8a65; }
.dl-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.dl-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 16px; text-align: center;
  border: 1px solid #4a4b50; background: transparent; color: var(--ink);
  font-family: var(--font-display); font-size: 14px; letter-spacing: .1em; text-transform: uppercase;
}
.dl-btn:hover { border-color: var(--accent-light); color: #fff; }
.dl-btn-primary { border-color: var(--accent); background: var(--accent); color: #fff; }
.dl-btn-primary:hover { background: var(--accent-lighter); border-color: var(--accent-lighter); color: var(--bg); }
.dl-btn:disabled { opacity: .5; cursor: not-allowed; }
.dl-btn-block { width: 100%; }
.dl-link { background: none; border: 0; padding: 4px 0; color: var(--ink-mute); font-size: 12px; text-decoration: underline; }
.dl-link:hover { color: #ff8a65; }

.dl-stepper { display: inline-flex; align-items: center; border: 1px solid #4a4b50; }
.dl-step-btn { width: 44px; height: 44px; border: 0; background: transparent; color: var(--ink); font-size: 20px; line-height: 1; }
.dl-step-btn:hover:not(:disabled) { background: rgba(230,90,30,.15); color: #fff; }
.dl-step-btn:disabled { opacity: .35; cursor: not-allowed; }
.dl-step-value { min-width: 36px; text-align: center; font-family: var(--font-mono); font-size: 15px; }

.dl-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.dl-line { display: flex; gap: 12px; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.07); }
.dl-line.has-problem { border-left: 3px solid #ff8a65; padding-left: 10px; }
.dl-line-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dl-line-name { font-family: var(--font-display); font-size: 16px; letter-spacing: .04em; text-transform: uppercase; color: #fff; overflow-wrap: anywhere; }
.dl-line-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.dl-line-total { font-family: var(--font-display); font-size: 16px; color: var(--accent-light); white-space: nowrap; }
.dl-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 4px; font-family: var(--font-display); font-size: 20px; text-transform: uppercase; letter-spacing: .06em; color: #fff; }

.dl-field { display: flex; flex-direction: column; gap: 6px; }
.dl-input {
  width: 100%; min-height: 46px; padding: 11px 12px; border: 1px solid #3a3b40; background: #0f1012; color: #fff;
  font-family: var(--font-body); font-size: 16px; border-radius: 0;
}
textarea.dl-input { resize: vertical; min-height: 64px; line-height: 1.5; }
.dl-input:focus { border-color: var(--accent-light); outline: none; box-shadow: 0 0 0 2px rgba(245,158,11,.25); }
.dl-field.has-error .dl-input { border-color: #ff8a65; }
.dl-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 420px) { .dl-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } .dl-grid .dl-field:nth-child(n+3) { grid-column: 1 / -1; } }
.dl-fieldset { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.dl-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 120px), 1fr)); gap: 8px; }
.dl-choice {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-height: 48px; padding: 10px 12px; text-align: left;
  border: 1px solid #3a3b40; background: #0f1012; color: var(--ink);
}
.dl-choice:hover { border-color: var(--brass); }
.dl-choice.is-active { border-color: var(--accent); background: rgba(230,90,30,.16); color: #fff; box-shadow: inset 0 0 0 1px var(--accent); }
.dl-choice-title { font-family: var(--font-display); font-size: 15px; letter-spacing: .06em; text-transform: uppercase; }
.dl-choice-sub { font-size: 12px; color: var(--ink-mute); line-height: 1.35; }
.dl-fieldset.has-error .dl-choice { border-color: rgba(255,138,101,.6); }

.dl-done { align-items: center; text-align: center; justify-content: center; }
.dl-code {
  margin: 0; padding: 14px 22px; border: 1px dashed var(--brass); font-family: var(--font-mono); font-weight: 700;
  font-size: clamp(34px, 11vw, 48px); letter-spacing: .22em; color: #fff; user-select: all;
}

/* -------- acompanhar.html -------- */
.ac-page { min-height: 100vh; min-height: 100dvh; background: radial-gradient(120% 60% at 50% 0%, #2c1a10 0%, #0b0908 60%); color: var(--ink); }
.ac-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 720px; margin: 0 auto; padding: 16px; }
.ac-logo { width: 64px; height: auto; }
.ac-back { font-family: var(--font-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink); border: 1px solid #4a4b50; padding: 12px 14px; }
.ac-back:hover { border-color: var(--accent); color: var(--accent-lighter); }
.ac-main { max-width: 720px; margin: 0 auto; padding: 8px 16px 48px; display: flex; flex-direction: column; gap: 20px; }
.ac-card { border: 1px solid var(--border-brass); background: rgba(23,24,27,.92); padding: clamp(16px, 4vw, 24px); display: flex; flex-direction: column; gap: 14px; }
.ac-eyebrow { margin: 0; font-family: var(--font-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--brass); }
.ac-code { margin: 0; font-family: var(--font-mono); font-weight: 700; font-size: clamp(30px, 9vw, 44px); letter-spacing: .2em; color: #fff; }
.ac-status { margin: 0; font-family: var(--font-display); font-size: clamp(24px, 6vw, 34px); text-transform: uppercase; letter-spacing: .04em; color: var(--accent-light); }
.ac-status.is-cancelled { color: #ff8a65; }
.ac-status.is-done { color: #7fd1a4; }
.ac-updated { margin: 0; font-size: 12px; color: var(--ink-mute); }
.ac-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ac-step { position: relative; display: flex; gap: 14px; padding: 0 0 22px; color: var(--ink-mute); }
.ac-step:last-child { padding-bottom: 0; }
.ac-step::before { content: ''; position: absolute; left: 13px; top: 30px; bottom: 2px; width: 2px; background: #2e2f33; }
.ac-step:last-child::before { display: none; }
.ac-step-dot {
  position: relative; z-index: 1; flex: none; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid #3a3b40; border-radius: 999px; background: #0f1012; font-family: var(--font-mono); font-size: 12px;
}
.ac-step-text { display: flex; flex-direction: column; gap: 2px; padding-top: 3px; }
.ac-step-title { font-family: var(--font-display); font-size: 17px; letter-spacing: .05em; text-transform: uppercase; }
.ac-step-time { font-family: var(--font-mono); font-size: 11px; }
.ac-step.is-done { color: var(--ink); }
.ac-step.is-done .ac-step-dot { border-color: var(--accent); background: var(--accent); color: #fff; }
.ac-step.is-done::before { background: var(--accent); }
.ac-step.is-current .ac-step-dot { border-color: var(--accent-light); color: var(--accent-light); box-shadow: 0 0 0 4px rgba(245,158,11,.18); animation: acPulse 1.8s ease-in-out infinite; }
.ac-step.is-current .ac-step-title { color: #fff; }
@keyframes acPulse { 0%, 100% { box-shadow: 0 0 0 4px rgba(245,158,11,.18); } 50% { box-shadow: 0 0 0 8px rgba(245,158,11,.05); } }
.ac-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ac-item { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.ac-item span:last-child { white-space: nowrap; color: var(--ink-dim); }
.ac-total { display: flex; justify-content: space-between; gap: 12px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.08); font-family: var(--font-display); font-size: 20px; text-transform: uppercase; color: #fff; }
.ac-muted { margin: 0; font-size: 14px; line-height: 1.6; color: var(--ink-dim); }

@media (prefers-reduced-motion: reduce) {
  .dl-sheet, .dl-fab.is-bump, .ac-step.is-current .ac-step-dot { animation: none; }
}
