/* Kassalo Mobil — telefonskærm. Bruger kassens tema-tokens (farver, radius, font). */
body.m-mode { overflow: hidden; }
body.m-mode #app { display: block !important; height: 0; overflow: visible; }
body.m-mode #app > .top, body.m-mode #app > .main { display: none !important; }
body.m-lock { overflow: hidden; }
#mob { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; background: var(--bg); color: var(--text); font-family: var(--font);
  padding-top: env(safe-area-inset-top); -webkit-tap-highlight-color: transparent; }
#mob[hidden] { display: none; }
#mob button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
.m-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px 6px; }
.m-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.m-brand b { display: block; font-size: 16px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-brand small { display: block; font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-logo { flex: 0 0 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 14px; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent2)); }
.m-top-r { display: flex; align-items: center; gap: 10px; }
.m-net { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in oklab, var(--ok) 20%, transparent); }
.m-net.off { background: var(--warn); box-shadow: 0 0 0 4px color-mix(in oklab, var(--warn) 25%, transparent); }
.m-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--surface) !important; border: 1px solid var(--border) !important; font-size: 18px; }
.m-icon.light { background: rgba(0,0,0,.45) !important; border-color: rgba(255,255,255,.2) !important; color: #fff; }
.m-icon.on { background: var(--accent2) !important; color: #000; }

.m-searchbar { display: flex; gap: 8px; padding: 6px 14px 8px; }
.m-search { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 12px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border); }
.m-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--glow); }
.m-search input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 16px; }
.m-search input::-webkit-search-cancel-button { display: none; }
.m-x { width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2) !important; font-size: 12px; }
.m-scan { flex: 0 0 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; background: var(--accent) !important; color: #fff !important; box-shadow: 0 8px 20px var(--glow); }

.m-chips { display: flex; gap: 6px; overflow-x: auto; padding: 0 14px 8px; scrollbar-width: none; flex: 0 0 auto; }
.m-chips::-webkit-scrollbar { display: none; }
.m-chips[hidden] { display: none; }
.m-chips button { flex: 0 0 auto; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--surface) !important; border: 1px solid var(--border) !important; font-size: 14px; font-weight: 600; color: var(--text-2) !important; white-space: nowrap; }
.m-chips button.on { background: var(--accent) !important; color: #fff !important; border-color: transparent !important; }

.m-list { flex: 1; overflow-y: auto; padding: 2px 10px calc(96px + env(safe-area-inset-bottom)); overscroll-behavior: contain; }
.m-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto 48px; align-items: center; gap: 10px; padding: 8px 6px; border-bottom: 1px solid var(--border); }
.m-row:active { background: var(--surface); }
.m-row.sold { opacity: .6; }
.m-th { width: 48px; height: 48px; border-radius: 12px; background: var(--surface-2) center/cover no-repeat; }
.m-th.e { display: grid; place-items: center; font-size: 24px; background: color-mix(in oklab, var(--c) 30%, var(--bg-2)); }
.m-ri { min-width: 0; }
.m-ri b { display: block; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-ri small { display: block; font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-st { color: var(--ok); margin-left: 4px; }
.m-st.low { color: var(--warn); } .m-st.out { color: var(--danger); }
.m-rp { text-align: right; font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.m-rp small { display: block; font-weight: 500; font-size: 11px; color: var(--text-3); }
.m-add { width: 44px; height: 44px; border-radius: 14px; font-size: 22px; font-weight: 700; background: var(--surface-2) !important; border: 1px solid var(--border) !important; justify-self: end; }
.m-add.has { background: var(--accent) !important; color: #fff !important; font-size: 16px; border-color: transparent !important; }
.m-empty { padding: 40px 16px; text-align: center; color: var(--text-3); }

.m-bar { position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 41; height: 62px; padding: 0 18px; border-radius: 20px; display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-2) !important; border: 1px solid var(--border) !important; color: var(--text-2) !important; box-shadow: var(--shadow); }
.m-bar.full { background: linear-gradient(135deg, var(--accent), color-mix(in oklab, var(--accent) 70%, var(--accent2))) !important; color: #fff !important; border-color: transparent !important; }
.m-bar-l { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.m-bar-r { font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; }
.m-badge { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 999px; background: rgba(0,0,0,.25); font-size: 13px; font-weight: 800; }
.m-cart-h .m-badge { background: var(--accent); color: #fff; }

.m-sheet { position: fixed; inset: 0; z-index: 45; }
.m-sheet[hidden] { display: none; }
.m-sheet-bg { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.m-sheet-p { position: absolute; left: 0; right: 0; bottom: 0; max-height: 88dvh; overflow-y: auto; padding: 8px 16px calc(16px + env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0;
  background: var(--bg-2); border-top: 1px solid var(--border); box-shadow: 0 -20px 60px rgba(0,0,0,.4); transition: transform .2s; }
.m-full .m-sheet-p { height: 92dvh; max-height: 92dvh; display: flex; flex-direction: column; overflow: hidden; }
.m-grab { width: 44px; height: 5px; border-radius: 3px; background: var(--border); margin: 4px auto 12px; }

.m-pc { display: grid; grid-template-columns: 84px 1fr; gap: 14px; align-items: center; }
.m-pimg { width: 84px; height: 84px; border-radius: 18px; background: var(--surface-2) center/cover no-repeat; }
.m-pimg.e { display: grid; place-items: center; font-size: 40px; background: color-mix(in oklab, var(--c) 30%, var(--bg)); }
.m-pc h3 { margin: 0 0 4px; font-size: 19px; line-height: 1.2; }
.m-pp { font-size: 22px; font-weight: 800; margin-bottom: 2px; }
.m-pp small { font-size: 13px; font-weight: 500; color: var(--text-2); }
.m-pc .m-st { margin: 0; font-size: 13px; font-weight: 600; }
.m-dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 16px 0; padding: 12px 14px; border-radius: 14px; background: var(--surface); font-size: 14px; }
.m-dl dt { color: var(--text-3); } .m-dl dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.m-vars { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-bottom: 14px; }
.m-vars button { padding: 10px 8px; border-radius: 14px; background: var(--surface-2) !important; border: 1px solid var(--border) !important; font-weight: 700; }
.m-vars small { display: block; font-weight: 500; font-size: 11px; color: var(--text-2); margin-top: 2px; }
.m-pact { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.m-incart { font-weight: 700; color: var(--accent); }

.m-cart-h { display: flex; align-items: center; justify-content: space-between; }
.m-cart-h h2 { margin: 0; font-size: 20px; display: flex; align-items: center; gap: 8px; }
.m-link { font-weight: 700; padding: 8px; } .m-link.danger { color: var(--danger) !important; }
.m-cart-tools { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 10px -16px 6px; padding: 0 16px; flex: 0 0 auto; }
.m-cart-tools::-webkit-scrollbar { display: none; }
.m-cart-tools button { flex: 0 0 auto; height: 36px; padding: 0 12px; border-radius: 12px; background: var(--surface) !important; border: 1px solid var(--border) !important; font-size: 13px; font-weight: 600; white-space: nowrap; }
.m-chipline { display: flex; flex-direction: column; gap: 4px; margin: 4px 0; font-size: 13px; }
.m-chipline[hidden] { display: none; }
.m-chipline > span { display: flex; justify-content: space-between; padding: 6px 10px; border-radius: 10px; background: var(--surface-2); }
.m-lines { flex: 1; overflow-y: auto; margin: 0 -16px; padding: 0 16px; overscroll-behavior: contain; }
.m-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 2px 10px; padding: 12px 2px; border-bottom: 1px solid var(--border); background: var(--bg-2); transition: transform .15s, background .15s; touch-action: pan-y; }
.m-line.del { background: color-mix(in oklab, var(--danger) 30%, var(--bg-2)); }
.m-line.linked { padding: 4px 2px 10px 18px; }
.m-line.linked b { font-weight: 500; color: var(--text-2); }
.m-li { min-width: 0; }
.m-li b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-li small { display: block; font-size: 12px; color: var(--text-3); }
.m-la { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.m-q { grid-column: 2; display: flex; align-items: center; gap: 4px; justify-self: end; }
.m-q button { width: 36px; height: 36px; border-radius: 12px; background: var(--surface-2) !important; border: 1px solid var(--border) !important; font-size: 18px; font-weight: 700; }
.m-q span { min-width: 26px; text-align: center; font-weight: 800; }
.m-tot { padding: 10px 2px 4px; display: grid; gap: 2px; font-size: 13px; color: var(--text-2); flex: 0 0 auto; }
.m-tot > div { display: flex; justify-content: space-between; }
.m-tot > div[hidden] { display: none; }
.m-total { margin-top: 4px; color: var(--text); font-size: 15px; font-weight: 700; align-items: baseline; }
.m-total b { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.m-paybtns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; flex: 0 0 auto; }
.m-pm { height: 58px; border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 18px; background: var(--surface) !important; border: 1px solid var(--border) !important; }
.m-pm span { font-size: 13px; font-weight: 700; }
.m-pay { width: 100%; height: 60px; border-radius: 18px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; font-size: 18px; font-weight: 800;
  color: #fff !important; background: linear-gradient(135deg, var(--accent), color-mix(in oklab, var(--accent) 70%, var(--accent2))) !important; box-shadow: 0 10px 28px var(--glow); flex: 0 0 auto; }
.m-pay:disabled { opacity: .5; }
.m-pay.sm { width: auto; height: 52px; padding: 0 22px; font-size: 16px; justify-content: center; }

.m-scanner { position: fixed; inset: 0; z-index: 60; background: #000; }
.m-scanner[hidden] { display: none; }
.m-scanner video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.m-reticle { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.m-reticle span { width: min(78vw, 340px); height: 160px; border-radius: 20px; box-shadow: 0 0 0 9999px rgba(0,0,0,.45); border: 3px solid var(--accent); position: relative; overflow: hidden; }
.m-reticle span::after { content: ""; position: absolute; left: 8%; right: 8%; height: 2px; top: 50%; background: var(--danger); box-shadow: 0 0 12px var(--danger); animation: mscan 1.6s ease-in-out infinite; }
@keyframes mscan { 0%, 100% { transform: translateY(-50px); } 50% { transform: translateY(50px); } }
@media (prefers-reduced-motion: reduce) { .m-reticle span::after { animation: none; } }
.m-scan-top { position: absolute; top: calc(12px + env(safe-area-inset-top)); left: 12px; right: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #fff; font-weight: 600; text-align: center; font-size: 14px; text-shadow: 0 1px 3px #000; }
.m-scan-bot { position: absolute; left: 12px; right: 12px; bottom: calc(24px + env(safe-area-inset-bottom)); display: grid; gap: 10px; justify-items: center; color: #fff; }
#mScanLast { min-height: 24px; padding: 6px 14px; border-radius: 999px; background: rgba(0,0,0,.55); font-weight: 700; }
#mScanLast:empty { visibility: hidden; }
.m-cont { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: rgba(0,0,0,.55); font-size: 14px; }

.m-flash { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 70; padding: 10px 16px; border-radius: 999px; background: var(--ok); color: #04210f; font-weight: 800; font-size: 14px; box-shadow: var(--shadow); max-width: 90vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* modaler fra kassen (betaling, kvittering, login, menu) skal ligge over mobilskærmen */
body.m-mode .modal, body.m-mode .drawer { z-index: 55; }
body.m-mode #payModal, body.m-mode #receiptModal { z-index: 56; }
body.m-mode .toast, body.m-mode #toast { z-index: 80; bottom: calc(90px + env(safe-area-inset-bottom)) !important; }
