/* ASA OS job workspace: guided inspection (request 241E). Uses the shop.css tokens only.
 * Built for a technician's phone and gloves: 48px+ targets, big numbers, one column under 640px. */

.ji { display: grid; gap: 14px; }
.ji-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ji-head h2 { margin: 0; font-size: 22px; }
.ji-sub { color: var(--ink-2); font-size: 13px; margin: 2px 0 0; }
.ji-modes { display: inline-flex; background: var(--fill); border-radius: 999px; padding: 3px; gap: 2px; }
.ji .ji-mode { min-height: 36px; background: transparent; padding: 0 16px; }
.ji .ji-mode[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }

/* summary */
.ji-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ji-sum-n, .ji-cust-n { background: var(--surface); border-radius: var(--r-m); box-shadow: 0 0 0 .5px var(--hair); padding: 12px 14px; display: grid; gap: 2px; }
.ji-sum-n strong, .ji-cust-n strong { font: 700 24px/1.1 var(--font-display); }
.ji-sum-n span, .ji-cust-n span { font-size: 12.5px; color: var(--ink-2); }
.ji-sum-n.g-urgent strong, .ji-cust-n.g-urgent strong { color: var(--red); }
.ji-sum-n.g-attention strong, .ji-cust-n.g-attention strong { color: var(--amber); }
.ji-sum-n.g-ok strong, .ji-cust-n.g-ok strong { color: var(--green); }
.ji-sum-bar { grid-column: 1 / -1; height: 4px; border-radius: 4px; background: var(--fill); overflow: hidden; }
.ji-bar-fill { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s ease; }

