/* ==========================================================================
   Labour Life practice system: import.css. Owner: import (M4).
   The import screen (SPEC 7.4, views/admin-import.js). Every class here
   starts with imp-. Nothing restates a class of the core files. Tokens only,
   no raw colours. Phone first: the base styles are the phone.

     .imp-phone                  "Easier on a computer." (under 720px only)
     .imp-steps (__i __n __t)    the four step names in a row (.is-on, .is-done)
     .imp-step, .imp-h, .imp-h3  the open step: a card, its heading
     .imp-sec (__t)              one part of step 1: a small title and what belongs to it
     .imp-links                  the two template links
     .imp-tbl                    the card around a table
     .imp-hint                   the two lines about a workers file on step 1
     .imp-one (__company)        step 2, workers: "All rows are for one company" and its company
     .imp-map (__field __req __col __off __samples)   step 2: field, column ("Not needed"), first values
     .imp-company                "All rows go to ABC Farming (ABC001)." on step 3 and 4
     .imp-samples, .imp-sample   the first values of a column
     .imp-unused                 "Columns of your file that are not used"
     .imp-benco                  step 2: "This looks like a Benco export" (item 90)
     .imp-multi (__i __add __hint)   step 2: Notes of a workers file, several columns (item 90)
     .imp-left                   step 3: "Not imported: ..." and why (item 90)
     .imp-sum (__i __l __n)      the numbers of step 3 and 4 (--err, --warn)
     .imp-rows (__name)          the rows of the preview and of the report
     .imp-probs, .imp-prob       the problems of a row (--warn for a warning, --kept for a stored value that stayed)
     .imp-rule                   step 3: "What is stored stays as it is" (27 Oct 2026)
     .imp-pay                    step 2 of a pay rates file: how a row finds its employee (decision 364)
     .imp-rows__pay (.is-failed) the pay rate of a row of a pay rates file, "R 28,50 per hour to R 30,10 per hour"
     .imp-skip, .imp-acts, .imp-busy   the line above the buttons, the buttons, "Checking the file"
   ========================================================================== */

.imp-phone { margin-top: var(--s2); }
@media (min-width: 720px) { .imp-phone { display: none; } }

/* ---------- the step names ---------- */

.imp-steps {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s2);
  margin-bottom: 0; padding: 0; list-style: none;
}
.imp-steps__i {
  display: grid; justify-items: center; align-content: start; gap: var(--s1);
  padding-top: var(--s2); border-top: 3px solid var(--line-strong);
  color: var(--ink-mute); font-size: var(--fs-sm); font-weight: 600; line-height: var(--lh-snug); text-align: center;
  min-width: 0;
}
.imp-steps__n {
  display: grid; place-items: center; flex: none; width: 28px; height: 28px;
  border: 1px solid var(--field-line); border-radius: var(--r-pill);
  background: var(--surface); color: var(--ink-soft);
  font: 700 var(--fs-sm)/1 var(--font-body); font-variant-numeric: tabular-nums;
}
.imp-steps__t { min-width: 0; overflow-wrap: anywhere; }
.imp-steps__i.is-on { border-top-color: var(--red-ink); color: var(--ink); }
.imp-steps__i.is-on .imp-steps__n { border-color: var(--ink); background: var(--ink); color: var(--surface); }
.imp-steps__i.is-done { border-top-color: var(--success); color: var(--ink-soft); }
.imp-steps__i.is-done .imp-steps__n { border-color: var(--success); background: var(--success-bg); color: var(--success-ink); }
@media (min-width: 720px) {
  .imp-steps__i { grid-template-columns: auto minmax(0, 1fr); justify-items: start; align-items: center; gap: var(--s2); text-align: left; font-size: var(--fs-body); }
}

/* ---------- the open step ---------- */

