/* Staff assistant chat window (JZ-AI-01 Phase 1) — JZ-DS-03 «Drafting Table · Tech» tokens.
   Floors: Arabic ≥ 13px · targets ≥ 44px · inputs ≥ 16px · AA contrast · reduced motion · no horizontal scroll at 320/390/1280.
   Red = act now (confirm); the deck is the header and the employee's own bubbles. */
.jzc-ov {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(19, 32, 41, .42);
  display: flex; align-items: center; justify-content: center;
  padding: var(--ds-4, 16px);
}
.jzc-box {
  width: 100%; max-width: 640px; height: min(88vh, 760px);
  display: flex; flex-direction: column;
  background: var(--ds-paper, #F4F1EA);
  border: 1px solid var(--ds-rule, #D9D2C3);
  border-radius: var(--ds-r3, 10px);
  overflow: hidden; direction: rtl;
  font-family: var(--ds-ar, 'Cairo', system-ui, sans-serif);
  color: var(--ds-ink, #152026);
  box-shadow: 0 24px 64px rgba(19, 32, 41, .28);
}
.jzc-hd {
  display: flex; align-items: center; justify-content: space-between; gap: var(--ds-2, 8px);
  padding: var(--ds-2, 8px) var(--ds-3, 12px) var(--ds-2, 8px) var(--ds-2, 8px);
  background: var(--ds-deck, #132029); color: var(--ds-on-deck, #fff);
  min-height: var(--ds-touch, 44px);
}
.jzc-hd__t { display: flex; align-items: center; gap: var(--ds-2, 8px); font-weight: 800; font-size: 15px; min-width: 0; }
.jzc-pill {
  font-weight: 600; font-size: 13px; color: var(--ds-on-deck-2, rgba(255,255,255,.66));
  border: 1px solid var(--ds-on-deck-line, rgba(255,255,255,.14)); border-radius: var(--ds-rpill, 999px);
  padding: 2px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.jzc-hd__a { display: flex; gap: var(--ds-1, 4px); flex: 0 0 auto; }
.jzc-icon {
  min-height: var(--ds-touch, 44px); min-width: var(--ds-touch, 44px); padding: 0 var(--ds-3, 12px);
  background: transparent; color: var(--ds-on-deck, #fff);
  border: 1px solid var(--ds-on-deck-line, rgba(255,255,255,.14)); border-radius: var(--ds-r2, 6px);
  font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}
.jzc-msgs {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  padding: var(--ds-4, 16px) var(--ds-3, 12px);
  display: flex; flex-direction: column; gap: var(--ds-2, 8px);
}
.jzc-msg {
  max-width: 86%; align-self: flex-start;
  background: var(--ds-sheet, #FBFAF6); border: 1px solid var(--ds-rule, #D9D2C3);
  border-radius: var(--ds-r3, 10px); padding: var(--ds-2, 8px) var(--ds-3, 12px);
  font-size: 14px; line-height: 1.75; overflow-wrap: anywhere;
}
.jzc-msg p { margin: 0 0 4px; }
.jzc-msg p:last-child { margin-bottom: 0; }
.jzc-msg.is-me {
  align-self: flex-end; background: var(--ds-deck, #132029); color: var(--ds-on-deck, #fff);
  border-color: var(--ds-deck, #132029); white-space: pre-wrap;
}
.jzc-steps { margin: 4px 0; padding-inline-start: 20px; }
.jzc-steps li { margin: 2px 0; }
.jzc-typing { color: var(--ds-ink-3, #55606A); font-size: 13px; }
.jzc-open { margin-top: var(--ds-2, 8px); }
.jzc-starters { display: flex; flex-wrap: wrap; gap: var(--ds-2, 8px); margin-top: var(--ds-2, 8px); }
.jzc-chip {
  min-height: var(--ds-touch, 44px); padding: 0 var(--ds-3, 12px);
  background: var(--ds-sheet, #FBFAF6); color: var(--ds-ink, #152026);
  border: 1px solid var(--ds-line, #857D70); border-radius: var(--ds-rpill, 999px);
  font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; text-align: start;
}
.jzc-btn {
  min-height: var(--ds-touch, 44px); padding: 0 var(--ds-4, 16px);
  background: var(--ds-sheet, #FBFAF6); color: var(--ds-ink, #152026);
  border: 1px solid var(--ds-line, #857D70); border-radius: var(--ds-r2, 6px);
  font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
}
.jzc-btn--go { background: var(--ds-red, #D93D3D); color: #fff; border-color: var(--ds-red, #D93D3D); }
.jzc-btn--go:active { background: var(--ds-red-press, #A92D31); }
.jzc-btn--send { background: var(--ds-deck, #132029); color: var(--ds-on-deck, #fff); border-color: var(--ds-deck, #132029); flex: 0 0 auto; }
.jzc-send {
  display: flex; align-items: flex-end; gap: var(--ds-2, 8px);
  padding: var(--ds-2, 8px) var(--ds-3, 12px);
  background: var(--ds-sheet, #FBFAF6); border-top: 1px solid var(--ds-rule, #D9D2C3);
}
.jzc-send textarea {
  flex: 1; min-width: 0; min-height: var(--ds-touch, 44px); max-height: 140px; resize: none;
  padding: 10px 12px; font: inherit; font-size: 16px; line-height: 1.5;
  color: var(--ds-ink, #152026); background: #fff;
  border: 1px solid var(--ds-line, #857D70); border-radius: var(--ds-r2, 6px);
}
.jzc-attach {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  min-width: var(--ds-touch, 44px); min-height: var(--ds-touch, 44px);
  border: 1px solid var(--ds-line, #857D70); border-radius: var(--ds-r2, 6px); cursor: pointer; font-size: 18px;
}
.jzc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* confirmation card */
.jzc-card {
  margin-top: var(--ds-2, 8px); padding: var(--ds-3, 12px);
  background: #fff; border: 1px solid var(--ds-rule-2, #C9C0AE); border-inline-start: 3px solid var(--ds-red, #D93D3D);
  border-radius: var(--ds-r2, 6px);
}
.jzc-card__t { font-weight: 800; font-size: 15px; }
.jzc-card__m { color: var(--ds-ink-3, #55606A); font-size: 13px; }
.jzc-card__l { margin-top: var(--ds-2, 8px); font-size: 13px; font-weight: 700; color: var(--ds-ink-2, #2E3A41); }
.jzc-card__ok { margin-top: var(--ds-2, 8px); color: var(--ds-green, #1A6B48); font-weight: 700; font-size: 14px; }
.jzc-card__err { margin-top: var(--ds-2, 8px); color: var(--ds-danger, #9E2A2A); font-weight: 700; font-size: 14px; }
.jzc-card__a { display: flex; flex-wrap: wrap; gap: var(--ds-2, 8px); margin-top: var(--ds-3, 12px); }
.jzc-kv { list-style: none; margin: 4px 0 0; padding: 0; }
.jzc-kv li { display: flex; justify-content: space-between; gap: var(--ds-3, 12px); font-size: 13px; padding: 2px 0; border-bottom: 1px dashed var(--ds-rule, #D9D2C3); }
.jzc-kv b { font-family: var(--ds-ar, 'Cairo', sans-serif); overflow-wrap: anywhere; }
.jzc-reps { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(160px, 100%), 1fr)); gap: 2px var(--ds-2, 8px); }
.jzc-rep { display: flex; align-items: center; gap: var(--ds-2, 8px); min-height: var(--ds-touch, 44px); font-size: 14px; cursor: pointer; }
.jzc-rep input { width: 20px; height: 20px; accent-color: var(--ds-deck, #132029); }
.jzc-rep--all { font-weight: 700; }
@media (max-width: 767px) {
  .jzc-ov { padding: 0; }
  .jzc-box { max-width: 100%; height: 100%; height: 100dvh; border-radius: 0; border: 0; }
  .jzc-msg { max-width: 94%; }
}
@media (prefers-reduced-motion: reduce) { .jzc-ov, .jzc-box, .jzc-msg { transition: none !important; animation: none !important; } }
