/* TICKET EVIDENCE · styling for the grouped ticket accordions.
   Owner: components/canonical/ticket-evidence.js. Tokens only - no literal colours,
   no literal spacing. Loaded by Discovery and by any page mounting the subscriber panel. */

.te-list { display: flex; flex-direction: column; gap: var(--space-xs); }

.te-item {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
}
.te-item + .te-item { margin-top: 0; }

.te-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  cursor: pointer;
  list-style: none;
  /* no-blink: the row tints, it does not move and nothing under it reflows */
  transition: background var(--duration-fast) var(--ease);
}
.te-row::-webkit-details-marker { display: none; }
.te-row:hover { background: var(--surface-raised); }
.te-item > .te-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.te-caret {
  color: var(--text-tertiary);
  font-size: var(--text-2xs);
  flex-shrink: 0;
  transition: transform var(--duration-fast) var(--ease);
}
.te-item[open] > .te-row > .te-caret { transform: rotate(90deg); }

.te-title {
  font-size: var(--text-sm);
  color: var(--text);
  font-weight: 600;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.te-count {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  background: var(--accent-bg);
  color: var(--accent);
  border-radius: var(--radius-pill);
  padding: 1px 9px;
  flex-shrink: 0;
}

.te-chips { display: inline-flex; gap: 4px; flex-wrap: wrap; flex-shrink: 0; }
.te-chip {
  display: inline-block;
  border-radius: var(--radius-pill);
  padding: 1px 8px;
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  color: var(--text-secondary);
  white-space: nowrap;
}
.te-chip-open { color: var(--warn); }
.te-chip-pending { color: var(--info); }
.te-chip-ok,
.te-chip-closed { color: var(--ok); }

.te-when {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  color: var(--text-tertiary);
  flex-shrink: 0;
  white-space: nowrap;
}

.te-body {
  padding: 0 var(--space-md) var(--space-md) calc(var(--space-md) + 1.1rem);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-sm);
}
.te-sum { margin: 0; font-size: var(--text-sm); color: var(--text-secondary); line-height: 1.55; }
.te-sum-none { color: var(--text-tertiary); font-style: italic; }
.te-meta {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  color: var(--text-tertiary);
  line-height: 1.6;
}
.te-open {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--duration-fast) var(--ease);
}
.te-open:hover { border-bottom-color: var(--accent); }
.te-open:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

.te-nest {
  padding: var(--space-xs) var(--space-sm) var(--space-sm) calc(var(--space-md) + 1.1rem);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  border-top: 1px solid var(--border-subtle);
}
.te-nest .te-item { background: var(--bg); }

.te-note {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  line-height: 1.55;
  margin: 0 0 var(--space-xs);
}

@media (max-width: 640px) {
  .te-row { flex-wrap: wrap; }
  .te-title { flex-basis: 100%; white-space: normal; }
}

/* DISCLOSURE DEPTH TWO (2026-08-29). The nested accordion this used to draw is
   gone; a repeat group's instances are LINKS now, which is one level, not two
   more. .te-nest is retired with it. */
.te-instances{display:flex;flex-wrap:wrap;gap:6px;margin-top:var(--space-sm)}
.te-instance{
  font-family:var(--font-mono);font-size:var(--text-2xs,.65rem);text-decoration:none;
  padding:3px 8px;border-radius:var(--radius-pill,999px);
  border:1px solid var(--border);background:var(--surface-raised);color:var(--text-secondary)
}
.te-instance:hover{border-color:var(--accent);color:var(--accent)}
