/* =====================================================================
   بيجر تِك — الاتجاه 3: «قُرص» (Puck)
   Borrowed from the round coaster pager everyone already knows: discs,
   a ring of LED dots that chases while the order is made and flashes
   when it is ready, warm sand and clay. Soft, rounded, tactile.
   Same token names as the other two directions.
   Load /themes/common.css before this file.
   ===================================================================== */
:root {
  /* ---- type ---- */
  --font: "Alexandria", "Tajawal", "Segoe UI", Tahoma, sans-serif;
  --fs-xs: 12px;
  --fs-sm: 14px;
  --fs-md: 16px;
  --fs-lg: 19px;
  --fs-xl: 26px;
  --fs-2xl: 42px;
  --fs-num-card: 26px;
  --fs-num-phone: 124px;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-bold: 800;

  /* ---- color (light, warm) ---- */
  --bg: #F1E6D6;          /* sand */
  --surface: #FFF8EE;     /* cream */
  --surface-2: #E8D9C4;
  --line: #DDCBB3;
  --line-strong: #2B1B12;
  --text: #2B1B12;        /* coffee · 14.2:1 on sand */
  --muted: #76604F;       /* 4.8:1 on sand */
  --brand: #2B1B12;       --on-brand: #FFF8EE;
  --prep: #6E5444;        --prep-soft: #E8D9C4; --on-prep: #FFF8EE;
  --ready: #B9441E;       --ready-soft: #F6D8C8; --on-ready: #FFF4E8;  /* clay · cream on clay 5:1 */
  --ready-led: #FF9466;
  --done: #76604F;
  --danger: #8A2C3A;      --on-danger: #FFF8EE;  /* berry: kept away from the clay "ready" */
  --warn: #A85806;        --warn-soft: #F8E5C6;  /* saffron — preparing > 8 min */
  --alert: #C8102E;       --alert-soft: #FADADF; /* crimson — ready, not collected > 3 min */
  --late: var(--warn);

  /* ---- shape ---- */
  --radius-lg: 30px;
  --radius: 22px;
  --radius-sm: 16px;
  --radius-pill: 999px;
  --bw: 1px;
  --shadow-1: inset 0 1px 0 rgba(255, 255, 255, .8), 0 10px 22px -14px rgba(43, 27, 18, .4);
  --shadow-2: 0 22px 44px -18px rgba(43, 27, 18, .55);
  --shadow-press: inset 0 -4px 0 rgba(0, 0, 0, .2);   /* tactile, like a real button */
  --tap: 48px;
  --tap-lg: 60px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.3, 1.5, .5, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
p, h1, h2, h3 { margin: 0; }
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.tnum { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { width: 1.2em; height: 1.2em; flex: none; }

/* ---------------- wordmark (mini puck + name whose letter dots are clay) ---------------- */
.wordmark { display: inline-flex; align-items: center; gap: 8px; font-weight: var(--fw-bold); font-size: 17px; line-height: 1.2; white-space: nowrap; }
.wordmark::before {   /* the logo at small size: clay disc, soft LED ring, cream face */
  content: ""; width: 18px; height: 18px; border-radius: 50%; flex: none;
  background: radial-gradient(circle closest-side, var(--on-ready) 0 50%, var(--ready) 53% 62%,
    color-mix(in srgb, var(--ready-led) 55%, var(--ready)) 64% 78%, var(--ready) 80%);
}
.wordmark .wm { fill: var(--ready); }

/* ---------------- buttons (pill, tactile) ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 0 18px;
  border: 0; border-radius: var(--radius-pill);
  background: var(--surface); color: var(--text);
  box-shadow: inset 0 0 0 1.5px var(--line);
  font: inherit; font-size: 15px; font-weight: var(--fw-bold); line-height: 1.2;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform .18s var(--spring), background-color .15s, box-shadow .15s, color .15s;
}
.btn:active { transform: translateY(2px) scale(.97); }
.btn:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }
.btn-primary { background: var(--brand); color: var(--on-brand); box-shadow: var(--shadow-press); }
.btn-primary:active, .btn-ready:active { box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .2); }
.btn-ready { background: var(--ready); color: var(--on-ready); box-shadow: var(--shadow-press); }
.btn-ghost { background: transparent; }
.btn-quiet { background: transparent; box-shadow: none; font-weight: var(--fw-medium); }
.btn-text-danger { background: transparent; box-shadow: none; color: var(--danger); font-weight: var(--fw-medium); padding: 0 12px; }
.btn-text-danger.is-armed { background: var(--danger); color: var(--on-danger); font-weight: var(--fw-bold); }
.btn-danger { background: var(--danger); color: var(--on-danger); box-shadow: var(--shadow-press); }
.btn-lg { min-height: var(--tap-lg); font-size: 18px; padding: 0 26px; }
.btn-block { width: 100%; }
.btn-icon, .btn-round { width: var(--tap); padding: 0; }
.btn-round { font-size: 13px; }
@media (hover: hover) {
  .btn:hover { transform: translateY(-1px); }
  .btn:active { transform: translateY(2px) scale(.97); }
  .btn-primary:hover { background: #3E2A1F; }
  .btn-ready:hover { background: #C9512A; }
  .btn-ghost:hover, .btn-quiet:hover { background: rgba(43, 27, 18, .06); }
  .btn-text-danger:hover { background: rgba(138, 44, 58, .08); }
  .btn-text-danger.is-armed:hover { background: var(--danger); }
}

/* ---------------- status chips ---------------- */
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 14px 0 12px;
  border-radius: var(--radius-pill);
  font-size: 13px; font-weight: var(--fw-bold); line-height: 1; white-space: nowrap;
}
.chip::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 2px dotted currentColor; }
.chip-prep { background: var(--prep-soft); color: var(--prep); }
.chip-ready { background: var(--ready); color: var(--on-ready); }
.chip-ready::before { border-style: solid; background: var(--ready-led); border-color: var(--on-ready); }
.chip-done { background: transparent; color: var(--done); box-shadow: inset 0 0 0 1.5px var(--line); }
.chip-cancel { background: transparent; color: var(--danger); box-shadow: inset 0 0 0 1.5px currentColor; }

