/* Lisp-REPL-Widget: editierbare Code-Blocks mit Run-Button.
   Wird auf Blog-Seiten eingebunden, wenn dort ```lispy-Code-Blocks vorkommen. */

.lisp-repl {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 8px;
  margin: 1rem 0;
  overflow: hidden;
  font-family: 'JetBrains Mono', 'Consolas', monospace;
}

.lisp-repl-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0.75rem;
  background: #1e293b;
  border-bottom: 1px solid #334155;
  font-size: 0.78rem;
  color: #94a3b8;
}

.lisp-repl-header .lisp-repl-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
}

.lisp-repl-header .lisp-repl-label::before {
  content: "λ";
  font-size: 1.1rem;
  color: #93c5fd;
  line-height: 1;
}

.lisp-repl-run {
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 5px;
  padding: 0.25rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.lisp-repl-run:hover:not(:disabled) {
  background: #1d4ed8;
}

.lisp-repl-run:disabled {
  background: #475569;
  cursor: not-allowed;
}

.lisp-repl-run .spin {
  display: inline-block;
  width: 0.7em;
  height: 0.7em;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: lispy-spin 0.8s linear infinite;
}

@keyframes lispy-spin {
  to { transform: rotate(360deg); }
}

.lisp-repl-input {
  width: 100%;
  background: #0f172a;
  color: #e2e8f0;
  border: none;
  outline: none;
  resize: vertical;
  padding: 0.7rem 0.85rem;
  font-family: inherit;
  font-size: 0.88rem;
  line-height: 1.45;
  min-height: 4em;
  white-space: pre;
  tab-size: 2;
}

.lisp-repl-output {
  border-top: 1px solid #1e293b;
  background: #050b18;
  color: #cbd5e1;
  padding: 0.6rem 0.85rem;
  font-size: 0.85rem;
  line-height: 1.45;
  white-space: pre-wrap;
  max-height: 320px;
  overflow-y: auto;
}

.lisp-repl-output:empty {
  display: none;
}

.lisp-repl-output.error {
  color: #fca5a5;
}

.lisp-repl-output .lisp-result {
  color: #86efac;
}

.lisp-repl-output .lisp-prompt {
  color: #64748b;
}
