/**
 * Chip overrides - MUST load last so we win over MudBlazor and Tailwind.
 * Fixes invisible text on filled chips (e.g. Service Desk Classification).
 * Root cause: base app.css .mud-chip sets background:surface on all chips;
 * filled colored chips need their palette background + contrast text.
 */

/* Filled colored chips: force background and text (body prefix for specificity) */
body .mud-chip.mud-chip-filled.mud-chip-color-primary,
body .mud-chip.mud-chip-color-primary:not(.mud-chip-outlined):not(.mud-chip-text) {
    background: var(--mud-palette-primary) !important;
    border-color: var(--mud-palette-primary) !important;
    color: var(--mud-palette-primary-contrast, #fff) !important;
}
body .mud-chip.mud-chip-filled.mud-chip-color-primary .mud-chip-content,
body .mud-chip.mud-chip-filled.mud-chip-color-primary .mud-chip-icon,
body .mud-chip.mud-chip-filled.mud-chip-color-primary .mud-chip-content *,
body .mud-chip.mud-chip-color-primary:not(.mud-chip-outlined):not(.mud-chip-text) .mud-chip-content,
body .mud-chip.mud-chip-color-primary:not(.mud-chip-outlined):not(.mud-chip-text) .mud-chip-icon,
body .mud-chip.mud-chip-color-primary:not(.mud-chip-outlined):not(.mud-chip-text) .mud-chip-content * {
    color: var(--mud-palette-primary-contrast, #fff) !important;
}

body .mud-chip.mud-chip-filled.mud-chip-color-secondary,
body .mud-chip.mud-chip-color-secondary:not(.mud-chip-outlined):not(.mud-chip-text) {
    background: var(--mud-palette-secondary) !important;
    border-color: var(--mud-palette-secondary) !important;
    color: var(--mud-palette-secondary-contrast, #fff) !important;
}
body .mud-chip.mud-chip-filled.mud-chip-color-secondary .mud-chip-content,
body .mud-chip.mud-chip-filled.mud-chip-color-secondary .mud-chip-icon,
body .mud-chip.mud-chip-filled.mud-chip-color-secondary .mud-chip-content *,
body .mud-chip.mud-chip-color-secondary:not(.mud-chip-outlined):not(.mud-chip-text) .mud-chip-content,
body .mud-chip.mud-chip-color-secondary:not(.mud-chip-outlined):not(.mud-chip-text) .mud-chip-content * {
    color: var(--mud-palette-secondary-contrast, #fff) !important;
}

body .mud-chip.mud-chip-filled.mud-chip-color-success,
body .mud-chip.mud-chip-color-success:not(.mud-chip-outlined):not(.mud-chip-text) {
    background: var(--mud-palette-success) !important;
    border-color: var(--mud-palette-success) !important;
    color: var(--mud-palette-success-contrast, #fff) !important;
}
body .mud-chip.mud-chip-filled.mud-chip-color-success .mud-chip-content,
body .mud-chip.mud-chip-filled.mud-chip-color-success .mud-chip-icon,
body .mud-chip.mud-chip-filled.mud-chip-color-success .mud-chip-content *,
body .mud-chip.mud-chip-color-success:not(.mud-chip-outlined):not(.mud-chip-text) .mud-chip-content,
body .mud-chip.mud-chip-color-success:not(.mud-chip-outlined):not(.mud-chip-text) .mud-chip-content * {
    color: var(--mud-palette-success-contrast, #fff) !important;
}

body .mud-chip.mud-chip-filled.mud-chip-color-info,
body .mud-chip.mud-chip-color-info:not(.mud-chip-outlined):not(.mud-chip-text) {
    background: var(--mud-palette-info) !important;
    border-color: var(--mud-palette-info) !important;
    color: var(--mud-palette-info-contrast, #fff) !important;
}
body .mud-chip.mud-chip-filled.mud-chip-color-info .mud-chip-content,
body .mud-chip.mud-chip-filled.mud-chip-color-info .mud-chip-icon,
body .mud-chip.mud-chip-filled.mud-chip-color-info .mud-chip-content *,
body .mud-chip.mud-chip-color-info:not(.mud-chip-outlined):not(.mud-chip-text) .mud-chip-content,
body .mud-chip.mud-chip-color-info:not(.mud-chip-outlined):not(.mud-chip-text) .mud-chip-content * {
    color: var(--mud-palette-info-contrast, #fff) !important;
}

body .mud-chip.mud-chip-filled.mud-chip-color-warning,
body .mud-chip.mud-chip-color-warning:not(.mud-chip-outlined):not(.mud-chip-text) {
    background: var(--mud-palette-warning) !important;
    border-color: var(--mud-palette-warning) !important;
    color: var(--mud-palette-warning-contrast, #fff) !important;
}
body .mud-chip.mud-chip-filled.mud-chip-color-warning .mud-chip-content,
body .mud-chip.mud-chip-filled.mud-chip-color-warning .mud-chip-icon,
body .mud-chip.mud-chip-filled.mud-chip-color-warning .mud-chip-content *,
body .mud-chip.mud-chip-color-warning:not(.mud-chip-outlined):not(.mud-chip-text) .mud-chip-content,
body .mud-chip.mud-chip-color-warning:not(.mud-chip-outlined):not(.mud-chip-text) .mud-chip-icon,
body .mud-chip.mud-chip-color-warning:not(.mud-chip-outlined):not(.mud-chip-text) .mud-chip-content * {
    color: var(--mud-palette-warning-contrast, #fff) !important;
}

body .mud-chip.mud-chip-filled.mud-chip-color-error,
body .mud-chip.mud-chip-color-error:not(.mud-chip-outlined):not(.mud-chip-text) {
    background: var(--mud-palette-error) !important;
    border-color: var(--mud-palette-error) !important;
    color: var(--mud-palette-error-contrast, #fff) !important;
}
body .mud-chip.mud-chip-filled.mud-chip-color-error .mud-chip-content,
body .mud-chip.mud-chip-filled.mud-chip-color-error .mud-chip-icon,
body .mud-chip.mud-chip-filled.mud-chip-color-error .mud-chip-content *,
body .mud-chip.mud-chip-color-error:not(.mud-chip-outlined):not(.mud-chip-text) .mud-chip-content,
body .mud-chip.mud-chip-color-error:not(.mud-chip-outlined):not(.mud-chip-text) .mud-chip-icon,
body .mud-chip.mud-chip-color-error:not(.mud-chip-outlined):not(.mud-chip-text) .mud-chip-content * {
    color: var(--mud-palette-error-contrast, #fff) !important;
}

/*
 * Soft business-status chips (Visual Standard Phase 1).
 * Opt-in via .pm-status-chip--soft and/or .entity-view-header-status-chip.
 * Higher specificity than solid filled rules above — does NOT change notification,
 * priority, or other intentionally prominent filled chips.
 */
body .mud-chip.mud-chip-filled.pm-status-chip--soft,
body .mud-chip.mud-chip-filled.entity-view-header-status-chip {
    height: 22px !important;
    min-height: 22px !important;
    font-size: var(--pm-font-size-micro, 11px) !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em;
    border-radius: var(--pm-radius-badge, 3px);
    border-style: solid;
    border-width: 1px;
    box-shadow: none;
}
/*
 * Critical: app.css paints solid success (and similar) backgrounds onto
 * .mud-chip-content as well as the chip root. Soft chips must keep a single
 * pale surface — content/icon backgrounds stay transparent.
 */
body .mud-chip.mud-chip-filled.pm-status-chip--soft .mud-chip-content,
body .mud-chip.mud-chip-filled.pm-status-chip--soft .mud-chip-icon,
body .mud-chip.mud-chip-filled.pm-status-chip--soft .mud-chip-content *,
body .mud-chip.mud-chip-filled.entity-view-header-status-chip .mud-chip-content,
body .mud-chip.mud-chip-filled.entity-view-header-status-chip .mud-chip-icon,
body .mud-chip.mud-chip-filled.entity-view-header-status-chip .mud-chip-content * {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    font-size: var(--pm-font-size-micro, 11px) !important;
    font-weight: 600 !important;
}

body .mud-chip.mud-chip-filled.pm-status-chip--soft.mud-chip-color-warning,
body .mud-chip.mud-chip-filled.entity-view-header-status-chip.mud-chip-color-warning {
    background: var(--pm-status-warning-bg, #FFF8EB) !important;
    border-color: var(--pm-status-warning-border, #F7D9A8) !important;
    color: var(--pm-status-warning-fg, #B54708) !important;
}
body .mud-chip.mud-chip-filled.pm-status-chip--soft.mud-chip-color-warning .mud-chip-content,
body .mud-chip.mud-chip-filled.pm-status-chip--soft.mud-chip-color-warning .mud-chip-icon,
body .mud-chip.mud-chip-filled.pm-status-chip--soft.mud-chip-color-warning .mud-chip-content *,
body .mud-chip.mud-chip-filled.entity-view-header-status-chip.mud-chip-color-warning .mud-chip-content,
body .mud-chip.mud-chip-filled.entity-view-header-status-chip.mud-chip-color-warning .mud-chip-icon,
body .mud-chip.mud-chip-filled.entity-view-header-status-chip.mud-chip-color-warning .mud-chip-content * {
    color: var(--pm-status-warning-fg, #B54708) !important;
}

body .mud-chip.mud-chip-filled.pm-status-chip--soft.mud-chip-color-success,
body .mud-chip.mud-chip-filled.entity-view-header-status-chip.mud-chip-color-success {
    background: var(--pm-status-success-bg, #ECFDF3) !important;
    border-color: var(--pm-status-success-border, #ABEFC6) !important;
    color: var(--pm-status-success-fg, #067647) !important;
}
body .mud-chip.mud-chip-filled.pm-status-chip--soft.mud-chip-color-success .mud-chip-content,
body .mud-chip.mud-chip-filled.pm-status-chip--soft.mud-chip-color-success .mud-chip-icon,
body .mud-chip.mud-chip-filled.pm-status-chip--soft.mud-chip-color-success .mud-chip-content *,
body .mud-chip.mud-chip-filled.entity-view-header-status-chip.mud-chip-color-success .mud-chip-content,
body .mud-chip.mud-chip-filled.entity-view-header-status-chip.mud-chip-color-success .mud-chip-icon,
body .mud-chip.mud-chip-filled.entity-view-header-status-chip.mud-chip-color-success .mud-chip-content * {
    color: var(--pm-status-success-fg, #067647) !important;
}

body .mud-chip.mud-chip-filled.pm-status-chip--soft.mud-chip-color-error,
body .mud-chip.mud-chip-filled.entity-view-header-status-chip.mud-chip-color-error {
    background: var(--pm-status-error-bg, #FEF3F2) !important;
    border-color: var(--pm-status-error-border, #FECDCA) !important;
    color: var(--pm-status-error-fg, #B42318) !important;
}
body .mud-chip.mud-chip-filled.pm-status-chip--soft.mud-chip-color-error .mud-chip-content,
body .mud-chip.mud-chip-filled.pm-status-chip--soft.mud-chip-color-error .mud-chip-icon,
body .mud-chip.mud-chip-filled.pm-status-chip--soft.mud-chip-color-error .mud-chip-content *,
body .mud-chip.mud-chip-filled.entity-view-header-status-chip.mud-chip-color-error .mud-chip-content,
body .mud-chip.mud-chip-filled.entity-view-header-status-chip.mud-chip-color-error .mud-chip-icon,
body .mud-chip.mud-chip-filled.entity-view-header-status-chip.mud-chip-color-error .mud-chip-content * {
    color: var(--pm-status-error-fg, #B42318) !important;
}

body .mud-chip.mud-chip-filled.pm-status-chip--soft.mud-chip-color-info,
body .mud-chip.mud-chip-filled.entity-view-header-status-chip.mud-chip-color-info {
    background: var(--pm-status-info-bg, #EFF8FF) !important;
    border-color: var(--pm-status-info-border, #B2DDFF) !important;
    color: var(--pm-status-info-fg, #175CD3) !important;
}
body .mud-chip.mud-chip-filled.pm-status-chip--soft.mud-chip-color-info .mud-chip-content,
body .mud-chip.mud-chip-filled.pm-status-chip--soft.mud-chip-color-info .mud-chip-icon,
body .mud-chip.mud-chip-filled.pm-status-chip--soft.mud-chip-color-info .mud-chip-content *,
body .mud-chip.mud-chip-filled.entity-view-header-status-chip.mud-chip-color-info .mud-chip-content,
body .mud-chip.mud-chip-filled.entity-view-header-status-chip.mud-chip-color-info .mud-chip-icon,
body .mud-chip.mud-chip-filled.entity-view-header-status-chip.mud-chip-color-info .mud-chip-content * {
    color: var(--pm-status-info-fg, #175CD3) !important;
}

body .mud-chip.mud-chip-filled.pm-status-chip--soft.mud-chip-color-default,
body .mud-chip.mud-chip-filled.entity-view-header-status-chip.mud-chip-color-default,
body .mud-chip.mud-chip-filled.pm-status-chip--soft.mud-chip-color-primary,
body .mud-chip.mud-chip-filled.entity-view-header-status-chip.mud-chip-color-primary {
    background: var(--pm-status-neutral-bg, #F2F4F7) !important;
    border-color: var(--pm-status-neutral-border, #D0D5DD) !important;
    color: var(--pm-status-neutral-fg, #344054) !important;
}
body .mud-chip.mud-chip-filled.pm-status-chip--soft.mud-chip-color-default .mud-chip-content,
body .mud-chip.mud-chip-filled.pm-status-chip--soft.mud-chip-color-default .mud-chip-icon,
body .mud-chip.mud-chip-filled.pm-status-chip--soft.mud-chip-color-default .mud-chip-content *,
body .mud-chip.mud-chip-filled.entity-view-header-status-chip.mud-chip-color-default .mud-chip-content,
body .mud-chip.mud-chip-filled.entity-view-header-status-chip.mud-chip-color-default .mud-chip-icon,
body .mud-chip.mud-chip-filled.entity-view-header-status-chip.mud-chip-color-default .mud-chip-content *,
body .mud-chip.mud-chip-filled.pm-status-chip--soft.mud-chip-color-primary .mud-chip-content,
body .mud-chip.mud-chip-filled.pm-status-chip--soft.mud-chip-color-primary .mud-chip-icon,
body .mud-chip.mud-chip-filled.pm-status-chip--soft.mud-chip-color-primary .mud-chip-content *,
body .mud-chip.mud-chip-filled.entity-view-header-status-chip.mud-chip-color-primary .mud-chip-content,
body .mud-chip.mud-chip-filled.entity-view-header-status-chip.mud-chip-color-primary .mud-chip-icon,
body .mud-chip.mud-chip-filled.entity-view-header-status-chip.mud-chip-color-primary .mud-chip-content * {
    color: var(--pm-status-neutral-fg, #344054) !important;
}
