/* Self-hosted fonts (SIL Open Font License, see wwwroot/fonts/OFL-*.txt): latin subset, one variable file per style. */
@font-face
{
    font-family: "Public Sans";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/PublicSans-Variable.woff2") format("woff2");
}

@font-face
{
    font-family: "Public Sans";
    font-style: italic;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/PublicSans-Italic-Variable.woff2") format("woff2");
}

html, body
{
    min-height: 100%;
}

mark
{
    padding: 0px;
    background-color: yellow;
}

code
{
    font-family: 'Cascadia Code', Consolas, Courier, monospace;
    color: var(--mud-palette-primary);
    background-color: var(--mud-palette-primary-hover);
    border-radius: 2px;
    padding: 2px 5px;
}

pre
{
    font-family: 'Cascadia Code', Consolas, Courier, monospace;
    line-height: 1.4;
    /* Long lines scroll inside the block instead of widening the page. */
    overflow-x: auto;
}

ul, ol
{
    list-style-position: inside !important;
    margin: 10px 0px;
}

.text-center
{
    text-align: center !important;
}

.text-right
{
    text-align: right !important;
}

.text-multiline
{
    white-space: pre-wrap !important;
}

.text-bold
{
    font-weight: bold !important;
}

.hover-shadow:hover
{
    box-shadow: 0 0 16px rgba(0,0,0,0.2);
}

.no-wrap
{
    white-space: nowrap !important;
}

.main-content
{
    min-height: 100vh;
}

.content-wrapper
{
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--mud-appbar-height));
}

.page-content
{
    flex: 1;
    padding: 8px 24px;
}

.footer
{
    margin-top: auto;
    border-top: 1px solid var(--mud-palette-divider);
    background: var(--mud-palette-surface);
    flex-shrink: 0;
    padding: 12px 24px;
    font-size: 0.80rem;
    color: var(--mud-palette-text-secondary);
}

