/*
 * Compliance tab — the anomaly feed's detector colours.
 *
 * COPIED from the inline <style> block in
 * views/person/_sections/_anomalyFeedCard.php. It lives in a stylesheet here
 * rather than inline because PHP has a reason Go does not: a person section
 * re-renders over AJAX on every tab switch there, so an inline block
 * re-executes with the fresh markup. A Go tab is its own page load.
 *
 * The colours are the point, not decoration: an analyst scanning a long feed
 * matches a chip against the score column, and six detectors in one grey are
 * six detectors nobody can tell apart.
 */

.person-anomaly-feed .vp-method-conditional_baseline { background: #fff3cd; color: #664d03; }
.person-anomaly-feed .vp-method-embedding_distance   { background: #cfe2ff; color: #084298; }
.person-anomaly-feed .vp-method-temporal_hawkes      { background: #f8d7da; color: #842029; }
.person-anomaly-feed .vp-method-missed_routine       { background: #f8d7da; color: #842029; }
.person-anomaly-feed .vp-method-duration_outlier     { background: #e2d9f3; color: #432874; }
.person-anomaly-feed .vp-method-sequence_break       { background: #ffe5d0; color: #653208; }
.person-anomaly-feed .vp-method-first_seen           { background: #d1e7dd; color: #0f5132; }

/* Dark theme. !important on the ink because the chips are anchors and the
   dark theme paints every anchor link-blue with !important
   (chronos-ui-overrides) — without it all six read in one blue. PHP omits an override for temporal_hawkes; that gap is
   reproduced rather than filled, because inventing a colour here would make
   the two tiers disagree about a detector's identity. */
[data-bs-theme="dark"] .person-anomaly-feed .vp-method-conditional_baseline { background: rgba(255, 193, 7, .22); color: #ffe69c !important; }
[data-bs-theme="dark"] .person-anomaly-feed .vp-method-embedding_distance   { background: rgba(13, 110, 253, .25); color: #9ec5fe !important; }
[data-bs-theme="dark"] .person-anomaly-feed .vp-method-missed_routine       { background: rgba(220, 53, 69, .25); color: #f1aeb5 !important; }
[data-bs-theme="dark"] .person-anomaly-feed .vp-method-duration_outlier     { background: rgba(111, 66, 193, .25); color: #c5b3e6 !important; }
[data-bs-theme="dark"] .person-anomaly-feed .vp-method-sequence_break       { background: rgba(253, 126, 20, .25); color: #fecba1 !important; }
[data-bs-theme="dark"] .person-anomaly-feed .vp-method-first_seen           { background: rgba(25, 135, 84, .25); color: #a3cfbb !important; }

/* An UNSELECTED chip is dimmed rather than hidden, so the palette stays
   readable as a legend even while filtering. */
.person-anomaly-feed .pa-method-toggle        { cursor: pointer; user-select: none; }
/* Dimmed = hollow: the fill goes, the ink stays, so the label keeps its
   contrast (at 45% opacity every chip read under 2.2:1). */
.person-anomaly-feed .pa-method-toggle:not(.active) { background: transparent !important; box-shadow: inset 0 0 0 1px currentColor; }
.person-anomaly-feed .pa-method-toggle.active { outline: 2px solid var(--bs-secondary-color); outline-offset: 1px; }

/* The feed can run to fifty rows; it scrolls inside the card rather than
   pushing the rest of the tab off-screen. */
.person-anomaly-feed .pa-table-wrap { max-height: 560px; overflow: auto; }

/* A pending row is marked on its leading edge — logical, not left, so it
   lands correctly in RTL. */
.person-anomaly-feed tr.pa-pending { border-inline-start: 3px solid var(--bs-danger); }
