/* ============================================================================
 * Utility classes — extracted from inline `style="..."` attributes in app.js
 *
 * Backstory: the SPA had ~491 inline-style attributes, most of which were the
 * same 10-12 patterns copy-pasted into hundreds of template literals. This
 * block captures the highest-frequency patterns so future code paths can use
 * a single class instead of re-typing the recipe.
 *
 * Top patterns extracted (occurrences in app.js at the time of the cleanup):
 *   22  color:inherit;text-decoration:none;                          → .table-link
 *   13  text-align:center;padding:20px;color:var(--text-secondary);  → .empty-cell-muted
 *   12  color:var(--text-muted);                                     → .text-muted
 *    9  text-align:center;padding:20px;                              → .empty-cell
 *    9  color:inherit;                                               → .text-inherit
 *    7  white-space:nowrap;                                          → .nowrap
 *    7  text-align:center;                                           → .text-center
 *    7  font-size:0.78rem;                                           → .text-sm
 *    6  text-align:center;padding:18px;color:var(--text-secondary);  → .empty-cell-sm
 *    6  padding:30px;text-align:center;color:var(--text-secondary);  → .empty-cell-lg
 *    6  font-size:0.7rem;                                            → .text-xs
 *    6  color:var(--text-muted,#888);                                → .text-muted
 *
 * Naming intentionally mirrors Tailwind (.text-muted, .text-center, .nowrap)
 * so it stays familiar even though we're not pulling in the framework. The
 * `.empty-cell-*` ladder fixes a paper cut where empty-state cells were
 * styled with 18 / 20 / 30 px padding in three different files for no
 * principled reason — `.empty-cell-muted` is the default; the small / large
 * variants are only kept because they appear that many times and removing
 * the variance would be a visual regression.
 * ========================================================================== */

.table-link {
    color: inherit;
    text-decoration: none;
}
.text-inherit { color: inherit; }
.text-muted { color: var(--text-muted, #888); }
.text-secondary { color: var(--text-secondary); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.nowrap { white-space: nowrap; }
.text-sm { font-size: 0.78rem; }
.text-xs { font-size: 0.7rem; }
/* Monospace + small font — combined into one class because the codebase used
 * the two declarations together every single time. */
.font-mono-sm {
    font-family: ui-monospace, monospace;
    font-size: 0.78rem;
}
.success-text { color: var(--success); }
.primary-light-text { color: var(--primary-light); }
.warning-text { color: var(--warning); }
.hidden { display: none; }
.va-top { vertical-align: top; }
.mt-1 { margin-top: 4px; }
/* `.num-cell` is paired with `.text-right` for numeric table cells —
 * extracted because right-align + bold is the standard recipe for the
 * "value" column in the project's stats tables. */
.num-cell { font-weight: 600; }

.empty-cell {
    text-align: center;
    padding: 20px;
}
.empty-cell-muted {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
}
.empty-cell-sm {
    text-align: center;
    padding: 18px;
    color: var(--text-secondary);
}
.empty-cell-lg {
    padding: 30px;
    text-align: center;
    color: var(--text-secondary);
}

/* Insights-tab workflow chip — a label/badge for the workflow name shown
 * next to investigation summaries. The accent colour is keyed off the
 * theme variable so dark/light modes pick up the right shade. */
.insights-wf-link {
    background: rgba(129, 140, 248, 0.18);
    color: var(--accent-light, #818cf8);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

/* Codex Analysis Card */
.codex-analysis-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(34, 211, 238, 0.04)) !important;
    border: 1px solid rgba(129, 140, 248, 0.4) !important;
    border-left: 3px solid var(--primary-light, #818cf8) !important;
    margin-bottom: 16px;
}

.codex-analysis-card .ai-insight-rootcause {
    font-style: normal;
    white-space: pre-wrap;
}

/* Markdown rendering inside Codex analysis */
.codex-analysis-card h3,
.codex-analysis-card h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 12px 0 6px 0;
}

.codex-analysis-card h5,
.codex-analysis-card h6 {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 10px 0 4px 0;
}

.codex-analysis-card ul,
.codex-analysis-card ol {
    margin: 8px 0;
    padding-left: 24px;
}

.codex-analysis-card li {
    margin: 4px 0;
    line-height: 1.5;
}

.codex-analysis-card code {
    background: rgba(255, 255, 255, 0.15);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.88em;
}

.codex-analysis-card pre {
    background: rgba(0, 0, 0, 0.2);
    padding: 12px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 8px 0;
}

.codex-analysis-card a {
    color: var(--primary-light, #818cf8);
    text-decoration: underline;
}

.codex-analysis-card a:hover {
    color: #a5b4fc;
}
