/* Choupal brand tokens — mirror packages/choupal_ui/lib/src/tokens.dart */
@font-face { font-family: Poppins; src: url(fonts/Poppins-Regular.ttf); font-weight: 400; font-display: swap; }
@font-face { font-family: Poppins; src: url(fonts/Poppins-SemiBold.ttf); font-weight: 600; font-display: swap; }

:root {
  --kulhad: #C4572E; --kulhad-deep: #A3441F; --haldi: #F2B33D; --coal: #2B2622; --coal-soft: #4A423C;
  --doodh: #FAF3E6; --patta: #3E6B48; --price: #B04A24; --muted: #6B5E52; --divider: #D9CBB4;
  --bubble: #EFE2C9; --veg: #2E7D32; --egg: #8B3A1A;
  --r-sm: 10px; --r-md: 12px;
  --latin: Poppins, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--doodh); color: var(--coal); font-family: var(--latin); font-size: 16px;
       padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
button { font: inherit; cursor: pointer; }
h1, h2 { font-weight: 600; margin: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--haldi); outline-offset: 2px; }

/* Header band (menu board top) */
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px;
       background: var(--kulhad); color: var(--doodh); padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top)); }
.coin { border-radius: 50%; flex-shrink: 0; }
.brand { flex: 1; min-width: 0; }
.wordmark { font-weight: 600; font-size: 26px; line-height: .95; letter-spacing: -0.02em; }
.tagline { color: var(--haldi); font-weight: 600; font-size: 12px; }
.table-chip { background: var(--haldi); color: var(--coal); font-weight: 600; border-radius: var(--r-sm);
              padding: 6px 12px; font-size: 15px; white-space: nowrap; }
.demo { background: var(--coal); color: var(--haldi); font-size: 13px; text-align: center; padding: 6px 16px; }

/* Categories */
.cats { position: sticky; top: 64px; z-index: 4; display: flex; gap: 8px; overflow-x: auto; padding: 10px 16px;
        background: var(--doodh); scrollbar-width: none; border-bottom: 1px solid var(--divider); }
.cats::-webkit-scrollbar { display: none; }
.cat { flex-shrink: 0; border: 1.5px solid var(--divider); background: #fff; color: var(--coal); border-radius: var(--r-sm);
       padding: 7px 14px; font-weight: 600; font-size: 14px; white-space: nowrap; }
.cat[aria-current="true"] { background: var(--haldi); border-color: var(--haldi); }

.search { display: block; padding: 12px 16px 0; }
.search input, .field input { width: 100%; font: inherit; font-size: 16px; padding: 11px 14px; border: 1.5px solid var(--divider);
       border-radius: var(--r-sm); background: #fff; color: var(--coal); }
.veg-toggle { padding: 8px 16px 0; font-size: 14px; color: var(--muted); }
.veg-toggle label { display: inline-flex; align-items: center; gap: 6px; }
.veg-mark, .egg-mark { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--veg); background: var(--doodh);
       position: relative; flex-shrink: 0; vertical-align: middle; }
.veg-mark::after, .egg-mark::after { content: ""; position: absolute; inset: 2px; border-radius: 50%; background: var(--veg); }
.egg-mark { border-color: var(--egg); } .egg-mark::after { background: var(--egg); }

/* Sections + item rows (menu board) */
section.menu-sec { padding: 14px 16px 4px; scroll-margin-top: 120px; }
.sec-pill { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--coal);
            color: var(--doodh); border-radius: var(--r-sm); padding: 8px 14px; font-weight: 600; font-size: 18px; margin: 0 0 4px; }
