/* Right-hand panel (test results + stdout) and the success toast. */

#results-panel {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--bg);
  overflow: hidden;
}

/* "PASSED" rubber stamp: thumps down, holds, fades */
.pass-stamp {
  position: absolute; top: 34%; left: 50%; z-index: 5;
  padding: 4px 18px;
  font-family: var(--font-display); font-size: 46px; font-weight: 600; font-style: italic;
  text-transform: uppercase; letter-spacing: .04em;
  color: var(--done);
  border: 5px double var(--done); border-radius: 8px;
  opacity: 0; pointer-events: none;
  transform: translate(-50%, -50%) rotate(-12deg);
}
.pass-stamp.show { animation: stamp 2.8s cubic-bezier(.2, 1.3, .4, 1) forwards; }
@keyframes stamp {
  0%   { opacity: 0;  transform: translate(-50%, -50%) rotate(-12deg) scale(2.2); }
  14%  { opacity: .92; transform: translate(-50%, -50%) rotate(-12deg) scale(.94); }
  20%  { transform: translate(-50%, -50%) rotate(-12deg) scale(1); }
  78%  { opacity: .92; }
  100% { opacity: 0;  transform: translate(-50%, -50%) rotate(-12deg) scale(1); }
}

.results-half { flex: 1; display: flex; flex-direction: column; overflow: hidden; padding: 16px; }
.results-half + .results-half { border-top: 1px solid var(--border); background: var(--sunken); }

.results-label {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .12em; color: var(--accent);
}
.results-label i { margin-right: 6px; }
.results-label .text-btn { font-size: 11px; text-transform: none; letter-spacing: 0; }

/* ── Tests: a checklist ── */
#test-summary { font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: .04em; }
#test-summary.all-passed { color: var(--done); }
#test-summary.some-failed { color: var(--danger); }
#test-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 2px 4px 4px 2px; }

.test-item {
  padding: 9px 12px; border-radius: 4px;
  font-family: var(--font-mono); font-size: 11.5px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  transition: border-color .2s, background .2s;
}
.test-item.passed { border-color: var(--done); background: var(--done-soft); }
.test-item.failed { border-color: var(--danger); background: var(--danger-soft); box-shadow: 2px 2px 0 var(--danger); }

.test-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.test-label { color: var(--body-text); }
.test-label i { margin-right: 5px; }
.test-item.passed .test-label, .test-item.passed .test-status { color: var(--done); }
.test-item.failed .test-label, .test-item.failed .test-status { color: var(--danger); }
.test-status { font-size: 10.5px; font-weight: 600; color: var(--muted); }

.test-diff {
  margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border);
  font-size: 11px; display: flex; flex-direction: column; gap: 3px; color: var(--body-text);
}
.test-diff .exp { color: var(--done); font-weight: 500; }
.test-diff .got { color: var(--danger); font-weight: 500; }

/* ── Console ── */
#console-out { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; }
.con-line { font-size: 12.5px; font-family: var(--font-mono); white-space: pre-wrap; line-height: 1.6; }
.con-line.out { color: var(--text); }
.con-line.err { color: var(--danger); }
.con-placeholder { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }

/* ── Toast: an ink stamp ── */
#toast {
  position: fixed; bottom: 28px; left: 50%; z-index: 200;
  transform: translateX(-50%) translateY(90px);
  display: flex; align-items: center; gap: 10px;
  padding: 12px 20px; border-radius: var(--radius);
  font-size: 15px; font-weight: 600;
  color: var(--on-ink); background: var(--ink);
  box-shadow: 5px 5px 0 var(--done);
  transition: transform .4s cubic-bezier(.3, 1.4, .5, 1), opacity .3s;
  opacity: 0; pointer-events: none;
}
#toast i { color: var(--marker); }
#toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

@media (max-width: 960px) {
  #results-panel { max-height: 260px; }
}
