/* =====================================================================
   بيجر تِك — shared by all three themes (puck / receipt / neon).
   Load order on every page: /themes/common.css → /themes/<theme>/base.css
   → /themes/<theme>/<screen>.css (customer | staff | display).
   ===================================================================== */

/* Alexandria (OFL-1.1, self-hosted; production CSP is font-src 'self'). Variable 100–900. */
@font-face {
  font-family: "Alexandria";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/alexandria-arabic-wght.woff2") format("woff2-variations"), url("/fonts/alexandria-arabic-wght.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Alexandria";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/alexandria-latin-wght.woff2") format("woff2-variations"), url("/fonts/alexandria-latin-wght.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

[hidden] { display: none !important; }

/* ---------- brand wordmark: «بيجر تِك» outlined as SVG (#pt-wordmark sprite in each page,
   generated by proposals/logo/src/export_site.py). Letters take `color`, letter dots take `fill`;
   each theme picks the dot colour in its base.css. 3.095 = the sprite's width / height. ---------- */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.wordmark .wm { display: inline-block; vertical-align: middle; height: 1.25em; width: calc(1.25em * 3.095); flex: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- customer page: which blocks show in which state ---------- */
body:not(.st-preparing) .only-prep,
body:not(.st-ready) .only-ready,
body:not(.st-collected) .only-done,
body:not(.st-cancelled) .only-cancelled,
body:not(.st-notfound) .only-notfound,
body.st-ready .not-ready,
body.st-preparing .not-prep,
body.st-collected .not-done { display: none !important; }

.st-preparing .only-prep,
.st-ready .only-ready,
.st-collected .only-done { animation: state-in .55s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes state-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

body.push-on .push-off-only,
body:not(.push-on) .push-on-only { display: none !important; }

/* ---------- two-state buttons (cancel → confirm, re-alert → sent) ---------- */
.btn .armed, .btn .sent { display: none; }
.btn.is-armed .idle, .btn.is-sent .idle { display: none; }
.btn.is-armed .armed, .btn.is-sent .sent { display: inline; }

/* ---------- staff: customer screen («شاشة العميل») button + dialog (theme tokens only) ---------- */
#screen-btn { position: relative; }
#screen-btn .scr-badge { display: none; position: absolute; top: 7px; inset-inline-end: 7px; width: 10px; height: 10px; border-radius: 50%; background: #3C8A55; box-shadow: 0 0 0 2px var(--surface); }
#screen-btn.is-linked .scr-badge { display: block; }
#screen-btn.is-offline .scr-badge { background: var(--danger); }
.scr-here { font-size: 14.5px; font-weight: 500; line-height: 1.6; }
.scr-url { font-weight: 700; color: var(--text); word-break: break-all; }
.set-inline .scr-code { flex: 0 1 200px; text-align: center; font-size: 22px; font-weight: 800; letter-spacing: .12em; }
.scr-list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.scr-list:empty { display: none; }
.scr-item { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--line); }
.scr-item.is-linked { box-shadow: inset 0 0 0 2px var(--text); }
.scr-dot { width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--muted); opacity: .5; }
.scr-item.is-online .scr-dot { background: #3C8A55; opacity: 1; }
.scr-info { display: flex; flex-direction: column; flex: 1 1 160px; min-width: 0; }
.scr-info b { font-size: 15px; }
.scr-info small { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.scr-acts { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.scr-acts .btn { min-height: 44px; font-size: 13.5px; }

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