/* Override sources modals: a component's sources modal and a kit's push-down
   modal (ai_reference/override_pushdown.md → "UI"). Built on the sibling
   override modal family in override_siblings.css (.ovs-*: overlay, head, body,
   table, foot); this file adds only what those two read+remove views need.
   Design-system tokens only; no inline styles (css_hygiene ratchet). */

/* Entry link (views/override_sources/_link) and in-modal swap links. */
.ovsrc-link {
  color: var(--blue, #3b82f6); text-decoration: none; font-weight: 500; cursor: pointer;
}
.ovsrc-link:hover { text-decoration: underline; }
.ovsrc-link--small { display: inline-block; font-size: 11px; margin-top: 2px; }

/* The two read views carry 6 or 7 columns; the sibling table's 900px floor
   would force a horizontal scroll on the --xwide panel's narrower viewports. */
table.ovs-table.ovsrc-table { min-width: 760px; }
.ovs-table.ovsrc-table tbody td { vertical-align: top; }

.ovsrc-intro {
  font-size: 12px; color: var(--muted, #6b6b6b); line-height: 1.5;
  margin: 0 2px 12px;
}

/* Secondary line under a cell's main value (product name, set-at time). */
.ovsrc-sub { font-size: 10.5px; color: var(--muted, #6b6b6b); margin-top: 1px; }
.ovsrc-truncate { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ovsrc-muted { color: var(--muted, #6b6b6b); font-weight: 400; }

.ovsrc-kit-link { color: var(--ink, #1a1a1a); text-decoration: none; }
.ovsrc-kit-link:hover { color: var(--blue, #3b82f6); text-decoration: underline; }

/* A note can be a sentence; let it wrap instead of widening the table. */
.ovsrc-table td.ovsrc-note { white-space: normal; max-width: 220px; color: var(--muted, #6b6b6b); }

.ovsrc-pct { font-weight: 700; }
.ovsrc-edited {
  font-family: inherit; font-size: 10px; font-weight: 600;
  color: var(--amber, #d97706); margin-top: 2px;
}

/* Kit push-down: header summary line + latest-batch line. */
.ovsrc-summary { flex-wrap: wrap; }
.ovsrc-batch { font-size: 12px; color: var(--muted, #6b6b6b); }
.ovsrc-batch b { color: var(--ink, #1a1a1a); font-weight: 600; }

/* Status chip. Past rows (expired / removed) are greyed by .ovs-row-muted. */
.ovsrc-status {
  display: inline-block; font-size: 10px; font-weight: 700; border-radius: 4px;
  padding: 2px 7px; letter-spacing: 0.2px;
}
.ovsrc-status--live { color: var(--green, #16a34a); background: var(--tint-success-bg, #dcfce7); }
.ovsrc-status--past { color: var(--muted, #6b6b6b); background: var(--border-light, #f0eeea); }
tr.ovsrc-row-past .ovsrc-kit-link { color: var(--light, #8a8a8a); }

/* Remove / Revoke buttons. button_to wraps each in a form; keep it inline. */
.ovsrc-remove-form { display: inline-block; margin: 0; }
.ovsrc-remove {
  font-family: inherit; font-size: 11px; font-weight: 600; white-space: nowrap;
  padding: 4px 10px; border-radius: 6px; cursor: pointer;
  color: var(--red, #dc2626); background: var(--surface, #fff);
  border: 1px solid var(--border-hover, #d4d2cd);
}
.ovsrc-remove:hover { border-color: var(--red, #dc2626); background: var(--tint-danger-bg, #fef2f2); }
.ovsrc-revoke {
  font-family: inherit; font-size: 12px; font-weight: 600; white-space: nowrap;
  padding: 6px 14px; border-radius: 6px; cursor: pointer;
  color: var(--red, #dc2626); background: var(--surface, #fff);
  border: 1px solid var(--red, #dc2626);
}
.ovsrc-revoke:hover { background: var(--tint-danger-bg, #fef2f2); }

/* Footer total + clip disclosure. */
.ovsrc-total { font-size: 13px; color: var(--ink, #1a1a1a); }
.ovsrc-total-val { font-family: 'JetBrains Mono', monospace; font-weight: 700; margin-left: 4px; }
.ovsrc-clip { display: block; font-size: 11px; color: var(--amber, #d97706); font-weight: 600; margin-top: 2px; }

/* Loading / error shell the Stimulus controller renders. */
.ovsrc-message { max-width: 480px; }
.ovsrc-message-text { margin: 0 0 14px; font-size: 13px; color: var(--muted, #6b6b6b); }

/* Visually hidden column header text (screen readers only). */
.ovsrc-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
