/* processing.css — the 2.0 Processing screen (board Processing). The view is
 * js/views/processing.js (edited in place; its flow is untouched). 2.0 tokens
 * only; relative widths (OPEN-QUESTIONS #24). The route stays shell "none",
 * so this sheet paints its own page background. */

.v2-proc {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  min-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  background: var(--s-page);
  color: var(--t-primary);
  font-family: -apple-system, "SF Pro Text", "SF Pro Display", system-ui, "Helvetica Neue", sans-serif;
  box-sizing: border-box;
}
/* The screen box stops at the home-indicator inset (#app pads it), so the
 * body showed through below it in the legacy --bg: a 34px off-colour band at
 * the bottom (light #F4F4F5 under #FCFCFB; Randy 2026-10-06, item 3). The
 * body takes the screen's own colour while it is mounted. */
body:has(> #app > .v2-proc) {
  background: var(--s-page);
}

.v2-proc__top {
  /* Sticky like every top bar (shell.css .v2-head). */
  position: sticky;
  top: 0;
  z-index: 20;
  margin-top: calc(-1 * env(safe-area-inset-top, 0px));
  padding: calc(env(safe-area-inset-top, 0px) + 13px) var(--pad-x) 8px;
  background: var(--s-page);
}
.v2-proc__back {
  width: 44px;
  height: 44px;
  border-radius: 22px;
  background: var(--s-card);
  border: 1px solid var(--raised-line);
  box-shadow: var(--sh-raised);
  color: var(--t-nav);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.v2-proc__back svg {
  width: 20px;
  height: 20px;
}

.v2-proc__center {
  padding: 18px var(--pad-x) 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  text-align: center;
}
.v2-proc__center--failed {
  flex: 1 1 auto;
  justify-content: center;
  gap: 12px;
  padding-bottom: 15%;
}
.v2-proc__orb {
  position: relative;
  width: 84px;
  height: 84px;
  margin-bottom: 9px;
}
.v2-proc__ring {
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 3px solid var(--accent-tint);
  border-top-color: var(--accent);
  animation: v2ProcSpin 1s linear infinite;
}
.v2-proc__orbcore {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 18px var(--accent-glow);
  color: var(--on-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.v2-proc__orbcore svg {
  width: 38px;
  height: 38px;
}
.v2-proc__title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.6px;
}
.v2-proc__sub {
  margin: 0;
  font-size: 14px;
  color: var(--t-muted);
  font-variant-numeric: tabular-nums;
}

.v2-proc__steps {
  list-style: none;
  margin: 0;
  padding: 26px 22px 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.v2-proc__step {
  display: flex;
  align-items: flex-start;
  gap: 13px;
}
.v2-proc__step.is-pending {
  opacity: 0.5;
}
.v2-proc__icon {
  width: 26px;
  height: 26px;
  border-radius: 13px;
  flex: none;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.v2-proc__icon svg {
  width: 15px;
  height: 15px;
}
.v2-proc__icon.is-done {
  background: var(--done);
  color: var(--on-accent);
}
.v2-proc__icon.is-active {
  border: 2.5px solid var(--accent);
}
.v2-proc__dot {
  width: 9px;
  height: 9px;
  border-radius: 5px;
  background: var(--accent);
}
.v2-proc__icon.is-error {
  background: var(--danger);
  color: var(--on-accent);
}
.v2-proc__icon.is-pending {
  border: 2px solid var(--s-track);
}
.v2-proc__steptext {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
}
.v2-proc__steplabel {
  font-size: 15.5px;
  font-weight: 640;
  letter-spacing: -0.2px;
}
.v2-proc__stepsub {
  display: block;
  font-size: 13px;
  color: var(--t-nav-off);
}
.v2-proc__stepsub.is-error {
  color: var(--danger);
}
.v2-proc__elapsed {
  font-variant-numeric: tabular-nums;
}
.v2-proc__bar {
  display: block;
  margin-top: 9px;
  height: 6px;
  border-radius: 3px;
  background: var(--s-track);
  overflow: hidden;
}
.v2-proc__barfill {
  display: block;
  height: 6px;
  border-radius: 3px;
  background: var(--accent);
  /* keep in sync with BAR_EASE_MS in processing.js */
  transition: width 1000ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
.v2-proc__typechip {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 11px;
  border-radius: 14px;
  background: var(--accent-tint);
  border: 1px solid var(--accent-tint-line);
  box-shadow: var(--sh-raised);
  color: var(--accent-ink);
  font-size: 12.5px;
  font-weight: 650;
}
.v2-proc__change {
  align-self: flex-start;
  min-height: 24px;
  padding: 0;
  background: none;
  border: 0;
  font: inherit;
  font-size: 12.5px;
  color: var(--t-nav-off);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.v2-proc__retry,
.v2-proc__home {
  align-self: flex-start;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 18px;
  background: var(--accent);
  color: var(--on-accent);
  border: 0;
  font: inherit;
  font-size: 14px;
  font-weight: 620;
}
.v2-proc__home {
  align-self: center;
  min-height: 44px;
  border-radius: 22px;
  padding: 0 22px;
}

.v2-proc__foot {
  margin-top: auto;
  padding: 24px 30px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.v2-proc__note {
  margin: 0;
  font-size: 13px;
  color: var(--t-label);
  text-align: center;
  line-height: 1.45;
}
.v2-proc__discard {
  min-height: 44px;
  padding: 0 18px;
  background: none;
  border: 0;
  font: inherit;
  font-size: 14.5px;
  font-weight: 620;
  color: var(--accent-ink);
}

@keyframes v2ProcSpin {
  to {
    transform: rotate(360deg);
  }
}
