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;
}

/* Default List view text colour if there is no formatting set */
.list-view-table > div > table > tbody > tr > td {
    color: #878a94;
}

.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;
}

.list-view-root {
    display: flex;
    flex-direction: column;
    max-height: 100%;
    min-height: 90px;
}

.list-view-root > * {
    flex: 0 0 auto;
}

.list-view-root > .list-view-table-region {
    flex: 0 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.list-view-table-region > div.list-view-table {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.list-view-table-region > div.list-view-table > div.mud-table-container {
    flex: 0 1 auto;
    min-height: 0;
    overflow: auto;
    max-height: calc(100vh - 110px);
    max-height: calc(100dvh - 110px);
}

.list-view-table-region > div.list-view-table > div.mud-table-container > table > thead {
    position: sticky;
    top: 0;
    z-index: 2;
    background-color: var(--mud-palette-surface);
}

.list-view-table-region .list-view-frozen-cell {
    position: sticky;
    z-index: 1;
    background-color: var(--mud-palette-surface);
}

.list-view-table-region tr[style*="background-color"] > .list-view-frozen-cell {
    background-color: inherit;
}

.list-view-table-region > div.list-view-table > div.mud-table-container > table > thead .list-view-frozen-cell {
    z-index: 3;
}

.list-view-table-region .list-view-frozen-cell--last {
    box-shadow: 3px 0 3px -1px rgba(0, 0, 0, 0.12);
}

.list-view-table-region .list-view-group-header-content {
    position: sticky;
    left: 0;
    width: fit-content;
}

.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;
    }
}

.connx-cutover-tabs .mud-tab-badge {
    margin-right: 28px;
}

:root {
    --mylink-loader-colour: #006ec7;
    --mylink-loader-caption-colour: #5b6470;
}

.mylink-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.mylink-loader-mark {
    display: block;
    width: 120px;
    height: auto;
    overflow: visible;
}

.mylink-loader-caption {
    color: var(--mylink-loader-caption-colour);
    font-weight: 600;
    letter-spacing: .01em;
}

.mylink-loader--small {
    flex-direction: row;
    gap: 8px;
}

.mylink-loader--small .mylink-loader-mark {
    width: 54px;
}

.mylink-loader--small .mylink-loader-caption {
    font-size: .85rem;
    font-weight: 500;
}

.mylink-loader--inline .mylink-loader-mark {
    width: 120px;
}

.mylink-loader--inline .mylink-loader-caption {
    font-size: .95rem;
}

.mylink-loader--page {
    min-height: 60vh;
    gap: 18px;
}

.mylink-loader--page .mylink-loader-mark {
    width: 220px;
}

.mylink-loader--page .mylink-loader-caption {
    font-size: 1.15rem;
}

.mylink-loader-link {
    fill: none;
    stroke: var(--mylink-loader-colour);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    opacity: 0;
    transform-box: fill-box;
    transform-origin: 50% 50%;
    animation: mylink-loader-hook-in 1.8s ease-in-out infinite;
}

.mylink-loader-link-second {
    animation-delay: .45s;
}

.mylink-loader-link-third {
    animation-delay: .9s;
}

@keyframes mylink-loader-hook-in {
    0% {
        stroke-dashoffset: 100;
        opacity: 0;
        transform: translateX(7px) rotate(-10deg);
    }

    10% {
        opacity: 1;
    }

    38% {
        stroke-dashoffset: 0;
        transform: translateX(0) rotate(0deg);
    }

    78% {
        stroke-dashoffset: 0;
        opacity: 1;
        transform: translateX(0) rotate(0deg);
    }

    100% {
        stroke-dashoffset: 0;
        opacity: 0;
        transform: translateX(-5px) rotate(6deg);
    }
}

@keyframes mylink-loader-pulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: .4;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mylink-loader-link {
        stroke-dashoffset: 0;
        opacity: 1;
        transform: none;
        animation: mylink-loader-pulse 2s ease-in-out infinite;
    }

    .mylink-loader-link-second,
    .mylink-loader-link-third {
        animation-delay: 0s;
    }
}

#components-reconnect-modal {
    display: none;
}

#components-reconnect-modal.components-reconnect-show,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 3000;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .88);
}

.mylink-reconnect-card {
    background: #fff;
    border-radius: 16px;
    padding: 32px 40px;
    box-shadow: 0 20px 50px rgba(15, 76, 129, .25);
    text-align: center;
}

.mylink-reconnect-stopped {
    display: none;
}

#components-reconnect-modal.components-reconnect-failed .mylink-reconnect-retrying,
#components-reconnect-modal.components-reconnect-rejected .mylink-reconnect-retrying {
    display: none;
}

#components-reconnect-modal.components-reconnect-failed .mylink-reconnect-stopped,
#components-reconnect-modal.components-reconnect-rejected .mylink-reconnect-stopped {
    display: block;
}

.staff-table-unassigned-role {
    color:  red;
}

.staff-table-row-clickable {
    cursor: pointer;
}

.staff-link-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.staff-link-dot-entra {
    background: #7e57c2;
}

.staff-link-dot-connx {
    background: #43a047;
}

.staff-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: calc(var(--mud-zindex-appbar, 1300) + 1);
}

.staff-drawer-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(42rem, 100vw);
    background: var(--mud-palette-surface);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    z-index: calc(var(--mud-zindex-appbar, 1300) + 2);
    animation: staff-drawer-slide-in 0.2s ease;
}

@keyframes staff-drawer-slide-in {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.staff-drawer-header {
    position: sticky;
    top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--mud-palette-surface);
    border-bottom: 1px solid var(--mud-palette-lines-default);
    padding: 16px 24px;
    z-index: 1;
}

.staff-drawer-section {
    padding: 0 24px;
    margin-top: 24px;
}

.staff-drawer-card {
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 8px;
    padding: 12px;
}

.staff-drawer-muted-panel {
    background: var(--mud-palette-background-gray);
    border-radius: 8px;
    padding: 12px;
}

.staff-drawer-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 24px;
}

.staff-drawer-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.staff-drawer-dot-on {
    background: var(--mud-palette-success);
}

.staff-drawer-dot-off {
    background: var(--mud-palette-grey-light);
}

.staff-drawer-monospace {
    font-family: monospace;
    overflow-wrap: anywhere;
}

.staff-drawer-day {
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 8px;
    padding: 6px 8px;
    min-width: 5.25rem;
    text-align: center;
}

.staff-drawer-day-off {
    opacity: 0.55;
}

.staff-drawer-day-today {
    border: 2px solid var(--mud-palette-primary);
}

.staff-drawer-footer {
    border-top: 1px solid var(--mud-palette-lines-default);
    margin: 24px 24px 0;
    padding: 16px 0 24px;
}
