/* Event sales app. Tokens and pixel corners follow design/tokens.css of the storefront. */
@font-face { font-family: 'Inter Tight'; src: url('/fonts/kh-inter-tight-cyrillic.woff2') format('woff2'); font-weight: 100 900; font-display: swap; unicode-range: U+0400-04FF, U+2116, U+20B4; }
@font-face { font-family: 'Inter Tight'; src: url('/fonts/kh-inter-tight-latin.woff2') format('woff2'); font-weight: 100 900; font-display: swap; unicode-range: U+0000-03FF, U+2000-20B3, U+20B5-2115, U+2117-2BFF; }

:root {
  --ink: #111111; --bone: #F4F4F2; --steel: #8C8C8E; --concrete: #C5C5C5; --mint: #DFF5DF; --sand: #DDB38D; --white: #FFFFFF;
  --text-2: #444444; --text-3: #6A6A6A; --line: #E3E3E3;
  --font-text: 'Inter Tight', system-ui, sans-serif;
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --pxb: polygon(0 8px,4px 8px,4px 4px,8px 4px,8px 0,calc(100% - 8px) 0,calc(100% - 8px) 4px,calc(100% - 4px) 4px,calc(100% - 4px) 8px,100% 8px,100% calc(100% - 8px),calc(100% - 4px) calc(100% - 8px),calc(100% - 4px) calc(100% - 4px),calc(100% - 8px) calc(100% - 4px),calc(100% - 8px) 100%,8px 100%,8px calc(100% - 4px),4px calc(100% - 4px),4px calc(100% - 8px),0 calc(100% - 8px));
  --pxt: polygon(0 4px,2px 4px,2px 2px,4px 2px,4px 0,calc(100% - 4px) 0,calc(100% - 4px) 2px,calc(100% - 2px) 2px,calc(100% - 2px) 4px,100% 4px,100% calc(100% - 4px),calc(100% - 2px) calc(100% - 4px),calc(100% - 2px) calc(100% - 2px),calc(100% - 4px) calc(100% - 2px),calc(100% - 4px) 100%,4px 100%,4px calc(100% - 2px),2px calc(100% - 2px),2px calc(100% - 4px),0 calc(100% - 4px));
}
* { box-sizing: border-box; margin: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; background: var(--white); color: var(--ink); font: 16px/24px var(--font-text); }
body { overscroll-behavior: none; }
#app { height: 100dvh; max-width: 560px; margin: 0 auto; }
button, input { font: inherit; color: inherit; border: 0; background: none; }
button { cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.icon { display: block; shape-rendering: crispEdges; fill: currentColor; flex: none; }

.screen { height: 100%; display: flex; flex-direction: column; padding-bottom: env(safe-area-inset-bottom); }
.bar { display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 0 16px; flex: none; }
.bar h1 { font-size: 22px; line-height: 26px; font-weight: 600; flex: 1; }
.scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 0 16px; }
.foot { flex: none; padding: 12px 16px 16px; display: grid; gap: 8px; border-top: 1px solid var(--line); background: var(--white); }
.kicker { font: 500 14px/18px var(--font-text); color: var(--text-3); }
.quiet { color: var(--text-3); }
.num { font-weight: 600; font-variant-numeric: tabular-nums; }

.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; margin-left: -12px; }
.icon-btn:last-child { margin: 0 -12px 0 0; }
.btn { min-height: 56px; width: 100%; padding: 0 16px; clip-path: var(--pxb); font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 8px; transition: opacity 120ms; }
.btn:disabled { background: var(--concrete); color: var(--text-3); }
.btn-ink { background: var(--ink); color: var(--white); }
.btn-bone { background: var(--bone); color: var(--ink); }
.btn-mint { background: var(--mint); color: var(--ink); }
.btn-white { background: var(--white); color: var(--ink); }
.btn .num { font-weight: 400; }
.lnk { text-decoration: underline; text-underline-offset: 3px; min-height: 44px; padding: 0 4px; font-size: 15px; }

