html, body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.mud-main-content {
    padding-top: 24px !important;
}

/* header (brand and actions, then the menu on larger screens): sticky and translucent over the scrolled content, full
   width with small margins (blackberry's HeaderToolBar) */
.app-header {
    position: sticky;
    top: 0;
    z-index: var(--mud-zindex-appbar);
    background: color-mix(in srgb, var(--mud-palette-background) 72%, transparent);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border-bottom: 1px solid var(--mud-palette-lines-default);
    color: var(--mud-palette-text-primary);
}

.app-header-progress {
    position: absolute;
    inset: auto 0 0 0;
    height: 2px;
}

/* blazor progress */
.loading-progress {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    width: 100%;
    height: 0.5rem;
    overflow: hidden;
}

.loading-progress-bar {
    height: 100%;
    width: 0;
    background-color: #009688;
    background-image: linear-gradient(
            45deg,
            rgba(255, 255, 255, 0.25) 25%,
            transparent 25%,
            transparent 50%,
            rgba(255, 255, 255, 0.25) 50%,
            rgba(255, 255, 255, 0.25) 75%,
            transparent 75%,
            transparent
    );
    background-size: 1rem 1rem;
    animation: loading-progress-bar-stripes 1s linear infinite;
    transition: width 0.2s ease;
}

.loading-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    box-sizing: border-box;
    /* plain background of the theme (light / dark) behind the animated logo */
    background: #f7f8fa;

    @supports (height: 100dvh) {
        min-height: 100dvh;
    }
}

.loading-logo {
    display: block;
    width: min(40vw, 160px);
    height: auto;
    object-fit: contain;
}

/* stored color mode (blackberry's Theming.js), not only the system one */
html[data-blackberry-theme="dark"] .loading-container {
    background: #16171d;
}

@keyframes loading-progress-bar-stripes {
    from {
        background-position-x: 1rem;
    }
    to {
        background-position-x: 0;
    }
}

/* a message not read yet: marked on its side */
.message-unread {
    border-left: 4px solid var(--mud-palette-primary);
}

/* the line breaks of a message are kept */
.message-body {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
