html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
body {
    background: white;
}

a, .btn-link, a.mud-list-item-clickable {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #006ec7;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.mud-disabled.mud-input {
    background-color: var(--mud-palette-background-gray);
}

.mud-disabled *, .mud-input-control > .mud-input-control-input-container > input:disabled {
    cursor: not-allowed !important;
}

.form-field-appearance--readonly:not(.form-field-appearance--muted) .mud-input.mud-input-outlined:not(.mud-disabled) {
    background-color: var(--mud-palette-background-gray) !important;
}

.form-field-appearance--muted:not(.form-field-appearance--readonly) .mud-disabled.mud-input,
.form-field-appearance--muted:not(.form-field-appearance--readonly) .mud-input.mud-input-outlined.mud-disabled {
    background-color: var(--mud-palette-surface) !important;
}

.form-field-appearance--muted:not(.form-field-appearance--readonly)
    input:disabled:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.form-field-appearance--muted:not(.form-field-appearance--readonly)
    textarea:disabled {
    color: var(--mud-palette-text-disabled) !important;
    -webkit-text-fill-color: var(--mud-palette-text-disabled) !important;
}

.form-field-appearance.form-field-appearance--readonly.form-field-appearance--muted .mud-disabled.mud-input,
.form-field-appearance.form-field-appearance--readonly.form-field-appearance--muted .mud-input.mud-input-outlined.mud-disabled {
    background-color: var(--mud-palette-background-gray) !important;
}

.form-field-appearance.form-field-appearance--readonly.form-field-appearance--muted
    input:disabled:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.form-field-appearance.form-field-appearance--readonly.form-field-appearance--muted
    textarea:disabled {
    color: var(--mud-palette-text-disabled) !important;
    -webkit-text-fill-color: var(--mud-palette-text-disabled) !important;
}

/**
 * By default, these elements have a top and bottom margin of `4px`. In some cases this margin collapses, but in other
 * cases it doesn't, causing visually apparent spacing and alignment inconsistencies. This margin appears to serve no
 * inherent functional purpose: it just serves to space the elements apart. We could just get rid of the margin, but in
 * some cases we actually rely on this spacing for the appearance of forms. As such, this solution to keep the space but
 * prevent it from collapsing, and we do this by setting the space as padding instead of margin. This element is a
 * deeply nested container, and adding this padding does not alter its appearance.
 */
.mud-input-control.mud-input-control-margin-dense {
    margin: 0;
    padding: 4px 0;
}

.mud-input-control-margin-dense > .mud-input-control-input-container > div.mud-input.mud-input-text {
    margin-top: 0;
}

.column-header {
    text-wrap: nowrap;
}

.mud-input {
    background-color: white;
}

.navbar-search {
    width: 10rem;
    transition: width ease-out 0.15s, background-color ease-out 0.15s;
    background-color: #ffffff40;
    border-radius: 4px;
}
.navbar-search  .mud-input {
    background-color: unset;
}
.navbar-search.active {
    width: 30rem;
    background-color: white;
}

.text-decoration-underline-and-line-through {
    text-decoration: underline line-through;
}

.no-adornment-padding input.mud-input-root-adorned-start {
    padding-inline-start: 0 !important;
}

.field-zone {
    opacity: 0;
    transition: opacity 0.25s ease-out;
}

.field-zone:hover {
    opacity: 1;
}

.field-zone.drag-enter {
    opacity: 1;
}

.field-zone-new-column {
    --column-field-zone-width: 2rem;
    width: 0;
    overflow: visible;
    z-index: 5;
    position: relative;
}
.field-zone-new-column > div {
    position: relative;
    height: 100%;
    width: var(--column-field-zone-width);
    left: calc(-0.5 * var(--column-field-zone-width));
    cursor: pointer;
}

.field-zone-new-row {
    height: 0;
    width: 100%;
    overflow: visible;
    z-index: 5;
    position: relative;
    transition: height 0.25s ease-in;
}

.field-zone-new-row > div {
    --row-field-zone-height: 1rem;
    position: relative;
    width: 100%;
    height: var(--row-field-zone-height);
    top: calc(-0.5 * var(--row-field-zone-height));
    cursor: pointer;
}

.form-editor-container:hover,
.form-editor-container.highlight-form-editor-container {
    background-color: #f5f5f5;
}

/**
 * These elements are the containers for the contents of the `BeforeItemsTemplate`, `AfterItemsTemplate`, and
 * `NoItemsTemplate` slots of `MudAutocomplete`. MudBlazor does not let us apply classes or styles to these elements
 * directly, so we need to do it in CSS.
 *
 * MudBlazor renders these elements with the `pa-1` class, which is unfortunate because it forces these elements to have
 * a certain amount of padding that we don't have control over, even if we don't want it. This also means that these
 * elements will result in whitespace when empty, which can happen when we want to render the contents of the slot
 * conditionally (since we can't render the slot itself conditionally). We are forcefully removing the padding from
 * these elements here so that we can control it ourselves as needed.
 */
