h1:focus {
    outline: none;
}

/* The back office's shell (MAP-003; moved here by MAP-019: scoped CSS can't reach MudBlazor's elements). */
.map-appbar__name {
    text-transform: none; /* a person's name as they write it, not in a button's capitals */
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* An employer's logo and name in the portal's app bar (MAP-038): one line, cut short with an ellipsis on a phone. */
.map-appbar__logo {
    height: 32px;
    max-width: 160px;
    object-fit: contain;
    flex: none;
}

.map-appbar__brand {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 600px) {
    .map-appbar__logo {
        max-width: 96px;
        height: 28px;
    }
}

/* At phone width the context and the user's name give way: the account icon still opens the user menu. A phone has no
   keyboard, so the shortcuts button goes too (MAP-030). */
@media (max-width: 600px) {
    .map-appbar__context,
    .map-appbar__name,
    .map-appbar__shortcuts {
        display: none;
    }
}

/* The keyboard shortcut list (MAP-030): keys on the left, what they do on the right. */
.map-shortcuts {
    display: grid;
    grid-template-columns: minmax(0, 9rem) minmax(0, 1fr);
    gap: 6px 16px;
    margin: 0;
}

.map-shortcuts dt {
    white-space: nowrap;
}

.map-shortcuts dd {
    margin: 0;
}

.map-shortcuts__then {
    margin: 0 4px;
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

kbd {
    display: inline-block;
    min-width: 1.6em;
    padding: 1px 6px;
    font: inherit;
    font-size: 0.8125rem;
    font-variant-numeric: tabular-nums;
    text-align: center;
    color: var(--mud-palette-text-primary);
    background: var(--mud-palette-background-gray);
    border: 1px solid var(--mud-palette-lines-inputs);
    border-bottom-width: 2px;
    border-radius: 4px;
}

/* Toasts (MAP-030, D196): bottom left, and no wider than the menu while the menu is open beside the screen, so they sit
   over the menu's empty foot and never cover a screen's buttons. On a phone they span the width, above the bottom edge. */
.mud-snackbar-location-bottom-left .mud-snackbar {
    min-width: 0;
    max-width: min(400px, calc(100vw - 32px));
}

@media (min-width: 960px) {
    body:has(.mud-drawer-responsive.mud-drawer--open) .mud-snackbar-location-bottom-left {
        left: 12px;
        bottom: 12px;
    }

    body:has(.mud-drawer-responsive.mud-drawer--open) .mud-snackbar-location-bottom-left .mud-snackbar {
        width: 216px;
        max-width: 216px;
    }
}

.map-user-menu__who {
    padding: 8px 16px 12px;
    max-width: 280px;
}

.map-user-menu__name {
    font-weight: 600;
}

.map-user-menu__email,
.map-user-menu__roles {
    font-size: 0.875rem;
    opacity: 0.75;
    overflow-wrap: anywhere;
}

/* Figures line up in grids and detail lists (blueprint 07). */
.map-figures {
    font-variant-numeric: tabular-nums;
}

/* Forms (MAP-019): sections side by side on a wide screen, one column on a tablet held upright or a phone. */
.map-form-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
    gap: 16px;
    align-items: start;
}

.map-form-section h2 {
    margin-bottom: 8px;
}

.map-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.map-form-row > * {
    flex: 1 1 180px;
}

.map-form-row > .map-form-row__short {
    flex: 0 1 140px;
}

.map-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.map-error-list {
    margin: 4px 0 0 1.25rem;
    padding: 0;
}

.map-break-words {
    overflow-wrap: anywhere;
}

/* A short heading that reads wrongly split over two lines ("Two-step / sign-in", MAP-030). */
.map-nowrap {
    white-space: nowrap;
}

/* A table with many columns (Users): less room after each cell, so it fits a tablet's width without scrolling inside
   its frame (MAP-030). */
.mud-table.map-table-tight .mud-table-row .mud-table-cell {
    padding-right: 12px;
}

.map-clickable-row {
    cursor: pointer;
}

.map-row-link {
    color: inherit;
    text-decoration: none;
}

.map-row-link:hover,
.map-row-link:focus-visible {
    text-decoration: underline;
}

.map-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 16px;
}

