/* Urban Chickroll web order — colours follow the shop theme (set by app.js from the menu). */
:root {
  --deep: #8B0D0D; --crimson: #D71919; --flame: #F04A20; --amber: #F7931E; --sun: #FFD43B; --leaf: #8FB326;
  --black: #140906; --panel: #26110A; --fg: #FFF4E0; --muted: #CDB894; --gold-light: #FFE57F; --line: rgba(247,147,30,.25);
  --bg-top: #8B0D0D; --bg-upper: #2E0E07; --bg-bottom: #221B07; --card-top: #2C150B; --card-bottom: #1C0D07;
  --radius: 16px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--fg);
  font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(180deg, var(--bg-top) 0, var(--bg-upper) 220px, var(--bg-bottom) 100%) fixed;
  background-color: var(--bg-upper);
  padding-bottom: 96px;
}
main, .top, .foot { max-width: 560px; margin: 0 auto; padding: 0 16px; }
[hidden] { display: none !important; }

.top { padding-top: 18px; padding-bottom: 6px; text-align: center; }
.top h1 {
  margin: 0; font-size: 34px; font-weight: 900; letter-spacing: .5px; color: #fff;
  text-shadow: 0 2px 0 var(--deep), 0 4px 14px rgba(0,0,0,.55);
}
.sub { margin: 2px 0 0; color: var(--gold-light); font-weight: 600; }
h2 { margin: 6px 0 10px; font-size: 22px; }
h3 { margin: 0 0 10px; }
.center { text-align: center; }
.small { font-size: 14px; }
.muted { color: var(--muted); }
.label { margin: 4px 0 0; font-weight: 700; color: var(--muted); }
.err { color: #fff; background: rgba(215,25,25,.35); border: 1px solid var(--crimson); padding: 10px 12px; border-radius: 12px; }

/* chips */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; min-height: 44px; padding: 0 16px; border-radius: 999px; font: inherit; font-weight: 700;
  color: var(--fg); background: var(--panel); border: 1px solid var(--line);
}
.chip[aria-pressed="true"] { background: var(--crimson); border-color: var(--sun); color: #fff; }

/* menu */
.cat { display: flex; align-items: center; gap: 12px; margin: 18px 0 8px; scroll-margin-top: 8px; }
.cat img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 2px solid var(--sun); }
.cat h2 { margin: 0; color: var(--sun); }
.item {
  position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; margin-bottom: 8px;
  border-radius: var(--radius); border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--card-top), var(--card-bottom));
}
.item.on { border: 2px solid var(--gold-light); background: linear-gradient(180deg, var(--deep), var(--card-bottom)); }
.item .info { flex: 1; min-width: 0; }
.item .name { font-weight: 800; font-size: 17px; }
.item .price { color: var(--sun); font-weight: 800; font-variant-numeric: tabular-nums; }
.item.off .info, .item.off .qty { opacity: .35; }
.stamp {
  position: absolute; right: 22px; top: 50%; transform: translateY(-50%) rotate(-14deg);
  padding: 2px 14px; border: 3px solid #E53935; border-radius: 8px; background: rgba(20,9,6,.8);
  color: #FF5252; font-weight: 900; font-size: 20px; letter-spacing: 3px; pointer-events: none;
}
.qty { display: flex; align-items: center; gap: 6px; }
.qty b { min-width: 24px; text-align: center; font-size: 18px; font-variant-numeric: tabular-nums; }
.round {
  width: 44px; height: 44px; border-radius: 50%; font-size: 24px; font-weight: 900; line-height: 1;
  border: 1px solid var(--line); background: var(--panel); color: var(--fg);
}
.round.add { background: var(--crimson); color: #fff; border-color: var(--crimson); }
.na { color: var(--amber); font-size: 14px; font-weight: 700; }

/* buttons */
button { font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { opacity: .45; cursor: default; }
.primary {
  min-height: 48px; padding: 0 22px; border-radius: 14px; border: 0; font-weight: 800; font-size: 17px;
  color: #fff; background: linear-gradient(180deg, var(--flame), var(--crimson));
  box-shadow: 0 3px 0 var(--deep);
}
.primary.big { display: block; width: 100%; min-height: 56px; margin: 14px 0; font-size: 18px; }
.ghost {
  display: block; width: 100%; min-height: 48px; margin: 10px 0; border-radius: 14px;
  color: var(--fg); background: transparent; border: 1px solid var(--line); font-weight: 700;
}
.link { background: none; border: 0; color: var(--gold-light); font-weight: 700; padding: 10px 0; min-height: 44px; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }

/* cart bar */
.bar {
  position: fixed; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 12px;
  padding: 12px max(16px, calc(50% - 264px)) calc(12px + env(safe-area-inset-bottom));
  background: rgba(20,9,6,.94); border-top: 2px solid var(--sun); backdrop-filter: blur(6px);
}
.bar > div { flex: 1; display: flex; flex-direction: column; }
.bar b { font-size: 22px; color: var(--sun); font-variant-numeric: tabular-nums; }

/* checkout */
.card {
  padding: 12px 14px; margin: 10px 0; border-radius: var(--radius); border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--card-top), var(--card-bottom));
}
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 3px 0; }
.row.gap { justify-content: flex-end; }
.line { padding: 8px 0; border-bottom: 1px solid var(--line); }
.line:last-child { border-bottom: 0; }
.line .note { color: var(--amber); font-size: 14px; }
.line .notebtn { background: none; border: 0; color: var(--muted); padding: 6px 0; min-height: 36px; font-size: 14px; text-decoration: underline; }
.field { display: block; margin: 14px 0 10px; }
.field span { display: block; margin-bottom: 6px; font-weight: 700; }
.field em { font-style: normal; font-weight: 400; color: var(--muted); }
input {
  width: 100%; min-height: 50px; padding: 0 14px; border-radius: 12px; font: inherit; font-size: 18px;
  color: var(--fg); background: var(--black); border: 1px solid var(--line);
}
input:focus { border-color: var(--sun); outline: none; }
.seg { display: flex; gap: 8px; margin: 10px 0; }
.seg button {
  flex: 1; min-height: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel);
  color: var(--fg); font-weight: 700;
}
.seg button[aria-checked="true"] { background: var(--crimson); border-color: var(--sun); color: #fff; }
#check-total { font-size: 22px; color: var(--sun); }

/* pay */
.amount { margin: 0; font-size: 44px; font-weight: 900; color: var(--sun); font-variant-numeric: tabular-nums; }
.qr-wrap { display: flex; justify-content: center; margin: 12px 0 6px; }
#qr { width: min(280px, 78vw); height: auto; background: #fff; border-radius: 12px; border: 6px solid #fff; }
.steps { padding-left: 22px; }
.steps li { margin: 6px 0; }
.wait { color: var(--gold-light); }
#done { position: relative; }
.badge { font-size: 54px; text-align: center; margin-top: 16px; position: relative; z-index: 1; }
.queue {
  margin: 0; font-size: 96px; font-weight: 900; line-height: 1; color: var(--sun); font-variant-numeric: tabular-nums;
  position: relative; z-index: 1;
}
.ready .badge { animation: ring 1.1s ease-in-out infinite; transform-origin: 50% 10%; }
.ready .queue { color: var(--gold-light); animation: glow 1.8s ease-in-out infinite; }
.queue.pop { animation: pop .7s cubic-bezier(.2, 1.6, .4, 1), glow 1.8s ease-in-out .7s infinite; }

/* Stepper: Antri -> Dibuat -> Siap */
.progress { position: relative; display: flex; justify-content: space-between; margin: 26px 6px 18px; z-index: 1; }
.rail {
  position: absolute; left: 32px; right: 32px; top: 27px; height: 8px; border-radius: 99px;
  background: var(--panel); border: 1px solid var(--line); overflow: hidden;
}
.fill {
  --p: 0; height: 100%; width: calc(var(--p) * 100%); border-radius: 99px;
  background: var(--leaf);
  background: repeating-linear-gradient(-45deg, var(--leaf) 0 12px, color-mix(in srgb, var(--leaf) 70%, #fff) 12px 24px);
  background-size: 34px 34px; animation: stripes .9s linear infinite;
  transition: width 1.2s cubic-bezier(.6, 0, .2, 1);
}
.progress.ready .fill { background: linear-gradient(90deg, var(--leaf), var(--sun)); animation: none; }
.step { position: relative; width: 72px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.dot {
  position: relative; width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center;
  background: var(--panel); border: 2px solid var(--line); transition: background .5s, border-color .5s, transform .5s;
}
.ico { font-size: 28px; filter: grayscale(1) opacity(.45); transition: filter .5s; }
.lbl { font-weight: 800; font-size: 14px; color: var(--muted); transition: color .5s; }
.step.done .dot { background: var(--leaf); border-color: var(--leaf); }
.step.done .ico, .step.now .ico { filter: none; }
.step.done .lbl, .step.now .lbl { color: var(--fg); }
.step.done:not(:last-child) .dot::after {
  content: "✓"; position: absolute; right: -4px; bottom: -4px; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-size: 13px; font-weight: 900; color: #10170A; background: var(--sun);
  animation: pop .5s cubic-bezier(.2, 1.6, .4, 1);
}
.step.now .dot { border-color: var(--sun); background: var(--panel); background: color-mix(in srgb, var(--sun) 18%, var(--panel)); animation: pulse 1.6s ease-out infinite; }
.step.now:nth-child(2) .ico { animation: wiggle 1.4s ease-in-out infinite; }
.step.now:nth-child(3) .ico { animation: cook .9s ease-in-out infinite; }
.progress.ready .step:last-of-type .dot { background: var(--sun); border-color: var(--gold-light); animation: pulse-gold 1.4s ease-out infinite; transform: scale(1.08); }
.progress.ready .step:last-of-type .ico { animation: ring 1.1s ease-in-out infinite; }

/* steam over the pan while it is being made */
.steam { position: absolute; top: -14px; left: 50%; width: 30px; height: 20px; transform: translateX(-50%); display: none; }
.step.now .steam { display: block; }
.steam i {
  position: absolute; bottom: 0; width: 6px; height: 14px; border-radius: 50%; background: rgba(255, 255, 255, .55);
  filter: blur(2px); animation: steam 1.8s ease-out infinite; opacity: 0;
}
.steam i:nth-child(1) { left: 2px; }
.steam i:nth-child(2) { left: 12px; animation-delay: .6s; }
.steam i:nth-child(3) { left: 22px; animation-delay: 1.2s; }

/* stars */
.sky { position: absolute; inset: -20px -8px 0; pointer-events: none; overflow: visible; z-index: 0; }
.star { position: absolute; line-height: 1; text-shadow: 0 0 10px currentColor; will-change: transform, opacity; }
.star.burst {
  left: var(--x); top: var(--y); font-size: calc(22px * var(--s)); opacity: 0;
  animation: burst 1.9s cubic-bezier(.15, .7, .3, 1) var(--d) forwards;
}
.sky:not(.on) .twinkle { display: none; }
.star.twinkle {
  left: var(--x); top: var(--y); font-size: calc(18px * var(--s)); opacity: 0;
  animation: twinkle var(--d) ease-in-out infinite alternate;
}

@keyframes stripes { to { background-position: 34px 0; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--sun) 70%, transparent); } 100% { box-shadow: 0 0 0 16px transparent; } }
@keyframes pulse-gold { 0% { box-shadow: 0 0 0 0 rgba(255, 212, 59, .8); } 100% { box-shadow: 0 0 0 22px rgba(255, 212, 59, 0); } }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }
@keyframes cook { 0%, 100% { transform: translateY(0) rotate(0); } 30% { transform: translateY(-5px) rotate(-8deg); } 60% { transform: translateY(0) rotate(6deg); } }
@keyframes steam { 0% { opacity: 0; transform: translateY(4px) scaleY(.6); } 30% { opacity: .8; } 100% { opacity: 0; transform: translateY(-16px) scaleY(1.3); } }
@keyframes ring { 0%, 100% { transform: rotate(0); } 10% { transform: rotate(16deg); } 20% { transform: rotate(-14deg); } 30% { transform: rotate(10deg); } 40% { transform: rotate(-6deg); } 50% { transform: rotate(0); } }
@keyframes glow { 0%, 100% { text-shadow: 0 0 12px rgba(255, 212, 59, .45); } 50% { text-shadow: 0 0 34px rgba(255, 212, 59, .95), 0 0 60px rgba(255, 160, 30, .5); } }
@keyframes pop { 0% { transform: scale(.3); opacity: 0; } 70% { transform: scale(1.18); opacity: 1; } 100% { transform: scale(1); } }
@keyframes burst {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.2) rotate(0); }
  12% { opacity: 1; }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy) + 40px)) scale(var(--s)) rotate(var(--r)); }
}
@keyframes twinkle { 0% { opacity: .1; transform: scale(.6) rotate(0); } 100% { opacity: 1; transform: scale(1.15) rotate(25deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .sky { display: none; }
}

dialog {
  width: min(92vw, 440px); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
  color: var(--fg); background: var(--panel);
}
dialog::backdrop { background: rgba(0,0,0,.6); }
dialog .row.gap button { width: auto; margin: 10px 0 0; }

.foot { display: flex; flex-direction: column; align-items: center; gap: 8px; padding-top: 24px; }
.ig {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 20px; border-radius: 999px;
  color: #fff; text-decoration: none; font-weight: 700; font-size: 16px;
  background: linear-gradient(45deg, #F58529, #DD2A7B 45%, #8134AF 75%, #515BD4);
  box-shadow: 0 3px 12px rgba(221, 42, 123, .35);
}
.ig b { font-weight: 900; }
.ig:active { transform: scale(.97); }
.wa { color: var(--muted); }
.sound {
  display: block; margin: 12px auto 0; min-height: 44px; padding: 0 16px; border-radius: 999px; position: relative; z-index: 1;
  font-weight: 700; font-size: 14px; color: var(--fg); background: var(--panel); border: 1px dashed var(--sun);
}
.sound.on { border-style: solid; border-color: var(--leaf); color: var(--leaf); }

/* "Hanya QRIS" notice (menu top + right above the order button) */
.qris-only {
  display: flex; align-items: center; gap: 12px; margin: 10px 0 4px; padding: 12px 14px; border-radius: 14px;
  background: #FFF4E0; color: #2A1206; border: 2px solid var(--sun); box-shadow: 0 3px 0 var(--deep);
  font-size: 15px; line-height: 1.35;
}
.qris-only b { color: #8B0D0D; }
.qris-only div span { color: #4A2A14; }
.qo-badge {
  flex: none; display: grid; place-items: center; width: 58px; height: 40px; border-radius: 10px;
  background: #8B0D0D; color: #fff; font-weight: 900; font-size: 14px; letter-spacing: 1px;
}
.qris-only.compact { margin: 14px 0 0; }

.down { margin-top: 18px; padding: 18px; }
.down .label { color: var(--fg); font-size: 18px; }
