/* Jobs V2 wizard + combined-list styles. Layered on top of the shared
   style.css and scoped to V2 pages so V1 styling is unaffected. Uses the V1
   design tokens (--cg-blue, --cg-bg-soft, --cg-border, the radii, Ubuntu /
   Ubuntu Mono) so the guided wizard is visually continuous with the rest of
   the app. Earlier this file referenced tokens that don't exist in V1
   (--cg-accent / --cg-surface / --cg-mono), which fell back to a generic
   green/white and made the wizard look unbranded and "old school". */

.wizard-shell { max-width: 880px; margin: 0 auto; }

/* === Stepper (clickable breadcrumb) ===================================== */
.wizard-stepper {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 20px;
  list-style: none; padding: 0;
}
.wizard-stepper li {
  flex: 1 1 0; min-width: 92px; font-size: 12px; text-align: center;
  padding: 10px 6px 8px; border-radius: var(--radius-input);
  border: 1.5px solid var(--cg-border); color: var(--cg-muted);
  background: var(--cg-bg); cursor: pointer; user-select: none;
  transition: border-color .15s, color .15s, background .15s, box-shadow .15s;
}
.wizard-stepper li:hover { border-color: var(--cg-blue); color: var(--cg-text); }
.wizard-stepper li.active {
  border-color: var(--cg-blue); color: var(--cg-text); font-weight: 700;
  box-shadow: 0 2px 10px rgba(0, 112, 173, 0.15);
}
.wizard-stepper li.done { border-color: var(--cg-blue-bright); color: var(--cg-blue); }
.wizard-stepper li .step-n {
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; margin: 0 auto 5px; border-radius: 50%;
  font-size: 13px; font-weight: 700;
  background: var(--cg-bg-soft); color: var(--cg-muted);
  border: 1.5px solid var(--cg-border);
  transition: background .15s, color .15s, border-color .15s;
}
.wizard-stepper li.active .step-n {
  background: var(--cg-blue); color: #fff; border-color: var(--cg-blue);
}
.wizard-stepper li.done .step-n {
  background: var(--cg-blue-bright); color: #fff; border-color: var(--cg-blue-bright);
}

/* === Step panel (card) ================================================== */
.wizard-step {
  background: var(--cg-bg);
  border: 1px solid var(--cg-border);
  border-radius: var(--radius-card);
  box-shadow: var(--cg-shadow);
  padding: 1.75rem 2rem;
}
.wizard-step > h2 {
  font-size: 11px; font-weight: 700; color: var(--cg-muted);
  text-transform: uppercase; letter-spacing: 0.1em;
  margin: 0 0 1.25rem; padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--cg-blue-bright); display: inline-block;
}
.wizard-step .step-hint {
  color: var(--cg-muted); margin: 0 0 1.25rem; font-size: 14px; line-height: 1.55;
}

/* === Form controls — consistent with V1 fields ========================= */
.wizard-step .form-group { margin-bottom: 1.25rem; }
.wizard-step .form-group label {
  display: block; font-weight: 700; margin-bottom: 6px; font-size: 13px; color: var(--cg-text);
}
.wizard-step input[type="text"],
.wizard-step select,
.wizard-step textarea {
  width: 100%;
  border: 1.5px solid var(--cg-border);
  border-radius: var(--radius-input);
  font-family: inherit;
  font-size: 14px;
  color: var(--cg-text);
  background: var(--cg-bg-soft);
  padding: 10px 14px;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.wizard-step textarea {
  font-family: "Ubuntu Mono", "Courier New", monospace;
  font-size: 13px;
  line-height: 1.65;
  resize: vertical;
  min-height: 120px;
  display: block;
}
/* Generous floors so the big content areas never collapse to a few rows. */
.wizard-step #w-brief { min-height: 90px; }
.wizard-step #w-intake,
.wizard-step #w-review-content,
.wizard-step .gathering-box { min-height: 240px; }
.wizard-step input[type="text"]:focus,
.wizard-step select:focus,
.wizard-step textarea:focus {
  outline: none; border-color: var(--cg-blue); background: var(--cg-bg);
  box-shadow: 0 0 0 3px rgba(0, 112, 173, 0.12);
}
.wizard-step input::placeholder,
.wizard-step textarea::placeholder { color: var(--cg-muted); opacity: 0.8; }

/* === Choice cards (family + presets) =================================== */
.wizard-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px;
}
.wizard-card {
  border: 1.5px solid var(--cg-border); border-radius: var(--radius-card);
  padding: 1.1rem 1.2rem; cursor: pointer; background: var(--cg-bg);
  text-align: left; font-family: inherit;
  transition: border-color .15s, box-shadow .15s, transform .1s;
}
.wizard-card:hover { border-color: var(--cg-blue); box-shadow: var(--cg-shadow); transform: translateY(-1px); }
.wizard-card.selected { border-color: var(--cg-blue); box-shadow: 0 0 0 3px rgba(0, 112, 173, 0.15); }
.wizard-card h3 { margin: 0 0 6px; font-size: 16px; color: var(--cg-text); }
.wizard-card p { margin: 0; color: var(--cg-muted); font-size: 13px; line-height: 1.5; }
.wizard-card .preset-thumb {
  width: 100%; height: 84px; border-radius: var(--radius-input); margin-bottom: 12px;
  background: linear-gradient(135deg, var(--cg-blue), var(--cg-blue-bright));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px; font-weight: 700; text-align: center;
  padding: 0 10px; overflow: hidden;
}
.wizard-card .preset-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* === Footer / action bar =============================================== */
.wizard-footer {
  display: flex; align-items: center; gap: 12px; margin-top: 18px;
  padding-top: 16px; border-top: 1px solid var(--cg-border);
}
.wizard-footer .spacer { flex: 1; }
.wizard-save-state { font-size: 12px; color: var(--cg-muted); font-weight: 600; white-space: nowrap; }
.wizard-save-state.saving { color: var(--cg-blue); }
.wizard-escape { font-size: 13px; color: var(--cg-blue); text-decoration: none; }
.wizard-escape:hover { text-decoration: underline; }

