/**
 * Header terminal line (app shell + /albums term-top).
 * Pairs with components/site_header_terminal.html + site_header_typewriter.js
 */

.site-header .shell-terminal-tw,
.site-header__terminal-slot .shell-terminal-tw {
  width: 100%;
  min-width: 0;
}

.shell-terminal-tw.term-brand {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 0;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.site-header__terminal-slot .shell-terminal-tw.term-brand {
  font-family: inherit;
}

/* Buffer must NOT flex-grow: otherwise the cursor sticks to the viewport (row) right edge. */
.shell-terminal-tw .term-line__buffer {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
}

.shell-terminal-tw .term-line__buffer .term-arg {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shell-terminal-tw .term-prompt,
.shell-terminal-tw .term-cmd {
  flex-shrink: 0;
}

.shell-terminal-tw .term-prompt {
  color: var(--violet, var(--term-violet, #a78bfa));
  font-weight: 600;
  text-shadow: 0 0 12px rgba(167, 139, 250, 0.45);
}

.shell-terminal-tw .term-sp {
  white-space: pre;
  font-weight: 400;
  color: var(--muted);
  opacity: 0.65;
}

.shell-terminal-tw .term-cmd {
  color: var(--accent);
  font-weight: 600;
  text-shadow: var(--accent-glow);
}

.shell-terminal-tw .term-arg {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--pop);
  font-weight: 600;
  text-shadow: 0 0 14px rgba(255, 61, 172, 0.35);
}

.shell-terminal-tw .term-cursor {
  display: inline-block;
  flex-shrink: 0;
  flex-grow: 0;
  width: 6px;
  height: 1.1em;
  margin-left: 2px;
  background: var(--violet, var(--term-violet, #a78bfa));
  vertical-align: text-bottom;
  animation: terminal-cursor-uniform-blink 1s linear infinite;
}

/* Same rhythm as player secondary line: ~50% on / ~50% off (1s period). */
@keyframes terminal-cursor-uniform-blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shell-terminal-tw .term-cursor {
    animation: none;
    opacity: 1;
  }
}

.term-line .shell-terminal-tw {
  width: 100%;
  min-width: 0;
}