/* Read-only details: label above value on a phone, side by side when there's room. */
.map-facts {
    display: grid;
    grid-template-columns: minmax(0, 12rem) minmax(0, 1fr);
    gap: 8px 16px;
    margin: 0;
}

.map-facts dt {
    color: var(--mud-palette-text-secondary);
}

.map-facts dd {
    margin: 0;
    overflow-wrap: anywhere;
}

@media (max-width: 600px) {
    .map-facts {
        grid-template-columns: minmax(0, 1fr);
        gap: 2px;
    }

    .map-facts dd {
        margin-bottom: 8px;
    }
}

/* The browser's own select for few choices (blueprint 07), drawn like an outlined MudBlazor field. */
.map-native-select label {
    display: block;
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
    margin-bottom: 2px;
}

.map-native-select select {
    width: 100%;
    height: 40px;
    padding: 0 10px;
    font: inherit;
    font-size: 1rem;
    color: var(--mud-palette-text-primary);
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-inputs);
    border-radius: var(--mud-default-borderradius);
}

.map-native-select select:focus {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: -1px;
}

.map-native-select--error select {
    border-color: var(--mud-palette-error);
}

.map-native-select__help {
    font-size: 0.75rem;
    margin: 3px 14px 0;
    color: var(--mud-palette-text-secondary);
}

.map-native-select__help--error {
    color: var(--mud-palette-error);
}

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

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

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0y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IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    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;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Visually hidden, still read by screen readers (the Users table's Actions header, MAP-003). */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* The built-in help (MAP-047, D333): the contents beside the page on a wide screen, above it on a phone. The page is
   the help's Markdown as HTML, so its elements are styled here rather than as MudBlazor components. */
.map-help {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px 32px;
}

@media (min-width: 960px) {
    .map-help {
        grid-template-columns: 15rem minmax(0, 1fr);
    }
}

.map-help__contents ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.map-help__link {
    display: block;
    padding: 4px 8px;
    border-radius: 4px;
    color: inherit;
    text-decoration: none;
}

.map-help__link:hover {
    background: var(--mud-palette-action-default-hover);
}

.map-help__link--current {
    font-weight: 600;
    color: var(--mud-palette-primary);
}

.map-help__page {
    max-width: 46rem;
    line-height: 1.6;
    overflow-wrap: break-word;
}

.map-help__page h1 {
    font-size: 2rem;
    font-weight: 400;
    margin: 0 0 12px;
}

.map-help__page h2 {
    font-size: 1.35rem;
    font-weight: 500;
    margin: 28px 0 8px;
}

.map-help__page h3 {
    font-size: 1.1rem;
    font-weight: 500;
    margin: 20px 0 6px;
}

.map-help__page p,
.map-help__page ul,
.map-help__page ol {
    margin: 0 0 12px;
}

.map-help__page a {
    color: var(--mud-palette-primary);
}

.map-help__page table {
    border-collapse: collapse;
    margin: 0 0 16px;
    display: block;
    overflow-x: auto;
}

.map-help__page th,
.map-help__page td {
    border-bottom: 1px solid var(--mud-palette-lines-default);
    padding: 6px 12px 6px 0;
    text-align: left;
    vertical-align: top;
}

.map-help__page code {
    font-size: 0.9em;
    padding: 1px 4px;
    border-radius: 3px;
    background: var(--mud-palette-background-gray);
}

/* The QA site's sample-data notice (MAP-047): one quiet line above each screen, in QA only. */
.map-sample-data {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin: -8px 0 12px;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.875rem;
    background: var(--mud-palette-warning-lighten, #fff4e5);
    color: var(--mud-palette-text-primary);
}

.map-sample-data a {
    color: inherit;
    font-weight: 500;
}