.autocomplete-no-template-padding .mud-autocomplete-before-items,
.autocomplete-no-template-padding .mud-autocomplete-after-items,
.autocomplete-no-template-padding .mud-autocomplete-no-items {
    padding: 0 !important;
}

/**
 * MudCalendar sets `overflow-y: scroll` on this element, which always shows scrollbars in Chrome even when unnecessary
 * (#1358).
 */
.mud-cal-month-dropzone {
    overflow-y: auto !important;
}

.tab-header {
    transition: background-color 0.6s ease;
    user-select: none;
}

.tab-header:hover {
    background-color: var(--mud-palette-action-default-hover);
}

.tab-header div:first-child {
    transition: border-bottom-color 0.1s linear;
}

.pre-wrap {
    white-space: pre-wrap;
}

.list-view-table {
    font-size: 9pt;
    border-collapse: collapse;
}

/* Header colours come from ListViewSetup.HeaderFormatting inline styles (see ListViewTable.razor). */

/* Entity page list views: muted header row (must use !important to beat inline HeaderFormatting). */
.list-view-table.list-view-table--grey-header > div > table > thead > tr > th,
.list-view-table.list-view-table--grey-header > div > table > thead > tr > td {
    color: #858993 !important;
    background-color: #FAFAFC !important;
}

.list-view-table .list-view-row-actions-cell {
    width: 1%;
    white-space: nowrap;
    padding-top: 0;
    padding-bottom: 0;
    vertical-align: middle;
}

.list-view-table .list-view-row-actions-activator.mud-icon-button-size-small {
    padding: 0;
    width: 1.5rem;
    height: 1.5rem;
}

.list-view-table .list-view-row-actions .mud-button-size-small {
    padding: 0 4px;
    min-height: unset;
    line-height: 1;
}

.borderless-mud-input input {
    padding-left: 4px;
}

.borderless-mud-input-rounded > div > div {
    border-radius: var(--mud-default-borderradius) !important;
}

.borderless-mud-input-secondary-row input {
    padding-left: 8px !important;
}

.borderless-mud-input .mud-input.mud-input-underline::before,
.borderless-mud-input .mud-input.mud-input-underline::after,
.borderless-mud-input .mud-input.mud-input-underline:hover::before {
    border-bottom: none !important;
}

.table-shrink-column {
    width: 1px;
}


.table-outer-border {
    border: 1px solid var(--mud-palette-table-lines);
}

.form-popup {
    clip-path: inset(5px 5px 5px 5px);
}

.no-spectrum .mud-picker-color-toolbar [aria-label="Spectrum"] {
    display: none;
}

.unset-disabled-textfield .mud-disabled {
    color: unset !important;
    background-color: unset !important;
    cursor: default !important;
}

.unset-disabled-textfield .mud-disabled *,
.unset-disabled-textfield .mud-input-control > .mud-input-control-input-container > input:disabled {
    cursor: default !important;
}

.disable-variable-source-selector {
    display: none;
}

.fading-alert {
    opacity: 0;
    pointer-events: none;
}

.fading-alert.show {
    opacity: 1;
}

.signature-component {
    border: 1px solid var(--mud-palette-lines-inputs);
    border-radius: 4px;
    width: 100%;
}

.signature-component .signature {
    width: 100%;
    height: 150px;
}

.signature-component-readonly .signature {
    cursor: default;
}

.signature-pen-colour-preview {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 4px;
    border: 1px solid var(--mud-palette-lines-inputs);
    cursor: pointer;
}

.signature-colour-overlay {
    z-index: 1;
}

.signature-colour-popover {
    z-index: 2;
}

.notes-and-tasks-table-header {
    background-color: var(--mud-palette-background-gray);
}

/* Form grid rows collapse to a single column on phones so multi-column layouts stay usable.
   The cells' inline `grid-column: span N` (component Width) must also be neutralised, or a
   spanning cell creates implicit columns that narrower cells then squeeze in beside. */
@media (max-width: 640px) {
    .form-grid-row {
        grid-template-columns: 1fr !important;
    }

    .form-grid-row > div {
        grid-column: auto !important;
    }
}

/* Form flex rows (Left/Right/Center/Between formats) stack vertically on phones so their
   components render full-width, matching how grid rows collapse, instead of squeezing
   beside each other or hanging past the edge. */
@media (max-width: 640px) {
    .form-flex-row {
        flex-direction: column !important;
        align-items: stretch !important;
    }
}

/* Phones: slim the container gutters so forms get the width back (nested containers
   otherwise eat ~90px of a 375px screen). */
@media (max-width: 640px) {
    .mud-container--gutters {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }
}
