/* ==========================================================================
   SplashBall components v2 (reference implementation for the web products)
   Uses only tokens.css. The mockups use exactly these classes, so what Dor
   approves is what frontend-developer copies. RTL first: logical properties only.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sb-font);
  font-size: var(--sb-fs-5);
  line-height: var(--sb-lh-body);
  color: var(--sb-text);
  background: var(--sb-bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
:focus-visible { outline: none; box-shadow: var(--sb-ring-focus); border-radius: var(--sb-r-1); }
.sb-num { font-variant-numeric: tabular-nums; }
.sb-nowrap { white-space: nowrap; }
.sb-ltr { direction: ltr; unicode-bidi: isolate; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Type: the 6 sizes as classes ---------- */
.sb-t1 { font-size: var(--sb-fs-1); font-weight: var(--sb-fw-black); line-height: var(--sb-lh-tight); letter-spacing: var(--sb-tracking-display); color: var(--sb-text-strong); text-wrap: balance; margin: 0; }
.sb-t2 { font-size: var(--sb-fs-2); font-weight: var(--sb-fw-bold); line-height: var(--sb-lh-tight); color: var(--sb-text-strong); text-wrap: balance; margin: 0; }
.sb-t3 { font-size: var(--sb-fs-3); font-weight: var(--sb-fw-bold); line-height: var(--sb-lh-snug); color: var(--sb-text-strong); margin: 0; }
.sb-t4 { font-size: var(--sb-fs-4); line-height: var(--sb-lh-body); margin: 0; }
.sb-t5 { font-size: var(--sb-fs-5); line-height: var(--sb-lh-body); margin: 0; }
.sb-t6 { font-size: var(--sb-fs-6); line-height: var(--sb-lh-body); margin: 0; }
.sb-muted { color: var(--sb-text-muted); }

/* ---------- Buttons ----------
   One .sb-btn--action (red) per customer screen, one .sb-btn--primary (blue) per app screen.
   Flat. Pressed = darker + 1px down. No tube shadow, no ripple. */
