html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    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;
}

.content {
    padding-top: 1.1rem;
}

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 {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) 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;
}

/* History Page's MudSelect */
.history-root {
    position: relative;
    width: 300px;
}

.history-toggle {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 5;
    width: 300px;
    display: flex;
    align-items: center;
    gap: 6px;
}

 .history-select-wrapper {
    display: flex;
    align-items: flex-end;
    gap: .4rem;
}

.history-select {
    width: 260px;
    min-width: 260px;
    max-width: 260px;
}

    .history-select .mud-select-input > .mud-input-slot {
        max-width: 100%;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        display: block;
    }

    .history-select .mud-input-control {
        width: 100%;
    }

/* ============================= */
/* Mobile adjustments */
/* ============================= */
@media (max-width: 960px) {

    .history-root {
        position: static;
        width: 100%;
    }

    .history-toggle {
        position: sticky;
        top: 0;
        left: 0;
        width: 100%;
        padding: 12px 16px;
        background-color: white;
        z-index: 20;
        box-shadow: 0 2px 6px rgba(0,0,0,0.08);
        border-bottom: 1px solid #eee;
    }

    .history-select-wrapper {
        width: 100%;
        align-items: flex-end;
        gap: .4rem;
    }
}

/* Frame Profile Requests Notification button on the Side sBar */
.nav-badge {
    background-color: var(--mud-palette-info);
    color: white;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
}


    .nav-badge.clickable {
        cursor: pointer;
        transition: transform 0.1s ease;
    }

        .nav-badge.clickable:hover {
            transform: scale(1.05);
        }

        .nav-badge.clickable:active {
            transform: scale(0.95);
        }

/* Top bar. Everything in it — menu, wordmark, staging label, admin bell,
   theme roller, account gear or the logged-out menu — has to stay on screen
   from about 320px up. The staging label itself is in MainLayout.razor. */
.staging-chip {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    margin-inline-start: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background-color: var(--mud-palette-error);
    color: var(--mud-palette-error-text);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.4;
    white-space: nowrap;
}

/* One line, and it does not shrink. A wrapping heading would grow the bar
   or spill out of it, and shrinking it would clip the words. */
.staging-banner-full {
    white-space: nowrap;
    flex-shrink: 0;
}

/* Default icon buttons are 48px wide. On a very narrow phone, menu + logo +
   staging chip + bell + theme roller + gear do not fit at that size. Below
   the sm breakpoint the buttons tighten. Pop-up menus are drawn outside the
   bar, so this does not shrink the account menu or the logged-out menu. */
@media (max-width: 599.98px) {
    .tuning-hub-appbar .mud-icon-button {
        padding: 3px;
    }

    .tuning-hub-appbar .mud-icon-button .mud-icon-root {
        font-size: 1.125rem;
    }

    /* Logged-in pages. Desktop is left alone: these rules start under 600px.
       A grid or table that is wider than the phone scrolls inside the page
       instead of pushing the whole site sideways. */
    .mud-main-content {
        min-width: 0;
        max-width: 100%;
    }

    .mud-main-content > .mud-container {
        padding-left: 8px;
        padding-right: 8px;
    }

    .mud-data-grid,
    .mud-table-container,
    .phone-hscroll {
        overflow-x: auto;
        max-width: 100%;
    }

    .mud-toolbar,
    .mud-button-group {
        flex-wrap: wrap;
    }

    .mud-grid-item {
        min-width: 0;
    }
}

/* Desktop staging bar. Black, with white and yellow words, so it is not
   another red heading sitting in the orange app bar. Phones keep .staging-chip.
   The bar is only rendered when the site name contains Staging. */
.staging-banner-bar {
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    width: 100%;
    background: #000;
    color: #fff;
    padding: 10px 16px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.staging-banner-title {
    color: #fff;
    font-size: 1.15rem;
}

.staging-banner-detail {
    color: #ffe14a;
    font-size: 1.05rem;
}

/* The error bar lives in App.razor. The copy of these rules in
   MainLayout.razor.css is scoped to the layout and does not reach it.
   The reload control is a button so it cannot follow an empty link back to "/". */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

#blazor-error-ui .reload {
    margin-left: 0.75rem;
    background: none;
    border: none;
    color: #006bb7;
    cursor: pointer;
    font: inherit;
    padding: 0;
    text-decoration: underline;
}