/* ─── Action color classes (referenced by event rows) ─── */
.CREATE {
  color: var(--create);
}
.EDIT {
  color: var(--edit);
}
.DELETE {
  color: var(--delete);
}
.BASH {
  color: var(--bash);
}
.STOP {
  color: var(--stop);
}
.PROMPT {
  color: var(--prompt);
}
.BATCH {
  color: var(--batch);
}
.SESSION {
  color: var(--session);
}
.AGENT {
  color: var(--agent);
}
.TASK {
  color: var(--task);
}
.NOTIFY {
  color: var(--notify);
}
.PERMISSION {
  color: var(--permission);
}
.FILE {
  color: var(--file);
}
.CONFIG {
  color: var(--config);
}
.WORKTREE {
  color: var(--worktree);
}
.COMPACT {
  color: var(--compact);
}
.CWD {
  color: var(--cwd);
}
.INSTRUCT {
  color: var(--instruct);
}
.DISPLAY {
  color: var(--display);
}
.ELICIT {
  color: var(--elicit);
}

mark {
  background: rgba(139, 92, 246, 0.25);
  color: #fff;
}

/* ─── Hook event badge colors ─── */
.hook {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 600;
  margin-top: 1px;
  margin-right: 6px;
  margin-left: 2px;
  border: 1px solid transparent;
  flex-shrink: 0;
}
.hook-SessionStart {
  color: #7ee7ff;
  border-color: rgba(126, 231, 255, 0.35);
  background: rgba(126, 231, 255, 0.08);
}
.hook-PreToolUse {
  color: #cfa7ff;
  border-color: rgba(207, 167, 255, 0.35);
  background: rgba(207, 167, 255, 0.08);
}
.hook-PermissionRequest {
  color: #ffcc7e;
  border-color: rgba(255, 204, 126, 0.35);
  background: rgba(255, 204, 126, 0.08);
}
.hook-PostToolUse {
  color: #7effa5;
  border-color: rgba(126, 255, 165, 0.35);
  background: rgba(126, 255, 165, 0.08);
}
.hook-PreCompact {
  color: #ffd479;
  border-color: rgba(255, 212, 121, 0.35);
  background: rgba(255, 212, 121, 0.08);
}
.hook-PostCompact {
  color: #9fffa0;
  border-color: rgba(159, 255, 160, 0.35);
  background: rgba(159, 255, 160, 0.08);
}
.hook-UserPromptSubmit {
  color: #ff8e8e;
  border-color: rgba(255, 142, 142, 0.35);
  background: rgba(255, 142, 142, 0.08);
}
.hook-Stop {
  color: #9d9d9d;
  border-color: rgba(157, 157, 157, 0.35);
  background: rgba(157, 157, 157, 0.08);
}
.hook-MessageDisplay {
  color: #e2c4ff;
  border-color: rgba(226, 196, 255, 0.35);
  background: rgba(226, 196, 255, 0.08);
}
.hook-Elicitation {
  color: #ff9f6b;
  border-color: rgba(255, 159, 107, 0.35);
  background: rgba(255, 159, 107, 0.08);
}
.hook-ElicitationResult {
  color: #ffc78a;
  border-color: rgba(255, 199, 138, 0.35);
  background: rgba(255, 199, 138, 0.08);
}

/* ─── Event model badge ─── */
.event-model {
  display: inline-flex;
  align-items: center;
  margin-right: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 600;
  color: #8bc5ff;
  border: 1px solid rgba(139, 197, 255, 0.32);
  background: rgba(139, 197, 255, 0.08);
  vertical-align: middle;
}

/* ─── Agent logo badges ─── */
.agent-badge {
  font-size: 0.66rem;
  font-weight: 600;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  vertical-align: middle;
}
.agent-badge svg,
.agent-badge img {
  flex-shrink: 0;
  display: block;
}

