/* Source modal: tabbed body (General | Technical | Capture), the monitor /
   chain-status chips, and the notable list. Split out of dialogs.css so neither
   file exceeds the arch-lint size budget. Tokens are shared with dialogs.css. */

.modal-tabs {
  display: grid;
  gap: 12px;
}

.modal-tablist {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 1px solid var(--line);
}

.modal-tab {
  appearance: none;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 8px 10px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
  transition: color 0.12s ease, background-color 0.12s ease,
    box-shadow 0.12s ease;
}

.modal-tab:hover {
  color: var(--text);
}

.modal-tab[aria-selected="true"] {
  color: var(--text);
  background: var(--surface-alt);
  box-shadow: inset 0 0 0 1px var(--focus);
}

.modal-tab:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.modal-tabpanel {
  display: grid;
  gap: 12px;
}

.modal-tabpanel[hidden] {
  display: none;
}

/* General tab: ONE neutral source-class chip (how this monitor relates to the
   source). The chain's own status is a scoped "Chain status" row, colored by the
   shared classification tokens via .sd-chain-status-*. */
.sd-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sd-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Catalogued (not recovered): muted + dashed to signal "no recovered data". */
.sd-chip-rel-catalogued {
  border-style: dashed;
  opacity: 0.85;
}

/* The chain's own status, inline in the "Chain status" row (not a chip). */
.sd-chain-status-active {
  color: var(--canonical);
}

.sd-chain-status-zombie {
  color: var(--zombie);
}

.sd-chain-status-dormant {
  color: var(--near);
}

.sd-chain-status-dead {
  color: var(--stale);
}

.sd-status-detail {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.sd-notable {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.sd-notable li {
  color: var(--text);
  line-height: 1.5;
}

/* Inline `code` spans in the editorial prose (mono font comes from tokens.css). */
.modal-tabpanel code {
  background: var(--surface-alt);
  border-radius: 3px;
  padding: 0 4px;
  font-size: 0.92em;
}

/* Superscript citation markers, linking to the per-tab Sources list. */
.sd-cite {
  margin-left: 1px;
  line-height: 0;
}

.sd-cite a {
  color: var(--focus);
  font-weight: 700;
  text-decoration: none;
}

.sd-cite a:hover {
  text-decoration: underline;
}

/* Per-tab "Sources" list; <li value> shows each reference by its global id. */
.sd-sources {
  margin: 0;
  padding-left: 22px;
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}

.sd-sources li {
  line-height: 1.45;
}

.sd-sources a {
  color: var(--focus);
  text-decoration: none;
  word-break: break-word;
}

.sd-sources a:hover {
  text-decoration: underline;
}