/* status dot / chip */
.ji-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.ji-dot::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--hair-strong); flex: none; }
.ji-dot.g-ok { color: var(--green); } .ji-dot.g-ok::before { background: var(--green); }
.ji-dot.g-attention { color: var(--amber); } .ji-dot.g-attention::before { background: #e0a100; }
.ji-dot.g-urgent { color: var(--red); } .ji-dot.g-urgent::before { background: var(--red); }

/* sections */
.ji-sec { background: var(--surface); border-radius: var(--r-l); box-shadow: 0 0 0 .5px var(--hair); padding: 16px 18px 14px; }
.ji-sec-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.ji-sec-h h3 { margin: 0; font-size: 17px; }
.ji .ji-save { min-height: 44px; padding: 0 18px; }
.ji-policy { font-size: 12.5px; color: var(--ink-2); margin: 10px 0 0; }
.ji-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ji-list { display: grid; gap: 0; }
.ji-pos { border-radius: var(--r-m); background: var(--surface-2); box-shadow: 0 0 0 .5px var(--hair); padding: 12px; display: grid; gap: 8px; align-content: start; }
.ji-wide { max-width: 520px; }
.ji-pos-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ji-pos-h > div { margin-left: auto; }
.ji-abbr { font-size: 11px; font-weight: 700; color: var(--ink-3); letter-spacing: .04em; }
.ji-pair { display: grid; gap: 8px; }
.ji-field { display: flex; align-items: center; gap: 8px; background: var(--surface); border-radius: var(--r-s); box-shadow: inset 0 0 0 1px var(--hair-strong); padding: 0 10px; min-height: 52px; }
.ji-field:focus-within { box-shadow: inset 0 0 0 2px var(--accent); }
.ji .ji-num { border: 0; background: transparent; box-shadow: none; outline: none; font: 600 24px/1 var(--font-display); width: 100%; min-width: 0; padding: 0; min-height: 48px; color: var(--ink); }
.ji .ji-num:disabled { color: var(--ink); opacity: 1; }
.ji-unit { font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.ji .ji-sel { border: 0; background: var(--fill); border-radius: 999px; min-height: 36px; width: auto; }
.ji-saved { font-size: 12px; color: var(--ink-2); }
.ji-saved.is-none { color: var(--ink-3); }
.ji-pos-f { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }

.ji-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "h seg" "f f"; gap: 8px 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--hair); }
.ji-row:first-child { border-top: 0; padding-top: 2px; }
.ji-row-h { grid-area: h; display: grid; gap: 2px; }
.ji-row .ji-seg { grid-area: seg; }
.ji-row .ji-pos-f { grid-area: f; }
.ji-seg { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.ji .ji-segb { min-height: 48px; min-width: 84px; padding: 0 12px; font-weight: 600; border-radius: var(--r-s); background: var(--fill); color: var(--ink); }
.ji .ji-segb.g-ok[aria-pressed="true"] { background: var(--green); color: #fff; }
.ji .ji-segb.g-attention[aria-pressed="true"] { background: #e0a100; color: #1d1d1f; }
.ji .ji-segb.g-urgent[aria-pressed="true"] { background: var(--red); color: #fff; }
.ji .ji-segb[aria-pressed="true"]:disabled { opacity: 1; }

/* photos */
.ji-thumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ji .ji-thumb { padding: 0; width: 64px; height: 64px; min-height: 0; border-radius: var(--r-s); overflow: hidden; background: var(--fill); }
.ji .ji-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ji .ji-thumb.big { width: 120px; height: 90px; }
.ji .ji-thumb { position: relative; }
.ji .ji-thumb.has-warn { box-shadow: 0 0 0 2px var(--amber); }
.ji .ji-thumb-warn { position: absolute; top: 3px; right: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--amber); color: #fff; font-size: 12px; font-weight: 700; line-height: 18px; text-align: center; }
.ji .ji-pwarn { flex-basis: 100%; font-size: 12.5px; color: var(--amber); }
.ji .ji-light-warn { display: block; margin-top: 6px; color: #ffcf7a; }
.ji-cam { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 14px; border-radius: 999px; background: var(--accent-soft);
  color: var(--accent); font: 600 14px/1 var(--font); cursor: pointer; }
.ji-cam:focus-within { box-shadow: 0 0 0 2px var(--accent); }
.ji-cam-i { font-size: 18px; }
.ji-file { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.ji .ji-rec { min-height: 44px; background: var(--accent); color: var(--accent-ink); }
.ji-onest { font-size: 12.5px; font-weight: 600; color: var(--green); }
.ji .ji-danger { background: var(--red-soft); color: var(--red); }

/* recommended work */
.ji-finds ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ji-find { border-radius: var(--r-m); padding: 10px 12px; background: var(--surface-2); box-shadow: inset 3px 0 0 var(--hair-strong); }
.ji-find.g-urgent { box-shadow: inset 3px 0 0 var(--red); }
.ji-find.g-attention { box-shadow: inset 3px 0 0 #e0a100; }
.ji-find-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ji-find-n { color: var(--ink-2); font-size: 13.5px; flex: 1 1 160px; }
.ji-recform { display: grid; gap: 10px; margin-top: 10px; }
.ji-lab { display: grid; gap: 4px; font-size: 12.5px; color: var(--ink-2); }
.ji .ji-text { width: 100%; font-size: 16px; }

/* overlays: caption sheet and photo viewer */
.ji-overlay { position: fixed; inset: 0; z-index: 60; display: grid; place-items: end center; background: rgba(0, 0, 0, .35); padding: 16px; }
.ji-overlay.ji-dark { background: rgba(0, 0, 0, .86); place-items: center; }
.ji-sheet { background: var(--surface); border-radius: var(--r-l); padding: 18px; width: min(520px, 100%); display: grid; gap: 10px; box-shadow: var(--shadow-pop); }
.ji-sheet h3 { margin: 0; }
.ji-sheet .ji-cap { font-size: 16px; min-height: 48px; }
.ji-sheet-a { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; align-items: center; }
.ji .ji-sheet-a button { min-height: 44px; }
.ji-lightbox { margin: 0; display: grid; gap: 10px; max-width: min(960px, 100%); max-height: 100%; }
.ji-lightbox img { max-width: 100%; max-height: 72vh; object-fit: contain; border-radius: var(--r-m); background: #111; justify-self: center; }
.ji-lightbox figcaption { color: #f5f5f7; display: grid; gap: 2px; font-size: 14px; }
.ji-lightbox figcaption span { color: #a1a1a6; font-size: 12.5px; }
.ji-lightbox .ji-sub { color: #d1d1d6; }

/* customer-ready view */
.ji-cust { background: var(--surface); border-radius: var(--r-l); box-shadow: 0 0 0 .5px var(--hair); padding: 20px; display: grid; gap: 14px; max-width: 720px; }
.ji-cust-h h2 { margin: 2px 0; font-size: 22px; }
.ji-cust-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ji-cust-g { display: grid; gap: 4px; }
.ji-cust-g h3 { margin: 6px 0 2px; }
.ji-cust-g h3 .ji-dot { font-size: 15px; }
.ji-cust-i { padding: 10px 0; border-top: 1px solid var(--hair); display: grid; gap: 8px; }
.ji-cust-row { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.ji-cust-v { font-weight: 600; }
.ji-cust-ph { display: flex; flex-wrap: wrap; gap: 8px; }
.ji-cust-ph figure { margin: 0; display: grid; gap: 4px; max-width: 120px; }
.ji-cust-ph figcaption { font-size: 12px; color: var(--ink-2); }

@media (max-width: 1100px) { .ji-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .ji-sec { padding: 14px 12px 12px; border-radius: var(--r-m); }
  .ji-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ji-pos { padding: 10px; }
  .ji-row { grid-template-columns: 1fr; grid-template-areas: "h" "seg" "f"; }
  .ji-seg { display: grid; width: 100%; }
  .ji .ji-segb { min-width: 0; }
  .ji-sec-h { flex-wrap: wrap; }
  .ji-sum-n { padding: 10px; }
  .ji-cust { padding: 16px 14px; }
}
@media (max-width: 340px) { .ji-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .ji-bar-fill { transition: none; } }
@media (max-width: 640px) {
  .ji-field { min-height: 48px; padding: 0 8px; gap: 4px; }
  .ji .ji-num { font-size: 22px; min-height: 44px; }
  .ji-pos-f .ji-cam { padding: 0 12px; }
}
.ji-pos { min-width: 0; }
.ji-grid .ji-pos-h > div { flex-basis: 100%; margin-left: 0; }
.ji-grid .ji-dot { white-space: normal; }
.ji .ji-segb { white-space: normal; line-height: 1.15; }
.ji-prev img { display: block; width: 100%; max-height: 220px; object-fit: cover; border-radius: var(--r-m); }
.ji-removed { font-size: 13px; color: var(--ink-2); }
.ji-removed summary { cursor: pointer; min-height: 32px; }
.ji-removed ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 4px; }
@media (max-width: 640px) { .ji .ji-segb { font-size: 13.5px; padding: 0 6px; } }
.ji .ji-guide { display: inline-block; margin-top: 4px; font-size: 13px; font-weight: 600; }   /* SEMA: link to the guided inspection by voice */
/* Held photos (migration 101): flagged by the AI photo check, off the customer page until someone releases them. */
.ji .ji-thumb.is-held img { opacity: .55; }
.ji .ji-thumb-held { position: absolute; left: 3px; bottom: 3px; padding: 1px 6px; border-radius: 9px; background: var(--amber); color: #fff; font-size: 11px; font-weight: 700; line-height: 16px; }
.ji .ji-light-review { display: block; margin-top: 6px; color: #d7dde5; }
.ji .ji-light-review.is-held { color: #ffcf7a; }

/* 164: notes per section (technician note is staff-only; the customer explanation is shared by an advisor) */
.ji-notes { margin-top: 12px; border-top: .5px solid var(--hair); padding-top: 10px; }
.ji-notes > summary { cursor: pointer; font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ji-note-chip { font: 500 12px/1 var(--font); padding: 4px 8px; border-radius: 999px; background: var(--fill); color: var(--ink-2); }
.ji-note-chip.is-shared { background: var(--green-soft); color: var(--ink); }
.ji-note-chip.is-draft { background: var(--amber-soft); color: var(--ink); }
.ji-note-f { display: block; margin-top: 10px; }
.ji-note-l { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 4px; }
.ji-note-in { width: 100%; box-sizing: border-box; min-height: 56px; resize: vertical; }
.ji-note-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ji-cust-note { margin: 4px 0 0; white-space: pre-line; }

/* Batch 30 (UI_COVERAGE.md, stream B): the Inspection tab's head under the shared band look, like the Estimate card's band
   (stream A's .band: the accent, white heavy italic, square). The Inspect / Customer view switch reads on the band. */
body.shop-on .ji > .ji-head { background: var(--accent); color: var(--accent-ink, #fff); padding: 10px 18px; border-radius: 4px 4px 0 0; align-items: center; min-height: 46px; box-sizing: border-box; }
body.shop-on .ji > .ji-head h2 { font: italic 900 23px/1.08 var(--font-title); text-transform: uppercase; letter-spacing: -0.006em; color: inherit; margin: 0; }
body.shop-on .ji > .ji-head :is(.ji-sub, .ji-guide, a, span, p) { color: inherit; }
body.shop-on .ji > .ji-head .ji-sub { opacity: .92; }
body.shop-on .ji > .ji-head .ji-mode { background: transparent; color: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5); }
body.shop-on .ji > .ji-head .ji-mode[aria-pressed="true"] { background: var(--surface); color: var(--accent); box-shadow: none; }
@media (max-width: 860px) { body.shop-on .ji > .ji-head { padding: 8px 14px; } body.shop-on .ji > .ji-head h2 { font-size: 19px; } }
body.shop-on .ji > .ji-head .ji-modes { background: transparent; box-shadow: none; gap: 4px; }
