/* ──────────────────────────────────────────────────────────────────────────
   OpenDrawing — Upload package: wizard chrome
   Covers: backdrop, dialog, header, step bar, body, footer, nav buttons.
   Fonts + variables → tokens.css  |  Animations → upload-hero.css
   ────────────────────────────────────────────────────────────────────────── */

@layer components {

/* ── WIZARD BACKDROP ────────────────────────────────────────────────────── */
.wizard-backdrop {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(10,15,30,.80); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px; opacity: 0; pointer-events: none; transition: opacity .2s;

  &.open { opacity: 1; pointer-events: auto; }
}

/* ── WIZARD DIALOG ──────────────────────────────────────────────────────── */
.wizard-dialog {
  width: 100%; max-width: 660px;
  background: var(--bg-panel); border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(59,91,219,.1);
  display: flex; flex-direction: column;
  max-height: calc(100vh - 48px); overflow: hidden;
  animation: od-slideUp .2s ease;
}

/* ── WIZARD HEADER ──────────────────────────────────────────────────────── */
.wizard-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 24px 0; flex-shrink: 0;
}

.wizard-title { font-size: var(--fs-lg); font-weight: var(--fw-semibold); color: var(--text-primary); }

.wizard-close {
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius); color: var(--text-muted);
  cursor: pointer; transition: all .1s; border: none; background: none;

  &:hover { background: var(--bg-hover); color: var(--text-primary); }
}

/* ── STEP BAR ───────────────────────────────────────────────────────────── */
.step-bar  { display: flex; align-items: center; padding: 20px 24px 0; flex-shrink: 0; }
.step-item { display: flex; align-items: center; gap: 8px; flex: 1; &:last-child { flex: none; } }

.step-dot {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: var(--fw-bold);
  background: var(--bg-hover); color: var(--text-muted);
  border: 1.5px solid var(--border); transition: all .2s;

  &.done   { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }
  &.active { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 0 0 4px rgba(59,91,219,.2); }
}

.step-label {
  font-size: var(--fs-xs); font-weight: var(--fw-medium);
  color: var(--text-muted); white-space: nowrap; transition: color .2s;
}

.step-item {
  &.active .step-label { color: var(--text-primary); font-weight: var(--fw-semibold); }
  &.done   .step-label { color: var(--accent); }
}

.step-connector {
  flex: 1; height: 1px; background: var(--border); margin: 0 8px; transition: background .25s;
  &.done { background: var(--accent); }
}

/* ── WIZARD BODY ────────────────────────────────────────────────────────── */
.wizard-body {
  flex: 1; overflow-y: auto; padding: 24px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.wizard-body::-webkit-scrollbar { width: 5px; }
.wizard-body::-webkit-scrollbar-track { background: transparent; }
.wizard-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.step-content { animation: od-fadeIn .22s ease; }
.step-heading { font-size: var(--fs-lg); font-weight: var(--fw-semibold); color: var(--text-primary); margin-bottom: 4px; }
.step-sub     { font-size: var(--fs-sm); color: var(--text-muted); margin-bottom: 20px; line-height: 1.5; }

/* ── WIZARD FOOTER ──────────────────────────────────────────────────────── */
.wizard-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; border-top: 1px solid var(--border);
  background: var(--bg-base); flex-shrink: 0;
}

.wizard-step-label  { font-size: 11px; color: var(--text-muted); font-family: var(--mono); }
/* Shown in the processing footer while extraction is running */
.wizard-proc-hint   { font-size: 11px; color: var(--text-muted); font-style: italic; }
.wizard-actions    { display: flex; gap: 8px; }

/* ── NAV BUTTONS ────────────────────────────────────────────────────────── */
.btn-back {
  padding: 8px 16px; font-size: var(--fs-sm); font-weight: var(--fw-medium);
  color: var(--text-secondary); background: var(--bg-surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  cursor: pointer; transition: all .1s; font-family: var(--sans);

  &:hover { border-color: var(--border-light); color: var(--text-primary); }
}

.btn-next {
  padding: 8px 18px; font-size: var(--fs-sm); font-weight: var(--fw-semibold);
  color: #fff; background: var(--accent);
  border: none; border-radius: var(--radius);
  cursor: pointer; transition: all .12s; font-family: var(--sans);
  display: inline-flex; align-items: center; gap: 6px;
  box-shadow: 0 2px 8px rgba(59,91,219,.35);

  &:hover    { background: var(--accent-hover); box-shadow: 0 4px 16px rgba(59,91,219,.45); transform: translateY(-1px); }
  &:disabled { opacity: .35; cursor: default; pointer-events: none; box-shadow: none; transform: none; }
}

/* ── Project name inline (processing done state) ──────────────────────────── */
.pni-wrap {
  display: flex; align-items: center; gap: 8px;
  flex: 1; min-width: 0; margin-right: 12px;
}

.pni-label {
  font-size: 11px; font-weight: var(--fw-semibold); color: var(--text-muted);
  white-space: nowrap; flex-shrink: 0;
}

.pni-input {
  flex: 1; min-width: 0; max-width: 260px;
  font-size: var(--fs-sm); font-family: var(--sans); color: var(--text-primary);
  background: var(--bg-hover); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 5px 9px;
  outline: none; transition: border-color .12s, box-shadow .12s;

  &:focus { border-color: rgba(59,91,219,.5); box-shadow: 0 0 0 2px rgba(59,91,219,.1); }
}

} /* @layer components */