/* === Chrome checkboxes (panelled) ====================================== */
.chrome-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 18px;
  background: var(--cg-bg-soft); border: 1px solid var(--cg-border);
  border-radius: var(--radius-input); padding: 14px 16px;
}
.chrome-grid label {
  display: flex; gap: 9px; align-items: flex-start; font-size: 14px;
  color: var(--cg-text); cursor: pointer;
}
.chrome-grid input[type="checkbox"] {
  margin-top: 2px; width: 16px; height: 16px; accent-color: var(--cg-blue); flex-shrink: 0;
}

/* === Swim-lane editor (panelled) ======================================= */
.lane-editor {
  margin-top: 14px; background: var(--cg-bg-soft); border: 1px solid var(--cg-border);
  border-radius: var(--radius-input); padding: 14px 16px;
}
.lane-editor > label { display: block; font-weight: 700; font-size: 13px; margin-bottom: 8px; color: var(--cg-text); }
.lane-row { display: flex; gap: 8px; margin-bottom: 8px; }
.lane-row input { flex: 1; }
.lane-row .btn { padding: 0.45rem 0.85rem; flex-shrink: 0; }
#w-lane-add { margin-top: 2px; }

/* === Intake-mode selector (selectable rows) ============================ */
.intake-modes { display: grid; gap: 10px; margin-bottom: 4px; }
.intake-modes label {
  display: flex; gap: 10px; align-items: flex-start; cursor: pointer;
  border: 1.5px solid var(--cg-border); border-radius: var(--radius-input);
  padding: 12px 14px; background: var(--cg-bg); font-size: 14px; color: var(--cg-text);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.intake-modes label:hover { border-color: var(--cg-blue); }
.intake-modes input[type="radio"] {
  margin-top: 1px; width: 16px; height: 16px; accent-color: var(--cg-blue); flex-shrink: 0;
}
/* Highlight the chosen row (modern browsers; degrades to the hover/border look). */
.intake-modes label:has(input:checked) {
  border-color: var(--cg-blue); background: var(--cg-bg-soft);
  box-shadow: 0 0 0 2px rgba(0, 112, 173, 0.12);
}

/* === Readiness meter =================================================== */
.readiness-meter {
  padding: 12px 16px; border-radius: var(--radius-input); margin-bottom: 14px;
  font-weight: 700; font-size: 14px; border: 1px solid transparent;
}
.readiness-green { background: #e7f6ec; color: #1a7f37; border-color: #bfe6cd; }
.readiness-amber { background: #fff4e0; color: #9a6700; border-color: #ffe3a8; }
.readiness-red   { background: #ffebe9; color: #b3261e; border-color: #f5c6c0; }
.readiness-gaps { list-style: none; padding: 0; margin: 0; }
.readiness-gaps li {
  font-size: 13px; padding: 7px 2px; color: var(--cg-text);
  border-bottom: 1px solid var(--cg-border);
}
.readiness-gaps li:last-child { border-bottom: none; }
.readiness-gaps .sev-warn::before { content: "⚠ "; }
.readiness-gaps .sev-info::before { content: "ℹ "; }

/* === Combined list (All / v1 / v2) ===================================== */
.v2-filter {
  display: inline-flex; border: 1px solid var(--cg-border);
  border-radius: var(--radius-btn); overflow: hidden; background: var(--cg-bg-soft);
}
.v2-filter button {
  border: none; border-right: 1px solid var(--cg-border); background: transparent;
  padding: 6px 16px; cursor: pointer; font-family: inherit; font-size: 13px;
  font-weight: 600; color: var(--cg-text); transition: background .15s, color .15s;
}
.v2-filter button:last-child { border-right: none; }
.v2-filter button.active { background: var(--cg-blue); color: #fff; }
.v2-filter button:not(.active):hover { background: var(--cg-bg); }
.engine-tag {
  font-size: 11px; padding: 2px 8px; border-radius: var(--radius-btn);
  border: 1px solid var(--cg-border); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.03em;
}
.engine-v2 { background: #e6f1ff; color: #0055aa; border-color: #a8c8ec; }
.engine-v1 { background: var(--cg-bg-soft); color: var(--cg-muted); }
[data-theme="dark"] .engine-v2 {
  background: rgba(18, 171, 219, 0.18); color: var(--cg-blue-bright); border-color: rgba(18, 171, 219, 0.4);
}

/* === Guided result page (job.html) ===================================== */
#v2-job-root > div { margin-bottom: 1.25rem; }
#v2-job-root > div:empty { margin-bottom: 0; }
#v2-result h3,
#v2-spec-summary h3,
#v2-refine h3 {
  font-size: 11px; font-weight: 700; color: var(--cg-muted);
  text-transform: uppercase; letter-spacing: 0.1em;
  margin: 0 0 0.75rem; padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--cg-blue-bright); display: inline-block;
}
#v2-result img { box-shadow: var(--cg-shadow); border-radius: var(--radius-input); }
#v2-result .downloads { display: flex; flex-direction: column; gap: 4px; margin-top: 0.75rem; }
#v2-refine input[type="text"] { max-width: 100%; margin: 0.5rem 0 0.75rem; }

/* === Responsive ======================================================== */
@media (max-width: 640px) {
  .wizard-step { padding: 1.25rem; }
  .wizard-stepper li { min-width: 60px; font-size: 11px; }
  .wizard-stepper li .step-n { width: 24px; height: 24px; }
}