/* Login */
.login { justify-content: center; padding: 16px; gap: 20px; }
.login h1 { font-size: 36px; line-height: 40px; font-weight: 600; }
.field { width: 100%; height: 56px; padding: 0 16px; background: var(--bone); clip-path: var(--pxb); outline: none; }
.field-pin { font: 600 24px/56px var(--font-text); letter-spacing: 8px; text-align: center; }
.error { background: var(--sand); clip-path: var(--pxb); padding: 12px 16px; font-size: 15px; line-height: 20px; }

/* Scanner */
.scan { background: var(--ink); color: var(--white); position: relative; overflow: hidden; }
.scan video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scan-bar { position: relative; color: var(--white); background: linear-gradient(rgb(17 17 17 / .7), transparent); }
.scan-frame { position: relative; flex: 1; display: grid; place-items: center; padding: 16px; text-align: center; }
.scan-window { width: min(84%, 340px); aspect-ratio: 2 / 1; position: relative; }
.scan-window::before, .scan-window::after { content: ''; position: absolute; inset: 0; pointer-events: none; }
.scan-window::before { background:
  linear-gradient(var(--white) 0 0) 0 0 / 28px 3px no-repeat, linear-gradient(var(--white) 0 0) 0 0 / 3px 28px no-repeat,
  linear-gradient(var(--white) 0 0) 100% 0 / 28px 3px no-repeat, linear-gradient(var(--white) 0 0) 100% 0 / 3px 28px no-repeat,
  linear-gradient(var(--white) 0 0) 0 100% / 28px 3px no-repeat, linear-gradient(var(--white) 0 0) 0 100% / 3px 28px no-repeat,
  linear-gradient(var(--white) 0 0) 100% 100% / 28px 3px no-repeat, linear-gradient(var(--white) 0 0) 100% 100% / 3px 28px no-repeat; }
.scan-hint { position: absolute; left: 0; right: 0; top: calc(100% + 16px); font-size: 15px; line-height: 20px; }
.scan-off { max-width: 300px; display: grid; gap: 12px; }
.scan-foot { position: relative; padding: 12px 16px 16px; display: grid; gap: 8px; background: linear-gradient(transparent, rgb(17 17 17 / .7) 24px); }

