/* Mobivend customer screen: one small stylesheet (C3.4). Colours can be set per machine
   or merchant through the theme (the page sets --brand and --brand-ink). */
@font-face {
  font-family: "Noto Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/noto-sans-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Noto Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/noto-sans-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1EFF, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root { --brand: #0f62fe; --brand-ink: #fff; --ink: #161616; --muted: #525252; --line: #e0e0e0; --bg: #f4f4f4; --card: #fff; --bad: #da1e28; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font-family: "Noto Sans", Arial, sans-serif; font-size: 18px; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
h1 { font-size: 1.4rem; margin: 0; }
h2 { font-size: 1.3rem; margin: 0 0 .75rem; }
button { font: inherit; border: 0; border-radius: 8px; min-height: 56px; padding: 0 1.5rem; cursor: pointer; }
.primary { background: var(--brand); color: var(--brand-ink); }
.secondary { background: var(--line); color: var(--ink); }
button:disabled { opacity: .5; }
input, select { font: inherit; min-height: 48px; padding: 0 .75rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; }

.screen { min-height: 100%; }
.center, #login { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 2rem; gap: 1rem; }
#login form { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: center; }
#machine-code { font-size: 1.6rem; letter-spacing: .1em; width: 12em; text-align: center; }
.error { color: var(--bad); min-height: 1.5em; }

.bar { position: sticky; top: 0; display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; background: var(--card); border-bottom: 1px solid var(--line); z-index: 2; }
.bar h1 { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#logo { height: 40px; }
#search { width: 30%; min-width: 120px; }

.products { display: flex; flex-wrap: wrap; gap: 1rem; padding: 1rem 1rem 6rem; }
.item { width: calc(25% - .75rem); min-width: 160px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 1rem; display: flex; flex-direction: column; gap: .5rem; }
.products.list .item { width: 100%; flex-direction: row; align-items: center; }
.products.list .item .name { flex: 1; }
.item img { width: 100%; height: 120px; object-fit: contain; }
.products.list .item img { width: 72px; height: 72px; }
.item .name { font-weight: 600; }
.item .price { font-size: 1.2rem; }
.item .tag { font-size: .8rem; color: var(--muted); }
.item.sold-out { opacity: .4; }
.item .slot { font-size: .85rem; color: var(--muted); }
.stepper { display: flex; align-items: center; gap: .5rem; }
.stepper button { min-width: 56px; padding: 0; }
.stepper b { min-width: 2ch; text-align: center; }

.cart-bar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 1rem; background: var(--card); border-top: 1px solid var(--line); }

.sheet { position: fixed; inset: 0; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, .45); display: flex; align-items: flex-end; justify-content: center; z-index: 5; }
.sheet-body { width: 100%; max-width: 560px; background: var(--card); border-radius: 16px 16px 0 0; padding: 1.5rem; text-align: center; }
#qr { width: 260px; height: 260px; margin: .5rem auto; display: block; background: #fff; }
.amount { font-size: 1.6rem; margin: 0; }
.choices { display: flex; flex-direction: column; gap: .75rem; margin: 1rem 0; }
.row { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; margin: 1rem 0; }
.column { display: flex; flex-direction: column; gap: .5rem; margin: 1rem 0; }
#pin { font-size: 1.6rem; letter-spacing: .3em; width: 9em; text-align: center; }
.qr { width: 260px; height: 260px; margin: .5rem auto; display: block; background: #fff; }
.sheet-body > div > .secondary { margin-top: .5rem; }
.timer b { font-size: 1.3rem; }
.ref b { letter-spacing: .08em; }
.spinner { width: 48px; height: 48px; margin: 1rem auto; border: 5px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 600px) {
  html, body { font-size: 16px; }
  .item { width: calc(50% - .5rem); min-width: 0; }
  #search { width: 40%; }
}
.history { text-align: left; font-size: .9rem; padding-left: 1.25rem; max-width: 640px; margin: 0 auto 1.5rem; }