.row { display: flex; align-items: center; gap: 12px; padding: 9px 2px; border-bottom: 1px dashed var(--divider); }
.row.special { background: var(--haldi); border-radius: var(--r-sm); border: 0; padding: 8px 10px 8px 6px; margin-top: 4px; }
.row.sold { opacity: .5; }
.bubble { width: 56px; height: 56px; border-radius: 50%; background: var(--bubble); display: grid; place-items: center; flex-shrink: 0; }
.bubble svg { width: 46px; height: 46px; }
.bubble.big { width: 76px; height: 76px; } .bubble.big svg { width: 62px; height: 62px; }
.special .bubble { background: var(--doodh); }
.bubble .initial { color: var(--kulhad); font-weight: 600; font-size: 22px; }
.item-main { flex: 1; min-width: 0; background: none; border: 0; padding: 0; text-align: left; color: inherit; }
.item-name { font-size: 16px; line-height: 1.25; display: flex; gap: 6px; align-items: center; }
.special .item-name { font-weight: 600; }
.item-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.price { font-weight: 600; color: var(--price); font-size: 16px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.special .price { color: var(--coal); }
.add { border: 1.5px solid var(--kulhad); color: var(--kulhad); background: #fff; border-radius: var(--r-sm);
       font-weight: 600; font-size: 14px; padding: 7px 16px; min-width: 76px; }
.special .add { border-color: var(--coal); color: var(--coal); }
.stepper { display: inline-flex; align-items: center; border-radius: var(--r-sm); background: var(--kulhad); color: var(--doodh); min-width: 96px; }
.stepper button { background: none; border: 0; color: inherit; font-size: 20px; font-weight: 600; width: 34px; height: 36px; }
.stepper output { flex: 1; text-align: center; font-weight: 600; }
.foot-note { color: var(--muted); font-size: 13px; text-align: center; padding: 16px 24px; }

/* Cart bar */
.cart-bar { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 6;
            display: flex; align-items: center; gap: 12px; border: 0; border-radius: var(--r-md); background: var(--coal);
            color: var(--doodh); padding: 14px 18px; box-shadow: 0 8px 24px rgba(43,38,34,.3); text-align: left; }
.cart-total { color: var(--haldi); font-weight: 600; font-size: 18px; }
.cart-go { margin-left: auto; font-weight: 600; }

/* Sheets */
.scrim { position: fixed; inset: 0; background: rgba(43,38,34,.5); z-index: 7; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 8; background: var(--doodh); border-radius: 20px 20px 0 0;
         padding: 8px 18px calc(18px + env(safe-area-inset-bottom)); max-height: 88vh; overflow-y: auto;
         max-width: 640px; margin: 0 auto; }
.sheet.tall { padding-bottom: 0; }
.sheet:focus { outline: none; }
.sheet-grip { width: 44px; height: 5px; border-radius: 3px; background: var(--divider); margin: 4px auto 12px; }
.sheet-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.sheet-head h2 { font-size: 20px; }
.haldi-card { background: var(--haldi); border-radius: var(--r-md); padding: 12px 16px; margin-bottom: 12px; }
.haldi-title { font-weight: 600; font-size: 17px; margin-bottom: 6px; }
.addon { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 15px; }
.addon input { width: 20px; height: 20px; accent-color: var(--coal); }
.addon .p { margin-left: auto; font-weight: 600; }
.field { display: block; font-size: 13px; color: var(--muted); margin: 10px 0; }
.field input { margin-top: 4px; }
.sheet-actions { display: flex; gap: 12px; align-items: center; margin-top: 12px; }
.sheet-actions .stepper { min-width: 120px; height: 52px; }
.btn { border: 0; border-radius: var(--r-sm); min-height: 52px; padding: 0 20px; font-weight: 600; font-size: 16px; flex: 1; }
.btn-primary { background: var(--kulhad); color: var(--doodh); }
.btn-haldi { background: var(--haldi); color: var(--coal); width: 100%; margin-top: 12px; }
.btn-ghost { background: none; border: 1.5px solid var(--divider); color: var(--coal); width: 100%; margin-top: 16px; }
.btn:disabled { opacity: .5; }
.cart-line { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--divider); }
.cart-line .info { flex: 1; min-width: 0; }
.cart-line .n { font-weight: 600; font-size: 15px; }
.cart-line .x { font-size: 12px; color: var(--muted); }
.cart-line .note { font-size: 12px; color: var(--price); }
.cart-line .stepper { min-width: 92px; }
.cart-line .lt { width: 60px; text-align: right; font-weight: 600; color: var(--price); }
details.optional { margin: 6px 0 12px; font-size: 14px; }
details.optional summary { color: var(--kulhad); font-weight: 600; padding: 6px 0; }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--coal); }
.coal-band { background: var(--coal); color: var(--doodh); margin: 0 -18px; padding: 14px 18px calc(18px + env(safe-area-inset-bottom)); position: sticky; bottom: 0; }
.coal-band .row { border: 0; padding: 0; justify-content: space-between; font-weight: 600; font-size: 18px; }
.coal-band .big { color: var(--haldi); font-size: 24px; }
.coal-band small { color: var(--divider); font-size: 12px; }

