/* Terminal-Fenster - Design-System Anhang C (exakt) */
.nbt {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  background: #0d1117;
  border: 1px solid var(--line-bright);
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--text);
  cursor: text;
  overflow: hidden;
  transition: border-color 0.2s;
}
.nbt:focus-within { border-color: rgba(255, 180, 84, 0.55); }

.nbt__bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  cursor: default;
}
.nbt__dot { width: 11px; height: 11px; border-radius: 50%; }
.nbt__dot--r { background: #f26d78; }
.nbt__dot--y { background: var(--amber); }
.nbt__dot--g { background: var(--green); }
.nbt__title { margin-left: 10px; font-size: 0.72rem; color: var(--muted); flex: 1; }
.nbt__skip {
  font: inherit;
  font-size: 0.7rem;
  color: var(--muted);
  background: none;
  border: 1px solid var(--line-bright);
  border-radius: 999px;
  padding: 1px 10px;
  cursor: pointer;
}
.nbt__skip:hover { color: var(--amber); border-color: var(--amber); }
.nbt__skip[hidden] { display: none; }

/* feste Höhe: verhindert, dass die Hero-Zeile beim Tippen wächst und die Seite springt */
.nbt__screen {
  height: 300px;
  overflow-y: auto;
  padding: 14px 18px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-bright) transparent;
}

.nbt__row { white-space: pre-wrap; word-break: break-word; }
.nbt__live[hidden] { display: none; }
.nbt__row--out { color: var(--muted); }
.nbt__row--cmd { color: var(--text-bright); }
.nbt__row--ok { color: var(--green); }
.nbt__row--err { color: var(--red); }
.nbt__row--hint { color: #566179; font-style: italic; }
.nbt__row--goto { color: var(--cyan); }
.nbt__row a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.nbt__row a:hover { color: var(--amber); }

.nbt-g { color: var(--green); }
.nbt-m { color: var(--muted); }
.nbt-c { color: var(--cyan); }
.nbt__dir { color: var(--cyan); }
.nbt__file { color: var(--text); }

/* Live-Zeile: Text mit echtem Cursor an der Schreibposition */
.nbt__before, .nbt__after, .nbt__typed { color: var(--text-bright); }
.nbt__ghost { color: #44506a; }
.nbt__caret {
  background: var(--amber);
  color: #10141c;
  animation: nbt-blink 1.05s steps(1) infinite;
}
.nbt:not(.nbt--focus) .nbt__live .nbt__caret {
  background: transparent;
  color: inherit;
  outline: 1px solid var(--muted);
  outline-offset: -1px;
  animation: none;
}
@keyframes nbt-blink { 50% { background: transparent; color: inherit; } }

/* verstecktes Eingabefeld; 16px, damit iOS beim Antippen nicht hineinzoomt */
.nbt__input {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  opacity: 0;
  font-size: 16px;
}
.nbt__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* antippbare Befehle: nur auf Touch-Geräten */
.nbt__chips {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px 12px;
  border-top: 1px solid var(--line);
}
@media (hover: none), (pointer: coarse) { .nbt__chips { display: flex; } }
.nbt__chip {
  font: inherit;
  font-size: 0.78rem;
  color: var(--text);
  background: none;
  border: 1px solid var(--line-bright);
  border-radius: 999px;
  padding: 4px 13px;
  cursor: pointer;
}
.nbt__chip:active { color: var(--amber); border-color: var(--amber); }
.nbt__chip--ctl { color: var(--muted); }

@media (max-width: 920px) { .nbt__screen { height: 250px; } }
@media (prefers-reduced-motion: reduce) { .nbt__caret { animation: none; } }
