/* Global styles shared by both hosts.

   Typography, colours, spacing and component styling all come from MudBlazor's theme
   (see Theme/OneHealthTheme.cs) — this file only carries the framework-level bits MudBlazor
   does not own: Blazor's own error UI and its form-validation classes. */

html, body {
    margin: 0;
    padding: 0;
}

/* Blazor injects errors into this element; the framework flips it to display:block. */
#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2000;
    padding: 0.75rem 1.25rem;
    background: #b91c1c;
    color: #fff;
    box-shadow: 0 -1px 4px rgba(0, 0, 0, .25);
}

#blazor-error-ui .reload {
    color: #fff;
    text-decoration: underline;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    float: right;
}

/* Blazor's EditForm validation classes. MudBlazor's own inputs render their own validation
   state, so these only matter for any plain <InputText>/<EditForm> markup we keep. */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #15803d;
}

.invalid {
    outline: 1px solid #b91c1c;
}

.validation-message {
    color: #b91c1c;
}

.blazor-error-boundary {
    padding: 1rem;
    background: #b91c1c;
    color: #fff;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

/* MudBlazor's table cell is display:flex with justify-content:space-between and flex-wrap:nowrap
   out of the box. That is invisible on a desktop grid, where each cell has the whole column's
   width to itself, but it is what a narrow screen actually renders with: below the table's
   Breakpoint, the cell becomes "label: value" on one line via the ::before pseudo-element carrying
   data-label, and nowrap means a value that does not fit beside its label — several permission
   chips, a long role name plus its "Built in" chip, a row of action buttons — runs off the edge of
   the phone instead of dropping to a second line. Wrapping is the fix everywhere this shows up, and
   it changes nothing on a desktop grid where cells rarely need it. */
.mud-table-cell {
    flex-wrap: wrap;
}
