/* The sandbox harness. A prototype of screen 05's right column.
   The harness itself is built only in a debug build; these three kilobytes of
   styles travel into the release as well — trunk has no conditional includes,
   and setting up a second way to include stylesheets costs more than their
   weight. */

.harness {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 24px 24px;
}

.harness__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.harness__input {
  background: var(--sunken);
  border: 1px solid var(--border);
  border-radius: var(--r-ui);
  color: var(--text-dim);
  font-size: 13px;
  padding: 9px 12px;
  width: 180px;
}

.harness__error {
  margin: 0;
  font-size: 13px;
  color: var(--danger-fg);
  background: var(--danger-bg);
  border-radius: var(--r-ui);
  padding: 10px 12px;
}

.harness__body {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--gap);
  align-items: start;
}

/* ── stage ───────────────────────────────────────────────────────────────── */

.stage {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

/* The caption must stay visible at all times: a disk is free to draw anything
   inside, including a copy of the diskroom interface. */
.stage__label {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--muted-3);
}

.stage__box {
  position: relative;
  height: 520px;
  background: var(--sunken);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-panel);
  overflow: hidden;
}

.stage__mount,
.diskframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ── right column ────────────────────────────────────────────────────────── */

.sidepanel {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  min-width: 0;
}

.counters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.counter {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--sunken);
  border: 1px solid var(--border);
  border-radius: var(--r-ui);
  padding: 10px 12px;
}

.counter__value {
  font-size: 20px;
  color: var(--text-dim);
}

.counter__label {
  font-size: 11px;
  line-height: 1.3;
  color: var(--muted-3);
}

.violations {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 140px;
  overflow-y: auto;
}

.violations__row {
  display: flex;
  gap: 8px;
  font-size: 10px;
  background: var(--danger-bg);
  color: var(--danger-fg);
  border-radius: var(--r-chip);
  padding: 5px 8px;
}

.violations__directive {
  flex: 0 0 auto;
  opacity: 0.8;
}

.violations__uri {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.console {
  display: flex;
  flex-direction: column;
  background: var(--sunken);
  border: 1px solid var(--border);
  border-radius: var(--r-panel);
  overflow: hidden;
}

.console__head {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--muted-3);
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.console__body {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.55;
  padding: 8px 12px;
  height: 320px;
  overflow-y: auto;
  color: var(--muted);
}

.console__line {
  white-space: pre-wrap;
  word-break: break-word;
}

.console__line--warn {
  color: var(--warn-fg);
}

.console__line--error {
  color: var(--danger-fg);
}

@media (max-width: 760px) {
  .harness__body {
    grid-template-columns: 1fr;
  }

  .stage__box {
    height: 380px;
  }
}