/* ---------------- inputs ---------------- */
.field {
  width: 100%; min-height: 62px; padding: 0 20px;
  border: 0; border-radius: var(--radius-pill);
  background: var(--surface); color: var(--text);
  box-shadow: inset 0 0 0 1.5px var(--line), inset 0 3px 6px rgba(43, 27, 18, .06);
  font: inherit; font-size: 16px;
  transition: box-shadow .15s;
}
.field::placeholder { color: var(--muted); }
.field:focus, .field.is-focus { outline: none; box-shadow: inset 0 0 0 2.5px var(--text), 0 0 0 5px rgba(43, 27, 18, .1); }
.field-number { font-size: 28px; font-weight: var(--fw-bold); text-align: center; letter-spacing: .06em; direction: ltr; }
.field-number::placeholder { font-size: 15px; font-weight: var(--fw-medium); letter-spacing: 0; }

/* =====================================================================
   THE PUCK — disc with an LED ring
   ::after  = the LED ring colours (dim dots + a lit "comet")
   ::before = a grille in the disc colour that cuts the ring into 24 dots
   ===================================================================== */
.disc {
  --d: 290px;
  --ring: 13px;
  --led: rgba(43, 27, 18, .14);
  --led-on: var(--prep);
  --face: var(--surface);
  position: relative; isolation: isolate;
  width: var(--d); height: var(--d); border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--face);
  box-shadow: 0 0 0 calc(var(--d) * .035) var(--surface-2), var(--shadow-2), inset 0 -8px 0 rgba(43, 27, 18, .05);
  transition: width .6s var(--spring), height .6s var(--spring), color .4s;
}
.disc::before, .disc::after {
  content: ""; position: absolute; inset: calc(var(--d) * .045); border-radius: 50%; z-index: -1;
  -webkit-mask: radial-gradient(farthest-side, #0000 calc(100% - var(--ring)), #000 calc(100% - var(--ring) + 1px));
          mask: radial-gradient(farthest-side, #0000 calc(100% - var(--ring)), #000 calc(100% - var(--ring) + 1px));
}
.disc::after { background: conic-gradient(var(--led) 0 270deg, color-mix(in srgb, var(--led-on) 45%, transparent) 270deg 315deg, var(--led-on) 315deg 360deg); animation: led-chase 2.4s steps(24) infinite; }
.disc::before { z-index: 0; background: repeating-conic-gradient(var(--face) 0 4deg, #0000 4deg 11deg, var(--face) 11deg 15deg); }
.disc > * { position: relative; z-index: 1; }
@keyframes led-chase { to { transform: rotate(360deg); } }
.disc.is-ready, .st-ready .c-hero .disc { --led-on: var(--ready-led); color: var(--ready); }
.disc.is-ready::after, .st-ready .c-hero .disc::after { background: var(--led-on); animation: led-blink .9s steps(2, jump-none) infinite; }
@keyframes led-blink { 0% { opacity: 1; } 100% { opacity: .25; } }
.disc-num { font-size: var(--fs-num-phone); font-weight: var(--fw-bold); line-height: 1; letter-spacing: -.02em; transform: translateY(.03em); transition: font-size .6s var(--spring); }

/* mini puck for staff cards */
.mini {
  width: 64px; height: 64px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface); color: var(--text);
  outline: 3px dotted var(--line); outline-offset: -9px;
  box-shadow: inset 0 0 0 1.5px var(--line);
  font-size: var(--fs-num-card); font-weight: var(--fw-bold); line-height: 1;
  transition: background-color .3s, color .3s, outline-color .3s;
}
.mini span { transform: translateY(.04em); }
.mini.is-ready { background: var(--ready); color: var(--on-ready); outline-color: var(--ready-led); box-shadow: none; }