/* ─── Usage token badges ─── */
.usage-summary {
  display: inline-flex;
  gap: 4px;
  margin-right: 10px;
  align-items: center;
}
.usage-item {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.usage-in {
  color: #7eb8ff;
  border-color: rgba(126, 184, 255, 0.3);
  background: rgba(126, 184, 255, 0.07);
}
.usage-out {
  color: #c9a0ff;
  border-color: rgba(201, 160, 255, 0.3);
  background: rgba(201, 160, 255, 0.07);
}
.usage-cache {
  color: #ffd97e;
  border-color: rgba(255, 217, 126, 0.3);
  background: rgba(255, 217, 126, 0.07);
}
.usage-cache-write {
  color: #ffb347;
  border-color: rgba(255, 179, 71, 0.3);
  background: rgba(255, 179, 71, 0.07);
}
.usage-turns {
  color: #888;
  border-color: rgba(136, 136, 136, 0.3);
  background: rgba(136, 136, 136, 0.07);
}

/* ─── Diff viewer ─── */
.eblock-diff {
  padding: 0 !important;
  overflow: hidden;
}
.eblock-diff strong {
  display: block;
  padding: 6px 12px;
  font-size: 0.7rem;
  text-transform: none;
  color: #aaa;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.diff-block {
  font-size: 0.74rem;
  font-family: inherit;
  max-height: 400px;
  overflow-y: auto;
}
.diff-line {
  display: flex;
  gap: 0;
  line-height: 1.5;
}
.diff-ln {
  flex-shrink: 0;
  width: 36px;
  text-align: right;
  padding-right: 8px;
  opacity: 0.4;
  user-select: none;
  font-size: 0.7rem;
}
.diff-marker {
  flex-shrink: 0;
  width: 18px;
  text-align: center;
  font-weight: bold;
  user-select: none;
}
.diff-content {
  flex: 1;
  padding: 0 8px;
  white-space: pre-wrap;
  word-break: break-all;
}
.diff-ctx {
  color: #666;
}
.diff-ctx .diff-ln {
  opacity: 0.3;
}
.diff-removed {
  background: rgba(255, 80, 80, 0.12);
  color: #ff8080;
}
.diff-removed .diff-marker {
  color: #ff5555;
  background: rgba(255, 80, 80, 0.18);
}
.diff-added {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
}
.diff-added .diff-marker {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.18);
}

/* ─── Floating tooltip ─── */
.floating-tip {
  position: fixed;
  background: #1a1a1a;
  color: #ccc;
  border: 1px solid #444;
  padding: 7px 11px;
  border-radius: 6px;
  font-size: 0.7rem;
  line-height: 1.6;
  max-width: 260px;
  pointer-events: none;
  z-index: 9999;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-thumb {
  background: #333;
}

/* ─── Stop response markdown ─── */
.stop-md {
  font-size: 0.78rem;
  line-height: 1.65;
  color: #c9d1d9;
}
.stop-md p {
  margin: 0 0 0.6em;
}
.stop-md p:last-child {
  margin-bottom: 0;
}
.stop-md h1,
.stop-md h2,
.stop-md h3,
.stop-md h4 {
  color: #e2e8f0;
  font-weight: 700;
  margin: 0.9em 0 0.4em;
  line-height: 1.3;
}
.stop-md h1 {
  font-size: 1em;
}
.stop-md h2 {
  font-size: 0.92em;
}
.stop-md h3 {
  font-size: 0.85em;
}
.stop-md h4 {
  font-size: 0.8em;
  color: #aaa;
}
.stop-md strong {
  color: #e2e8f0;
  font-weight: 600;
}
.stop-md em {
  color: #a0a0a0;
  font-style: italic;
}
.stop-md ul,
.stop-md ol {
  margin: 0 0 0.6em 1.2em;
  padding: 0;
}
.stop-md li {
  margin-bottom: 0.2em;
}
.stop-md code {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  padding: 0.1em 0.35em;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88em;
  color: #79c0ff;
}
.stop-md pre {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 5px;
  padding: 0.7em 1em;
  overflow-x: auto;
  margin: 0.5em 0;
}
.stop-md pre code {
  background: none;
  border: none;
  padding: 0;
  color: #a0a0a0;
  font-size: 0.82em;
}
.stop-md blockquote {
  border-left: 3px solid #444;
  margin: 0.5em 0;
  padding: 0.2em 0.8em;
  color: #888;
}
.stop-md a {
  color: #58a6ff;
  text-decoration: underline;
}
.stop-md hr {
  border: none;
  border-top: 1px solid #333;
  margin: 0.8em 0;
}
