h1:focus {
    outline: none;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 2000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

/* Layout/PageLayout.razor's flat app bar (also in the startup skeleton) */
.screen-appbar {
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

/*
 * The startup skeleton in index.html. MudThemeProvider defines MudBlazor's variables only once the app runs,
 * so these are copies of Shared/AppTheme.cs's values; index.html sets data-theme, and data-page and data-panel
 * on the map page.
 */
.app-skeleton {
    --mud-palette-appbar-background: #FFFFFF;
    --mud-palette-appbar-text: #12161C;
    --mud-palette-background: #F6F7F4;
    --mud-palette-surface: #FFFFFF;
    --mud-palette-lines-default: #E2E4DF;
    --mud-palette-lines-inputs: #8A8F86;
    --mud-zindex-appbar: 1300;
    --mud-elevation-1: 0px 2px 1px -1px rgba(0,0,0,0.2),0px 1px 1px 0px rgba(0,0,0,0.14),0px 1px 3px 0px rgba(0,0,0,0.12);
    --mud-typography-h6-family: "Bricolage Grotesque", Geist, system-ui, sans-serif;
    --mud-typography-h6-size: 1.125rem;
    --mud-typography-h6-weight: 700;
    --mud-typography-h6-lineheight: 1.6;
    --mud-typography-h6-letterspacing: normal;
    --mud-typography-h6-text-transform: none;
    position: fixed;
    inset: 0;
    background-color: var(--mud-palette-background);
}

html[data-theme="dark"] .app-skeleton {
    --mud-palette-appbar-background: #1A1F26;
    --mud-palette-appbar-text: #F3F4F1;
    --mud-palette-background: #12161C;
    --mud-palette-surface: #1A1F26;
    --mud-palette-lines-default: #2C333C;
    --mud-palette-lines-inputs: #6B727B;
}

html[data-page="map"] .app-skeleton .mud-appbar {
    display: none;
}

/* Blazor sets --blazor-load-percentage while it downloads the app. */
.app-skeleton-progress {
    position: fixed;
    z-index: 1400;
    left: 0;
    top: 0;
    height: 2px;
    width: var(--blazor-load-percentage, 0%);
    background-color: var(--mud-palette-appbar-text);
    opacity: 0.5;
    transition: width 0.1s ease-out;
}

/* As Pages/Home.razor(.css) lays out the map, its panel and the toolbar with the search box (disabled at first);
   the land color is the "light" basemap's earth. */
.app-skeleton-map {
    display: none;
    position: fixed;
    inset: 0;
    background-color: #e2dfda;
}

html[data-page="map"] .app-skeleton-map {
    display: block;
}

/* The "dark" basemap's earth, lightened as in map/map.js */
html[data-theme="dark"] .app-skeleton-map {
    background-color: #2f2f2f;
}

.app-skeleton-panel {
    position: fixed;
    background-color: var(--mud-palette-surface);
}

.app-skeleton-toolbar {
    display: flex;
    gap: 8px;
    align-items: center;
}

html[data-panel="detail"] .app-skeleton-toolbar {
    display: none;
}

.app-skeleton-search,
.app-skeleton-button {
    height: 40px;
    box-sizing: border-box;
    border: 1px solid var(--mud-palette-lines-inputs);
    border-radius: 14px;
    background-color: var(--mud-palette-surface);
}

.app-skeleton-search {
    flex: 1;
}

.app-skeleton-button {
    width: 44px;
    height: 44px;
    border-color: var(--mud-palette-lines-default);
}

@media (max-width: 959.98px) {
    .app-skeleton-panel {
        left: 0;
        right: 0;
        bottom: 0;
        top: 50dvh;
        border-radius: 28px 28px 0 0;
    }

    html[data-panel="new"] .app-skeleton-panel {
        top: 40dvh;
    }

    html[data-panel="detail"] .app-skeleton-panel {
        top: 0;
        border-radius: 0;
    }

    .app-skeleton-toolbar {
        position: fixed;
        top: 12px;
        left: 12px;
        right: 12px;
    }
}

@media (min-width: 960px) {
    .app-skeleton-panel {
        top: 0;
        bottom: 0;
        left: 0;
        width: 420px;
        border-right: 1px solid var(--mud-palette-lines-default);
    }

    .app-skeleton-toolbar {
        padding: 16px 16px 0;
    }
}