.app-bar
{
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* The logomark keeps a clear space of half its height on each side, as the brand guideline requires. */
.app-brand
{
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    margin-left: 14px;
}

.app-brand-logomark
{
    height: 28px;
    width: auto;
    flex-shrink: 0;
}

.app-brand-divider
{
    width: 1px;
    height: 24px;
    flex-shrink: 0;
    background-color: rgba(255, 255, 255, 0.28);
}

.app-brand-name
{
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-family: var(--mud-typography-h6-family);
    font-weight: 600;
    font-size: 1.25rem;
}

.app-drawer
{
    border-right: 1px solid var(--mud-palette-lines-default);
}

.account-activator
{
    padding: 4px !important;
}

.account-avatar
{
    width: 32px;
    height: 32px;
    font-size: 0.875rem;
}

.account-avatar-large
{
    width: 40px;
    height: 40px;
    font-size: 1rem;
}

.account-avatar,
.account-avatar-large
{
    font-family: var(--mud-typography-h6-family);
    font-weight: 700;
}

.account-menu-header
{
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 280px;
    padding: 10px 16px 12px;
}

.account-menu-names
{
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.account-menu-display-name
{
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-family: var(--mud-typography-h6-family);
    font-weight: 600;
}

.account-menu-username
{
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

.account-menu-logout
{
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

    .account-menu-logout:hover,
    .account-menu-logout:focus-visible
    {
        background-color: var(--mud-palette-action-default-hover);
    }

.icon-button-copy-value
{
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    justify-content: center;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--mud-default-borderradius);
    background-color: var(--mud-palette-surface);
    color: var(--mud-palette-action-default);
    cursor: pointer;
}

    .icon-button-copy-value:hover
    {
        background-color: var(--mud-palette-action-default-hover);
    }

    .icon-button-copy-value .icon-button-copy-value-done,
    .icon-button-copy-value.is-copied .icon-button-copy-value-copy
    {
        display: none;
    }

    .icon-button-copy-value.is-copied .icon-button-copy-value-done
    {
        display: inline-block;
    }

    .icon-button-copy-value.is-copied
    {
        border-color: var(--mud-palette-success);
        background-color: color-mix(in srgb, var(--mud-palette-success) 12%, transparent);
        color: var(--mud-palette-success-darken);
    }

/* Announced by screen readers but not shown. */
.icon-button-copy-value-status
{
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* LayoutAuth: cards on the brand gradient. The colors come from the theme so a rebrand only changes ThemeFor. */
.auth-layout
{
    position: relative;
    min-height: 100dvh;
    /* clip, not hidden: the faint mark overhangs the edge, and a hidden overflow can still be scrolled
       sideways when the browser brings a focused field into view after the viewport narrows. */
    overflow: clip;
    background: linear-gradient(90deg, var(--mud-palette-appbar-background) 0%, var(--mud-palette-primary) 100%);
}

.auth-layout-mark
{
    position: absolute;
    top: 6%;
    right: -6%;
    width: min(66vw, 960px);
    height: auto;
    opacity: 0.06;
    pointer-events: none;
    user-select: none;
}

.auth-layout-content
{
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 72px 16px 24px;
}

.auth-card
{
    width: 100%;
    max-width: 440px;
    box-sizing: border-box;
    padding: 40px 40px 32px;
    border-radius: 16px;
    background-color: var(--mud-palette-surface);
    box-shadow: 0 24px 60px rgba(20, 0, 30, 0.35);
    color: var(--mud-palette-text-primary);
}

.auth-card-wide
{
    max-width: 880px;
}

/* The padding keeps the logo's clear space free of other elements. */
.auth-card-logo
{
    display: block;
    width: fit-content;
    margin: 0 auto;
    padding: 18px;
}

    .auth-card-logo img
    {
        display: block;
        width: 200px;
        height: auto;
    }

.auth-card-application-name
{
    margin-top: 4px;
    text-align: center;
    font-family: var(--mud-typography-h1-family);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--mud-palette-appbar-background);
}

.auth-card-title
{
    margin: 6px 0 28px;
    text-align: center;
    font-family: var(--mud-typography-body1-family);
    font-weight: 400;
    font-size: 1rem;
    color: var(--mud-palette-text-secondary);
}

.auth-card-section-title
{
    margin: 0 0 14px;
    font-family: var(--mud-typography-h6-family);
    font-weight: 600;
    font-size: 1rem;
    color: var(--mud-palette-appbar-background);
}

.auth-card-links
{
    display: flex;
    justify-content: center;
}

/* The W3C trace identifier has no spaces; break it anywhere so it wraps evenly inside the card. */
.error-request-id
{
    display: block;
    margin-top: 4px;
    word-break: break-all;
}

.auth-checkbox
{
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--mud-palette-primary);
}

.auth-layout .footer
{
    margin-top: 8px;
    padding: 0;
    border-top: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
}

    .auth-layout .footer > .mud-stack
    {
        justify-content: center;
    }

    .auth-layout .footer .footer-divider
    {
        border-color: rgba(255, 255, 255, 0.45);
    }

.demo-account
{
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 12px;
    padding: 12px 14px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 10px;
}

.demo-account-header
{
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 2px 8px;
    padding-bottom: 4px;
}

.demo-account-name
{
    font-family: var(--mud-typography-h6-family);
    font-weight: 600;
}

.demo-account-email
{
    overflow-wrap: anywhere;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

.demo-account-row
{
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
}

.demo-account-label
{
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

.demo-account-value
{
    padding: 0;
    overflow-wrap: anywhere;
    background: none;
    color: var(--mud-palette-text-primary);
    font-size: 0.875rem;
}

@media (max-width: 599.98px)
{
    .auth-layout-mark
    {
        top: -30px;
        right: -120px;
        width: 420px;
    }

    .auth-layout-content
    {
        padding: 24px 16px;
    }

    .auth-card
    {
        padding: 28px 20px 24px;
    }

    .auth-card-logo
    {
        padding: 14px;
    }

        .auth-card-logo img
        {
            width: 168px;
        }

    .auth-card-application-name
    {
        font-size: 1.375rem;
    }

    .demo-account-row
    {
        grid-template-columns: 76px minmax(0, 1fr) auto;
    }

    .icon-button-copy-value
    {
        width: 44px;
        height: 44px;
    }

    .footer-divider
    {
        display: none !important;
    }

    .app-brand
    {
        gap: 12px;
        margin-left: 12px;
    }

    .app-brand-logomark
    {
        height: 24px;
    }

    .app-brand-divider
    {
        height: 22px;
    }

    .app-brand-name
    {
        font-size: 1.0625rem;
    }

    .page-content
    {
        padding-inline: 16px;
    }

    .footer
    {
        padding-inline: 16px;
    }
}