.imp-step { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
.imp-step > * { min-width: 0; }
.imp-h { font-size: var(--fs-h2); }
/* The heading takes focus after a step change so a screen reader says it. It is not a control. */
.imp-h:focus, .imp-h:focus-visible { outline: none; }
.imp-h3 { margin-top: var(--s2); font-size: var(--fs-h3); }

.imp-sec { display: grid; gap: var(--s2); justify-items: start; min-width: 0; }
.imp-sec > * { min-width: 0; max-width: 100%; }
.imp-file { width: 100%; }
.imp-sec__t { font-weight: 600; color: var(--ink); }
.imp-links { display: flex; flex-wrap: wrap; gap: var(--s2); }

.imp-tbl { min-width: 0; }
@media (min-width: 720px) { .imp-tbl { overflow-x: auto; } }

/* ---------- step 2: match the columns ---------- */

.imp-map__field { font-weight: 600; }
.imp-map__req { display: block; font-size: var(--fs-sm); font-weight: 400; color: var(--ink-mute); }
.imp-map__col > * + * { margin-top: var(--s1); }
.imp-map__off { display: block; color: var(--ink-mute); }
.imp-hint { display: grid; gap: var(--s1); }
.imp-hint > p { margin: 0; }
.imp-one { display: grid; gap: var(--s2); min-width: 0; }
.imp-one__company { display: grid; gap: var(--s1); min-width: 0; max-width: 480px; }
.imp-company { overflow-wrap: anywhere; }
.imp-samples { display: flex; flex-wrap: wrap; gap: var(--s1); margin: 0; padding: 0; list-style: none; }
.imp-sample {
  max-width: 100%; padding: 2px var(--s2); border: 1px solid var(--line); border-radius: var(--r-xs);
  background: var(--sunken); color: var(--ink-soft); font-size: var(--fs-sm); line-height: var(--lh-snug);
  overflow-wrap: anywhere;
}
.imp-unused { overflow-wrap: anywhere; }
.imp-benco { display: grid; gap: var(--s1); }
.imp-benco > p { margin: 0; }
.imp-multi { display: grid; gap: var(--s1); min-width: 0; }
.imp-multi:empty { display: none; }
.imp-multi__i { display: flex; gap: var(--s1); align-items: center; min-width: 0; }
.imp-multi__i > .input { flex: 1 1 auto; min-width: 0; }
.imp-multi__hint { margin: 0; }
.imp-left { overflow-wrap: anywhere; }
@media (min-width: 720px) {
  .imp-map__field { width: 26%; vertical-align: middle; }
  .imp-map__col { width: 34%; }
  .imp-map__samples { vertical-align: middle; }
}

/* ---------- the numbers ---------- */

.imp-sum { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); margin: 0; }
.imp-sum__i {
  display: grid; gap: var(--s1); padding: var(--s3) var(--s4);
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface);
}
.imp-sum__l { font-size: var(--fs-sm); font-weight: 600; color: var(--ink-mute); line-height: var(--lh-snug); }
.imp-sum__n { margin: 0; font: 700 var(--fs-h1)/var(--lh-tight) var(--font-display); color: var(--ink); }
.imp-sum__i--err { border-color: var(--danger-line); background: var(--danger-bg); }
.imp-sum__i--err .imp-sum__l, .imp-sum__i--err .imp-sum__n { color: var(--danger-ink); }
.imp-sum__i--warn { border-color: var(--warning-line); background: var(--warning-bg); }
.imp-sum__i--warn .imp-sum__l, .imp-sum__i--warn .imp-sum__n { color: var(--warning-ink); }
@media (min-width: 720px) { .imp-sum { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--s3); } }

/* ---------- the rows ---------- */

.imp-rows__name { overflow-wrap: anywhere; }
@media (min-width: 720px) { .imp-rows__name { width: 32%; } }
.imp-probs { display: grid; gap: var(--s1); margin: 0; padding: 0; list-style: none; }
.imp-prob { color: var(--danger-ink); font-size: var(--fs-sm); line-height: var(--lh-snug); overflow-wrap: anywhere; }
.imp-prob strong { font-weight: 600; }
.imp-prob--warn { color: var(--warning-ink); }
/* A stored value that stayed (27 Oct 2026): information, not a problem. */
.imp-prob--kept { color: var(--ink-soft); }
/* The groups a row puts the employee in, and the groups a file makes (27 Oct 2026): information too. */
.imp-prob--groups { color: var(--ink-soft); }
.imp-groups { overflow-wrap: anywhere; }
.imp-rule { overflow-wrap: anywhere; }
/* Pay rates only (decision 364): the rate before and after, kept on one line on a computer when it fits. */
.imp-pay { overflow-wrap: anywhere; }
.imp-rows__pay { overflow-wrap: anywhere; }
.imp-rows__pay.is-failed { color: var(--ink-soft); }
@media (min-width: 720px) { .imp-rows__pay { width: 26%; } }

/* ---------- the buttons ---------- */

.imp-skip { font-weight: 600; color: var(--warning-ink); }
.imp-acts { margin-top: var(--s2); }
.imp-busy { display: flex; align-items: center; gap: var(--s2); color: var(--ink-soft); font-size: var(--fs-sm); }