/* Status */
.status-card { max-width: 480px; margin: 24px auto; padding: 24px 20px; text-align: center; }
.status-card h1 { font-size: 22px; margin: 16px 0 8px; }
.status-card p { color: var(--muted); }
.status-token-label { color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.status-token { font-size: 48px; font-weight: 600; color: var(--kulhad); line-height: 1.1; }
.status-table { font-weight: 600; margin-bottom: 20px; }
.steps { list-style: none; padding: 0; margin: 0 auto; text-align: left; max-width: 300px; }
.steps li { display: flex; gap: 12px; align-items: center; padding: 10px 0; color: var(--muted); font-weight: 600; }
.steps li::before { content: ""; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--divider); flex-shrink: 0; }
.steps li.done { color: var(--coal); } .steps li.done::before { background: var(--patta); border-color: var(--patta); }
.steps li.now { color: var(--coal); } .steps li.now::before { border-color: var(--kulhad); background: var(--haldi); }
.status-msg { margin-top: 16px; }
.status-lines { text-align: left; margin-top: 12px; border-top: 1px dashed var(--divider); }

.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--coal); color: var(--doodh);
         border-radius: var(--r-sm); padding: 10px 16px; font-size: 14px; z-index: 9; max-width: 90vw; }

@media (min-width: 900px) {
  #sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; max-width: 1100px; margin: 0 auto; }
  .search, .veg-toggle { max-width: 1100px; margin: 0 auto; }
}
@media (prefers-reduced-motion: no-preference) {
  .sheet:not([hidden]) { animation: up .22s ease-out; }
  @keyframes up { from { transform: translateY(40px); opacity: 0; } }
}

/* feedback page */
.fb { text-align: left; }
.fb h1, .fb .fb-hint, #fbThanks { text-align: center; }
.stars { display: flex; justify-content: center; gap: 6px; margin: 8px 0 0; }
.stars button { font-size: 44px; line-height: 1; background: none; border: 0; color: var(--divider); padding: 4px; min-width: 52px; min-height: 52px; }
.stars button.on { color: var(--haldi); }
.fb-hint { color: var(--muted); margin: 4px 0 12px; }
.fb-q { font-weight: 600; margin: 14px 0 6px; color: var(--coal); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { border: 1.5px solid var(--divider); background: #fff; color: var(--coal); border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 14px; min-height: 40px; }
.chips button[aria-pressed="true"] { background: var(--haldi); border-color: var(--haldi); font-weight: 600; }
.field textarea { width: 100%; font: inherit; font-size: 16px; padding: 11px 14px; border: 1.5px solid var(--divider); border-radius: var(--r-sm); margin-top: 4px; resize: vertical; }
.fb-send { width: 100%; margin-top: 16px; }
.fb-error { color: #B3261E; font-size: 14px; }
.fb-google { display: flex; align-items: center; justify-content: center; text-decoration: none; }
