/* ─── Alerts ─────────────────────────────────────────────────────
   MudAlert sets its message in the severity's -darken shade, which reads as coloured body text in
   light mode and loses contrast in dark mode, where -darken is darker than the page. Here the
   message is the theme's body text and only the icon and the edge carry the severity, mixed from
   the palette so every theme (a tenant's included) and both modes follow. Both hosts link this file
   after MudBlazor's.
   Text (the default): a light wash of the severity on the surface.
   Outlined: a fainter wash with the page's own border, marked by the severity on its leading edge.
   Filled: MudBlazor's, at body weight. */
.mud-alert {
    --bm-alert-tone: var(--mud-palette-text-secondary);
    align-items: flex-start;
}

.mud-alert .mud-alert-message {
    padding: 10px 0;
    font-size: var(--mud-typography-body2-size);
    line-height: 1.5;
}

.mud-alert .mud-alert-icon {
    color: var(--bm-alert-tone);
    opacity: 1;
    padding: 10px 0;
    margin-inline-end: 10px;
}

.mud-alert .mud-alert-icon .mud-icon-root {
    font-size: 20px;
    width: 20px;
    height: 21px;
}

.mud-alert.mud-dense .mud-alert-message,
.mud-alert.mud-dense .mud-alert-icon {
    padding: 6px 0;
}

.mud-alert-text-info, .mud-alert-outlined-info, .mud-alert-filled-info { --bm-alert-tone: var(--mud-palette-info); }
.mud-alert-text-success, .mud-alert-outlined-success, .mud-alert-filled-success { --bm-alert-tone: var(--mud-palette-success); }
.mud-alert-text-warning, .mud-alert-outlined-warning, .mud-alert-filled-warning { --bm-alert-tone: var(--mud-palette-warning); }
.mud-alert-text-error, .mud-alert-outlined-error, .mud-alert-filled-error { --bm-alert-tone: var(--mud-palette-error); }
.mud-alert-text-primary, .mud-alert-outlined-primary, .mud-alert-filled-primary { --bm-alert-tone: var(--mud-palette-primary); }
.mud-alert-text-secondary, .mud-alert-outlined-secondary, .mud-alert-filled-secondary { --bm-alert-tone: var(--mud-palette-secondary); }
.mud-alert-text-tertiary, .mud-alert-outlined-tertiary, .mud-alert-filled-tertiary { --bm-alert-tone: var(--mud-palette-tertiary); }

.mud-alert[class*="mud-alert-text-"],
.mud-alert[class*="mud-alert-outlined-"] {
    color: var(--mud-palette-text-primary);
}

.mud-alert[class*="mud-alert-text-"] {
    background-color: color-mix(in srgb, var(--bm-alert-tone) 9%, var(--mud-palette-surface));
    border: 1px solid color-mix(in srgb, var(--bm-alert-tone) 22%, var(--mud-palette-surface));
}

.mud-alert.mud-alert-text-normal,
.mud-alert.mud-alert-text-dark {
    background-color: var(--mud-palette-background-gray);
    border-color: transparent;
}

.mud-alert[class*="mud-alert-outlined-"] {
    background-color: color-mix(in srgb, var(--bm-alert-tone) 7%, var(--mud-palette-surface));
    border: 1px solid var(--mud-palette-lines-default);
    box-shadow: inset 3px 0 0 var(--bm-alert-tone);
}

.mud-alert.mud-alert-outlined-normal,
.mud-alert.mud-alert-outlined-dark {
    background-color: var(--mud-palette-surface);
    box-shadow: none;
}

.mud-alert[class*="mud-alert-filled-"] {
    font-weight: 400;
}

.mud-alert[class*="mud-alert-filled-"] .mud-alert-icon {
    color: currentColor;
}
