/* processing: VERWERKEN.EXE. A log on a lavender "monitor", status tags, a blinking cursor and the
   segmented loading bar. Lines are laid out from the start (invisible) so nothing jumps.
   The screen never grows past the stage: the log viewport gives up height instead, so the bar and the
   footer always fit (also on a 320x568 phone with LEESBRIL 30+). */
.scr-processing.screen {
  height: 100%;
}

/* centred with auto margins: unlike justify-content, they never push content out of reach at the top */
.scr-processing .scr-processing__win {
  margin-top: auto;
  margin-bottom: auto;
}

.scr-processing .scr-processing__win,
.scr-processing .scr-processing__win > .win__body,
.scr-processing .scr-processing__screen {
  display: flex;
  flex-direction: column;
  flex: 0 1 auto;
  min-height: 0;
}

.scr-processing .scr-processing__win > .win__bar,
.scr-processing .scr-processing__win > .win__body > :not(.scr-processing__screen),
.scr-processing .scr-processing__prompt {
  flex: none;
}

.scr-processing .scr-processing__head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.scr-processing .scr-processing__glass {
  display: grid;
  place-items: center;
  flex: none;
  width: 54px;
  height: 54px;
  background: var(--yellow);
  border: var(--bw) solid var(--ink);
  box-shadow: 3px 3px 0 0 var(--ink);
}

.scr-processing .scr-processing__glass svg {
  animation: scr-processing-flip calc(1400ms / var(--speed)) steps(1, end) infinite;
}

@keyframes scr-processing-flip {
  0% { transform: none; }
  50% { transform: rotate(180deg); }
}

.scr-processing .scr-processing__title {
  font-family: var(--font-ui);
  font-size: var(--fs-s);
  line-height: 1.2;
  text-transform: uppercase;
}

.scr-processing .scr-processing__sub {
  margin: 4px 0 0;
  font-size: var(--fs-s);
  line-height: 1.25;
}

.scr-processing .scr-processing__screen {
  padding: 10px 12px 12px;
  background: var(--lav-l);
  border: var(--bw) solid var(--ink);
  box-shadow: inset 3px 3px 0 0 var(--lav);
}

.scr-processing .scr-processing__prompt {
  margin: 0 0 8px;
  padding-bottom: 6px;
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  line-height: 1.3;
  overflow-wrap: anywhere;
  border-bottom: 3px dotted var(--lav-d);
}

/* The terminal viewport: as tall as the stage allows (it shrinks first, down to a few lines), and the
   script scrolls it to the newest line. */
.scr-processing .scr-processing__viewport {
  position: relative;
  flex: 0 1 auto;
  min-height: 112px;
  max-height: 480px;
  overflow: hidden;
}

.scr-processing .scr-processing__log {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0 0 3px; /* room for the closing line's hard shadow */
  list-style: none;
  font-size: var(--fs-s);
  line-height: 1.3;
}

.scr-processing .scr-processing__line {
  display: flex;
  gap: 6px;
  visibility: hidden;
}

.scr-processing .scr-processing__line.is-shown {
  visibility: visible;
}

.scr-processing .scr-processing__mark {
  flex: none;
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  line-height: 1.6;
  color: var(--lav-d);
}

.scr-processing .scr-processing__text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.scr-processing .is-closer .scr-processing__text {
  padding: 0 4px;
  font-weight: 700;
  background: var(--pink);
  box-shadow: 3px 3px 0 0 var(--ink);
}

.scr-processing .scr-processing__tag {
  display: inline-block;
  padding: 0 5px;
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  line-height: 1.45;
  text-transform: uppercase;
  white-space: nowrap;
  vertical-align: 1px;
  background: var(--yellow);
  border: 2px solid var(--ink);
  visibility: hidden;
}

.scr-processing .scr-processing__tag.is-ok {
  background: var(--mint);
}

.scr-processing .scr-processing__tag.is-shown {
  visibility: visible;
  animation: pop-in var(--t-fast) steps(3) both;
}

.scr-processing .scr-processing__cursor {
  display: inline-block;
  width: 9px;
  height: 15px;
  margin-left: 4px;
  vertical-align: -2px;
  background: var(--ink);
  animation: blink calc(700ms / var(--speed)) steps(1) infinite;
}

.scr-processing .scr-processing__bar .loadbar__seg {
  height: 18px;
}

.scr-processing .scr-processing__win.is-done .loadbar__seg.is-on {
  background: var(--mint);
}

.scr-processing .scr-processing__foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  line-height: 1.2;
  text-transform: uppercase;
}

.scr-processing .scr-processing__win.is-done .scr-processing__state {
  padding: 0 4px;
  background: var(--mint);
}

/* "Tik om over te slaan" under the bar (hidden but kept in place once the log is done) */
.scr-processing .scr-processing__skip {
  margin: 6px 0 0;
  font-size: var(--fs-xs);
  text-align: center;
  opacity: 0.7;
}
