/* The aniTa signals wherever a page lists them: the «Insights» of the aniTa flyout (AniTaInsightsPanel), the
   popover of a row mark (AniTaSignalPopover, through AniTaSignalList) and the actions of one case
   (AniTaSignalActions). Shared here, and not in a scoped stylesheet, because the lines and the actions are
   rendered by different components: a scoped rule reaches only its own component's elements. A section
   title per kind, then one block per signal; a signal new for the user carries a purple line on its left.
   Predictions use their own teal so they never read as a severity. */

.anita-signals-section {
    padding: 8px 12px 3px;
    color: #6b7c93;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.anita-signals-section.prediction {
    color: #0e7490;
}

.anita-signal {
    padding: 7px 12px 8px;
}

.anita-signal + .anita-signal {
    border-top: 1px solid #dbe3ee;
}

.anita-signal.new {
    box-shadow: inset 3px 0 0 #6d28d9;
}

.anita-signal-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 6px;
}

/* The title takes the room left on the severity's line, so a long title wraps beside it instead of
   leaving the severity alone on a line. */
.anita-signal-line strong {
    flex: 1 1 0;
    min-width: 0;
    font-weight: 600;
}

.anita-signal-sev {
    flex-shrink: 0;
    padding: 1px 7px;
    border-radius: 9px;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.anita-signal-sev.critical { color: #b42318; background: #fdecea; }
.anita-signal-sev.high { color: #c2410c; background: #fff1e6; }
.anita-signal-sev.medium { color: #a16207; background: #fef6e0; }
.anita-signal-sev.low { color: #4b5d73; background: #eef2f7; }
.anita-signal-sev.none { color: #4b5d73; background: #f4f6f9; }

.anita-signal-prob {
    flex-shrink: 0;
    color: #0e7490;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.anita-signal-tag {
    color: #6d28d9;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
}

.anita-signal-meta {
    margin-top: 1px;
    color: #6b7c93;
    font-size: 0.74rem;
}

.anita-signal-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
}

.anita-signal-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    color: #1f2d3d;
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
}

.anita-signal-btn:hover {
    background: #eef3f9;
}

.anita-signal-btn:disabled {
    opacity: 0.6;
}

.anita-signal-btn.primary {
    color: #fff;
    background: #0a43e8;
    border-color: #0a43e8;
}

.anita-signal-btn.primary:hover {
    background: #0634ba;
}

.anita-signal-btn.ai {
    color: #6d28d9;
    border-color: #e6dcfc;
}

.anita-signal-state {
    padding: 1px 8px;
    color: #027a48;
    background: #ecfdf3;
    border-radius: 9px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* A grid cell that carries the row's mark before its value (the number of a load order). The gap keeps the
   purple ring of a new mark, drawn outside the circle, off the first digit. */
.anita-mark-cell {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
}

/* A list's «aniTa · só com casos N» toggle (AniTaListCasesToggle): aniTa's purple on the shared button, the
   count in a chip, and «Mostrar todas» beside it while the toggle is on. */
.anita-list-filter {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.anita-list-filter .jump-ui-button {
    color: #6d28d9;
    border-color: #e6dcfc;
}

.anita-list-filter.on .jump-ui-button--primary {
    color: #fff;
    background: #6d28d9;
    border-color: #6d28d9;
}

.anita-list-filter-count {
    margin-left: 2px;
    padding: 0 6px;
    color: #fff;
    background: #6d28d9;
    border-radius: 9px;
    font-size: 0.68rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.anita-list-filter.on .anita-list-filter-count {
    color: #6d28d9;
    background: #fff;
}

/* The cases of a record on the line beneath it (AniTaRecordCasesLine), in the detail row of a grid: one
   compact line per case, the actions right after its age. The detail cell is as wide as every column of the
   grid, wider than the box on screen, so the block is held to the grid's visible width (a container query on
   the grid) and stays in view while the user scrolls sideways (sticky, which needs the cell not to clip it);
   a line too long for that width wraps. A case new for the user keeps the purple line on its left. */
.dxbl-grid:has(.anita-record-cases) {
    container-type: inline-size;
}

.dxbl-grid .dxbl-grid-table > tbody > tr > td.jump-grid-detail-cell:has(.anita-record-cases) {
    overflow: visible;
}

.anita-record-cases {
    position: sticky;
    left: 8px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    box-sizing: border-box;
    padding-left: 20px;
    font-size: 0.78rem;
}

.dxbl-grid .anita-record-cases {
    width: calc(100cqw - 40px);
}

.anita-record-case {
    display: flex;
    flex-wrap: wrap;
    width: fit-content;
    max-width: 100%;
    align-items: center;
    gap: 6px;
    min-width: 0;
    padding: 2px 6px;
    background: #faf7ff;
    border-radius: 4px;
}

.anita-record-case.new {
    box-shadow: inset 3px 0 0 #6d28d9;
}

.anita-record-case-title {
    min-width: 0;
    overflow: hidden;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.anita-record-case-age {
    flex-shrink: 0;
    color: #6b7c93;
}

.anita-record-case .anita-signal-actions {
    flex-wrap: nowrap;
    margin: 0 0 0 6px;
}
