/* For inputs recorded in caps. */
.sle-uppercase-input input {
    text-transform: uppercase;
}

.sle-uppercase-input input::placeholder {
    text-transform: none;
}

/* For number inputs sitting in a right-hand column, so digits line up with the edge. */
.sle-right-aligned-input input {
    text-align: right;
}

/* MudSimpleTable forces every cell to align start with a selector that beats MudBlazor's utility classes. */
.mud-simple-table .sle-numeric-cell {
    text-align: right;
}

.mud-simple-table .sle-centered-cell {
    text-align: center;
}

/* The scrolling body under a tab bar; its parent must be a flex column with a bounded height. */
.tab-content {
    flex: 1;
    overflow-y: auto;
    margin-top: 1.5rem;
    min-height: 0;
    /* overflow-y: auto forces overflow-x to auto too, which clips card shadows at the sides. The padding gives the
       shadows room inside the scroll area; the negative margin cancels it so the content stays aligned. */
    padding-inline: 4px;
    margin-inline: -4px;
}

/* A vertical divider between each child of a row, with none before the first. */
.sle-divided-row > * + * {
    border-left: 1px solid var(--mud-palette-lines-default);
}

/*
 * Printing a dialog marked sle-printable-dialog prints only that dialog: the page behind it, the overlay and the
 * dialog's buttons are hidden, and the dialog drops its fixed position and height cap so a long one isn't cut off.
 */
@media print {
    body:has(.sle-printable-dialog) .mud-layout,
    .mud-dialog-container:has(.sle-printable-dialog) .mud-overlay,
    .sle-printable-dialog .mud-dialog-actions,
    .sle-printable-dialog .mud-button-close {
        display: none !important;
    }

    .mud-dialog-container:has(.sle-printable-dialog) {
        position: static;
        display: block;
        height: auto;
    }

    .sle-printable-dialog {
        position: static !important;
        max-height: none !important;
        max-width: none !important;
        width: 100% !important;
        overflow: visible !important;
        box-shadow: none !important;
        animation: none !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .sle-printable-dialog .mud-dialog-content {
        overflow: visible !important;
    }
}