/* Sheet */
.sheet { position: fixed; inset: 0; z-index: 10; display: flex; flex-direction: column; justify-content: flex-end; background: rgb(17 17 17 / .55); animation: fade 200ms; }
.sheet-body { width: 100%; max-width: 560px; margin: 0 auto; background: var(--white); padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); display: grid; gap: 16px; animation: rise 360ms var(--ease-drawer); }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(100%); } }
.product { display: grid; grid-template-columns: 88px 1fr; gap: 12px; align-items: start; }
.photo { width: 88px; height: 88px; background: var(--bone); object-fit: cover; clip-path: var(--pxb); display: block; }
.photo-s { width: 56px; height: 56px; }
.product h2 { font-size: 20px; line-height: 24px; font-weight: 600; }
.price { font: 700 22px/28px var(--font-text); font-variant-numeric: tabular-nums; margin-top: 4px; }
.stock { display: inline-block; margin-top: 4px; font-size: 14px; line-height: 20px; color: var(--text-3); }
.stock.is-out { background: var(--sand); color: var(--ink); clip-path: var(--pxt); padding: 0 8px; }
.qty-row { display: flex; align-items: center; justify-content: space-between; min-height: 56px; }
.stepper { display: flex; align-items: center; }
.stepper button { width: 56px; height: 56px; background: var(--bone); clip-path: var(--pxb); display: grid; place-items: center; }
.stepper output { width: 56px; text-align: center; font: 700 22px/56px var(--font-text); font-variant-numeric: tabular-nums; }
.stepper-s button { width: 44px; height: 44px; }
.stepper-s output { width: 36px; font-size: 18px; line-height: 44px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* Lists */
.line { display: grid; grid-template-columns: 56px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.line:last-child { border-bottom: 0; }
.line-title { font-weight: 500; line-height: 20px; }
.line-sub { font-size: 14px; line-height: 20px; color: var(--text-3); }
.line-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.pick { width: 100%; text-align: left; }
.empty { padding: 48px 16px; text-align: center; color: var(--text-3); display: grid; gap: 8px; justify-items: center; }
.total { display: flex; align-items: baseline; justify-content: space-between; }
.total b { font: 700 30px/36px var(--font-text); font-variant-numeric: tabular-nums; }

/* Payment */
.pay { align-items: stretch; }
.pay-main { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 0 16px; text-align: center; }
.qr { width: min(100%, calc(100dvh - 330px), 420px); min-width: 180px; aspect-ratio: 1; }
.qr svg { display: block; width: 100%; height: 100%; }
.pay-sum { font: 700 44px/48px var(--font-text); font-variant-numeric: tabular-nums; }
.waiting { display: flex; align-items: center; gap: 8px; color: var(--text-3); }
.waiting i { width: 8px; height: 8px; background: var(--ink); animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: .15; } }
.paid { background: var(--mint); }
.paid .foot { background: transparent; border-color: rgb(17 17 17 / .12); }
.paid .line { border-color: rgb(17 17 17 / .12); }
.paid-head { padding: 32px 16px 16px; display: grid; gap: 8px; justify-items: start; }
.paid-head h1 { font-size: 36px; line-height: 40px; font-weight: 600; }
.notice { background: var(--sand); }
.notice .foot { background: transparent; border-color: rgb(17 17 17 / .12); }

.thanks { min-height: 100dvh; padding: 32px 16px; display: flex; flex-direction: column; justify-content: center; gap: 12px; background: var(--mint); }
.thanks h1 { font-size: 36px; line-height: 40px; }

.toast { position: fixed; left: 16px; right: 16px; bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 20; max-width: 528px; margin: 0 auto; padding: 12px 16px; background: var(--ink); color: var(--white); clip-path: var(--pxb); font-size: 15px; line-height: 20px; }

/* Public menu */
.is-menu #menu { height: 100dvh; max-width: 560px; margin: 0 auto; }
.menu-head { padding: 12px 0 20px; display: grid; gap: 8px; }
.menu-top { display: flex; align-items: center; justify-content: space-between; }
.official { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0; font: 500 14px/18px var(--font-text); text-decoration: underline; text-underline-offset: 3px; }
.trust { list-style: none; padding: 0; display: grid; gap: 12px; }
.trust-link { display: inline-block; min-height: 0; padding: 0; color: inherit; }
.menu-head h1 { font-size: 36px; line-height: 40px; font-weight: 600; }
.menu-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 8px; padding-bottom: 24px; }
.menu-card { padding: 0; text-align: left; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; align-content: start; min-width: 0; }
.menu-frame { position: relative; display: block; }
.menu-photo { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--bone); clip-path: var(--pxb); }
.menu-count { position: absolute; top: 8px; right: 8px; min-width: 24px; padding: 0 6px; background: var(--mint); clip-path: var(--pxt); font: 700 14px/24px var(--font-text); text-align: center; }
/* The mobile product card of the store: title and price the same size and weight, one line each, no meta line. */
.menu-name { display: block; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font: 500 13px/18px var(--font-text); }
.menu-row-price { display: block; margin-top: -2px; font: 500 13px/18px var(--font-text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.menu-row-eur { color: var(--text-3); }
.menu-price { font: 700 17px/22px var(--font-text); font-variant-numeric: tabular-nums; }
.menu-eur { font: 14px/20px var(--font-text); color: var(--text-3); white-space: nowrap; }
.menu-thumb { width: 88px; }
.sizes { display: grid; gap: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-width: 56px; height: 44px; padding: 0 12px; background: var(--bone); clip-path: var(--pxb); font-weight: 500; }
.chip.is-on { background: var(--mint); }
.chip:disabled { color: var(--concrete); text-decoration: line-through; }
.menu-cart { max-height: 45dvh; overflow-y: auto; }
.order-code { font: 800 64px/68px var(--font-text); letter-spacing: .02em; }

/* Pickup list */
.pickup { display: grid; gap: 8px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.pickup b { font: 800 32px/36px var(--font-text); letter-spacing: .02em; }
.pickup .btn { margin-top: 4px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; } }