.sb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sb-s-2);
  min-height: var(--sb-hit); padding: 0 var(--sb-s-5);
  border: 0; border-radius: var(--sb-r-full);
  font: inherit; font-size: var(--sb-fs-4); font-weight: var(--sb-fw-bold); line-height: var(--sb-lh-snug);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color var(--sb-dur-2) var(--sb-ease), transform var(--sb-dur-1) var(--sb-ease);
}
.sb-btn:active { transform: translateY(1px); }
.sb-btn svg { width: 22px; height: 22px; flex: none; }
.sb-btn--lg { min-height: var(--sb-hit-lg); padding: 0 var(--sb-s-6); }
.sb-btn--block { width: 100%; }
.sb-btn--action { background: var(--sb-action); color: #fff; }
.sb-btn--action:hover { background: var(--sb-action-pressed); }
.sb-btn--primary { background: var(--sb-primary); color: #fff; }
.sb-btn--primary:hover { background: var(--sb-primary-pressed); }
.sb-btn--wa { background: var(--sb-wa); color: #fff; }
.sb-btn--secondary { background: var(--sb-surface); color: var(--sb-text-strong); box-shadow: inset 0 0 0 1.5px var(--sb-border-input); }
.sb-btn--secondary:hover { background: var(--sb-bg-subtle); }
.sb-btn--ghost { background: transparent; color: var(--sb-link); padding: 0 var(--sb-s-3); }
.sb-btn--ghost:hover { background: var(--sb-blue-50); }
.sb-btn--sm { min-height: 40px; padding: 0 var(--sb-s-4); font-size: var(--sb-fs-5); }  /* only inside cards, still 40px + 8px gap = 48 target */

/* ---------- Fields ---------- */
.sb-field { display: grid; gap: 6px; }
.sb-label { font-size: var(--sb-fs-5); font-weight: var(--sb-fw-medium); color: var(--sb-text-strong); }
.sb-hint { font-size: var(--sb-fs-6); color: var(--sb-text-muted); }
.sb-input {
  width: 100%; min-height: var(--sb-hit-lg); padding: 0 var(--sb-s-4);
  font: inherit; font-size: var(--sb-fs-4); color: var(--sb-text);
  background: var(--sb-surface); border: 1.5px solid var(--sb-border-input); border-radius: var(--sb-r-1);
}
.sb-input::placeholder { color: var(--sb-placeholder); }
.sb-input:focus { outline: none; border-color: var(--sb-focus); box-shadow: 0 0 0 3px var(--sb-blue-50); }
.sb-input[readonly] { background: var(--sb-bg-subtle); border-style: dashed; }
.sb-field--error .sb-input { border-color: var(--sb-error); }
.sb-error { font-size: var(--sb-fs-6); color: var(--sb-error); font-weight: var(--sb-fw-medium); }

/* Stepper (numbers on a phone without a keyboard) */
.sb-stepper { display: inline-grid; grid-template-columns: var(--sb-hit) 64px var(--sb-hit); align-items: center; border: 1.5px solid var(--sb-border-input); border-radius: var(--sb-r-full); }
.sb-stepper button { height: var(--sb-hit); border: 0; background: none; font: inherit; font-size: var(--sb-fs-3); color: var(--sb-link); cursor: pointer; border-radius: var(--sb-r-full); }
.sb-stepper output { text-align: center; font-size: var(--sb-fs-4); font-weight: var(--sb-fw-bold); font-variant-numeric: tabular-nums; }

/* Segmented control (tabs that switch a view) */
.sb-seg { display: flex; gap: 4px; padding: 4px; background: var(--sb-bg-subtle); border-radius: var(--sb-r-full); }
.sb-seg button {
  flex: 1; min-height: 40px; border: 0; border-radius: var(--sb-r-full); background: none; cursor: pointer;
  font: inherit; font-size: var(--sb-fs-5); font-weight: var(--sb-fw-medium); color: var(--sb-text-muted);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.sb-seg button[aria-selected="true"], .sb-seg button[aria-pressed="true"] { background: var(--sb-surface); color: var(--sb-text-strong); box-shadow: var(--sb-shadow-1); }
.sb-count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--sb-r-full); background: var(--sb-st-attention-bg); color: var(--sb-st-attention-fg); font-size: var(--sb-fs-6); font-weight: var(--sb-fw-bold); display: inline-grid; place-items: center; line-height: 1; }

/* Checkbox row */
.sb-check { display: flex; gap: var(--sb-s-3); align-items: flex-start; min-height: var(--sb-hit); padding-block: var(--sb-s-2); cursor: pointer; }
.sb-check input { width: 24px; height: 24px; margin: 0; flex: none; accent-color: var(--sb-blue-600); }

/* ---------- Cards ----------
   Quiet: white, 1px line, radius 2. Shadow only when it floats over something. */
.sb-card { background: var(--sb-surface); border: 1px solid var(--sb-border); border-radius: var(--sb-r-2); padding: var(--sb-s-4); }
.sb-card--raised { border-color: transparent; box-shadow: var(--sb-shadow-1); }

/* Label above value pairs (never "Address: ...") */
.sb-pairs { display: grid; gap: var(--sb-s-4); margin: 0; }
.sb-pairs div { display: grid; gap: 2px; min-width: 0; }
.sb-pairs dt { font-size: var(--sb-fs-6); color: var(--sb-text-muted); }
.sb-pairs dd { margin: 0; font-size: var(--sb-fs-5); font-weight: var(--sb-fw-medium); color: var(--sb-text-strong); }

/* ---------- Status tags: word + icon + soft color ---------- */
.sb-tag {
  display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 10px;
  border-radius: var(--sb-r-full); font-size: var(--sb-fs-6); font-weight: var(--sb-fw-medium); line-height: 1; white-space: nowrap;
}
.sb-tag svg { width: 16px; height: 16px; flex: none; }
.sb-tag--attention { background: var(--sb-st-attention-bg); color: var(--sb-st-attention-fg); }
.sb-tag--info      { background: var(--sb-st-info-bg);      color: var(--sb-st-info-fg); }
.sb-tag--success   { background: var(--sb-st-success-bg);   color: var(--sb-st-success-fg); }
.sb-tag--neutral   { background: var(--sb-st-neutral-bg);   color: var(--sb-st-neutral-fg); box-shadow: inset 0 0 0 1px var(--sb-border); }
.sb-tag--closed    { background: var(--sb-st-closed-bg);    color: var(--sb-st-closed-fg); }
.sb-tag--danger    { background: var(--sb-st-danger-bg);    color: var(--sb-st-danger-fg); }

/* ---------- Notice (a sentence that matters, not an error) ---------- */
.sb-notice { display: flex; gap: var(--sb-s-3); align-items: flex-start; padding: var(--sb-s-3) var(--sb-s-4); border-radius: var(--sb-r-1); background: var(--sb-st-info-bg); color: var(--sb-st-info-fg); }
.sb-notice svg { width: 22px; height: 22px; flex: none; margin-top: 1px; }
.sb-notice--success { background: var(--sb-st-success-bg); color: var(--sb-st-success-fg); }

/* ---------- Activity mark: a round real photo next to the name ---------- */
.sb-act { width: 44px; height: 44px; border-radius: var(--sb-r-full); object-fit: cover; flex: none; }

/* ---------- Placeholder for material that must come from Dudi (never invented) ---------- */
.sb-pending {
  display: grid; place-items: center; gap: var(--sb-s-1); text-align: center;
  padding: var(--sb-s-5); border: 2px dashed var(--sb-slate-400); border-radius: var(--sb-r-2);
  background: repeating-linear-gradient(-45deg, var(--sb-bg-subtle) 0 12px, var(--sb-surface) 12px 24px);
  color: var(--sb-text-muted); font-size: var(--sb-fs-6);
}
.sb-pending strong { color: var(--sb-text-strong); font-size: var(--sb-fs-5); }

/* ---------- Wordmark ---------- */
.sb-wordmark { display: block; height: 32px; width: auto; }
.sb-wordmark--sm { height: 26px; }
