/*
 * action-cards.css — shared styles for the action row/card family
 * (NextActionLine, UnifiedActionCard, WeeklyReviewActionCard — and any other
 * surface rendering the .action-title-row / .action-chip structure, such as
 * ActionTable's priority chips).
 *
 * Linked in Components/App.razor AFTER MudBlazor.min.css (before mobile.css).
 * Component-specific rules and per-component deltas (root card look, title
 * wrap vs truncate) stay in the scoped .razor.css files — their scoped
 * selectors outrank these plain (0,1,0) rules.
 *
 * Do NOT add .action-title rules here: the cards truncate their titles while
 * NextActionLine wraps them; the shared layer must not pick a winner.
 */

/* --- structural rows (authored divs in each component) --- */

.action-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 32px;
    margin-bottom: 8px;
}

.action-left-section {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-grow: 1;
    min-width: 0;
}

.action-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.action-chips-row {
    min-height: 24px;
    display: flex;
    align-items: center;
}

.chips-spacer {
    flex-grow: 1;
}

/* --- child-component output (MudChip/MudText/MudIconButton/MudStack) --- */

.priority-item {
    background-color: var(--mud-palette-warning-light);
    border-left: 3px solid var(--mud-palette-warning);
}

.priority-chip {
    animation: action-pulse 2s infinite;
}

.priority-badge {
    background-color: var(--mud-palette-warning) !important;
    color: var(--mud-palette-warning-contrast-text) !important;
    font-weight: 600;
    animation: action-pulse 2s infinite;
}

.time-ago {
    color: var(--mud-palette-text-secondary);
    font-size: 0.75rem;
    white-space: nowrap;
}

.chips-container {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

/* Own class + both MudBlazor size classes: (0,3,0) beats
   .mud-chip.mud-chip-size-small (0,2,0) without !important. */
.action-chip.mud-chip.mud-chip-size-small {
    height: 24px;
    font-size: 0.75rem;
    font-weight: 500;
}

.action-menu {
    color: var(--mud-palette-action-default);
}

/* Named action-pulse (not pulse) so it cannot collide with the global
   @keyframes pulse in enhanced-tree.css (tree drop-target). */
@keyframes action-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* --- mobile density --- */

@media (max-width: 599px) {
    .action-title-row {
        gap: 8px;
    }

    .action-chip.mud-chip.mud-chip-size-small {
        font-size: 0.7rem;
        height: 22px;
    }

    .time-ago {
        font-size: 0.7rem;
    }
}
