/* Css reboot normalizes base css styling so that behaviour is same over different browsers */
@import '/_content/Microsoft.FluentUI.AspNetCore.Components/css/reboot.css';

/* Hide any web components that haven't been started */
:not(:defined), .before-started {
    visibility: hidden;
}

body {
    height: 100%;
    overflow: hidden;
}

.siteheader {
    background-color: var(--neutral-layer-4) !important;
    border-bottom: calc(var(--stroke-width) * 2px) solid var(--accent-fill-rest);
    margin-bottom: 0 !important;
}

    .siteheader .logo {
        width: 108px;
        height: 23px;
        grid-column: 1;
    }

    .siteheader .links {
        padding-right: 10px;
        display: flex;
        align-items: center;
    }

    .siteheader .notifications {
        padding-right: 10px;
        display: flex;
        align-items: center;
    }

    .siteheader .settings {
        padding-right: 24px;
        display: flex;
        align-items: center;
    }

[dir="rtl"] .siteheader .settings {
    padding: 0 0 0 20px;
}

[dir="rtl"] .siteheader .notifications {
    padding: 0 0 0 20px;
}

.body-stack {
    flex-direction: row;
}

.footer {
    display: flex !important;
    flex-direction: row !important;
    background: var(--neutral-layer-4);
    color: var(--neutral-foreground-rest) !important;
    padding: 10px 10px;
    margin-top: 0px !important;
}

    .footer .version a {
        color: var(--neutral-foreground-rest);
        text-decoration: none;
    }

        .footer .version a:focus {
            outline: 1px dashed;
            outline-offset: 3px;
        }

        .footer .version a:hover {
            text-decoration: underline;
        }


nav.sitenav {
    background-color: var(--neutral-layer-1);
    padding: 1.5rem 1rem;
    height: calc(100dvh - 90px);
    width: auto;
    overflow-y: auto;
}

nav h2 {
    font-size: var(--type-ramp-plus-1-font-size);
    line-height: var(--type-ramp-plus-1-line-height);
    padding: 15px 0;
    margin: 0;
    pointer-events: none;
}

nav h3 {
    font-size: var(--type-ramp-base-font-size);
    line-height: var(--type-ramp-minus-1-line-height);
    padding: 10px 0;
    margin: 0;
    pointer-events: none;
}


nav fluent-anchor {
    width: 100%;
    color: var(--fill-color);
}

    nav fluent-anchor::part(control) {
        justify-content: start;
        background: var(--accent-fill-rest);
    }


.fluent-nav-link.notactive .fluent-nav-text {
    font-weight: 600 !important;
}

.content {
    display: flex;
    background-color: var(--neutral-layer-1);
}

article {
    padding: 1.5rem 1rem;
    border-right: 1px solid var(--neutral-stroke-divider-rest);
    margin: 0 0;
    overflow-x: hidden;
    transition: all 300ms ease-in-out;
    width: calc(100% - 18rem);
}

aside {
    padding: 1.5rem 1rem;
    top: 0px;
    height: 100vh;
    position: sticky;
    width: 18rem;
}

#menu-toggle {
    display: none;
}

.menu-icon {
    display: none;
}

#menu-toggle:checked > nav {
    width: 0px;
}

[dir="rtl"] #menu-toggle:checked ~ nav {
    right: 0px;
}

#color {
    margin-right: 10px;
    margin-left: 0;
}

[dir="rtl"] #color {
    margin-left: 10px;
    margin-right: 0;
}


label {
    color: var(--neutral-foreground-rest);
    cursor: pointer;
}

.shell, .sourceCode {
    background: var(--neutral-stroke-layer-rest);
    padding: 7px;
}

code {
    background: var(--neutral-stroke-layer-rest);
}

.demopanel {
    border: 1px dashed var(--accent-fill-rest);
    padding: 5px;
}

.highlighted-row {
    background-color: var(--neutral-fill-secondary-hover);
}


#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;
    margin: 20px 0;
    color: var(--neutral-foreground-rest);
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    border: 1px dashed var(--error);
    background: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0nNDgnIGhlaWdodD0nNDgnIHhtbG5zPSdodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZycgeG1sbnM6eGxpbms9J2h0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsnIG92ZXJmbG93PSdoaWRkZW4nIGZpbGw9JyNCQzJGMzInPjxwYXRoIGQ9J00yNCA0YTIwIDIwIDAgMSAwIDAgNDAgMjAgMjAgMCAwIDAgMC00MFptMCA5Yy42OSAwIDEuMjUuNTYgMS4yNSAxLjI1djEyLjVhMS4yNSAxLjI1IDAgMSAxLTIuNSAwdi0xMi41YzAtLjY5LjU2LTEuMjUgMS4yNS0xLjI1Wm0wIDIxYTIgMiAwIDEgMSAwLTQgMiAyIDAgMCAxIDAgNFonPjwvcGF0aD48L3N2Zz4=") no-repeat 1rem/1.8rem;
    padding: 1rem 1rem 1rem 3.7rem;
}

    .blazor-error-boundary::before {
        content: "An error has occurred: "
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: var( --neutral-fill-layer-rest);
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

@media (max-width: 767px) {

    .siteheader {
        grid-area: header;
        grid-template-columns: 150px 1fr;
        align-items: center;
        justify-content: flex-start;
    }

        .siteheader .logo {
            width: 160px;
            height: 23px;
            padding: 0 25px;
        }


    .body-stack {
        flex-direction: column !important;
    }

    nav.sitenav {
        display: none;
        width: 100%;
        height: calc(100dvh - 50px);
        overflow-y: auto;
    }

    .menutoggle {
        width: 100%;
    }

    .menu-icon {
        z-index: 10;
        display: block;
        visibility: visible;
        position: absolute;
        top: 15px;
        right: 20px;
    }

    #menu-toggle ~ nav {
        display: none;
    }

    #menu-toggle:checked ~ nav {
        display: block;
    }

    #menu-toggle ~ article {
        display: block;
    }

    #menu-toggle:checked ~ article {
        display: none;
    }

    .content {
        flex-direction: column;
    }

    article {
        padding-top: 0px;
        width: 100%;
    }

    aside {
        padding: 1em 0.75em;
        width: 100%;
    }

    .footer {
        display: grid;
        grid-template-columns: 10px auto 10px;
    }

        .footer .version {
            grid-column: 2;
            justify-content: start;
        }

        .footer .copy {
            grid-column: 2;
            grid-row: 2;
            justify-self: end;
        }


    @media screen and (max-width: 767px) and (orientation: landscape) {

        nav {
            padding: 25px 40px;
        }

            nav ul {
                margin: 0 0;
            }

                nav ul li {
                }
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    fluent-select::part(control) {
        width: 150px;
    }

    aside {
        padding: 1.5em 0.75em 1em 0.75em;
        width: 12rem;
    }

    article {
        padding-top: 0px;
        width: 100%;
    }
}


/* Surface Duo specific styling */
@media (horizontal-viewport-segments: 2) {

    .siteheader {
        grid-area: header;
        display: grid;
        grid-template-columns: 150px calc(env(viewport-segment-width 0 0) - 160px) 1fr;
        grid-template-rows: 1fr;
        align-items: center;
        justify-content: flex-start;
        padding: 12px 0;
        background-color: var(--neutral-layer-4);
    }

        .siteheader a {
            padding: 0px 15px;
            color: var(--neutral-foreground-rest);
        }

        .siteheader .logo {
            grid-column: 1;
            width: 108px;
            height: 23px;
            padding: 0 30px;
        }

    main {
        display: grid;
        grid-template-columns: env(viewport-segment-width 0 0) 1fr;
        grid-template-rows: repeat(0, 1fr);
    }

    nav {
        grid-column: 1;
        width: env(viewport-segment-width 0 0) !important;
    }

    .content {
        display: grid;
        grid-template-columns: auto;
    }

    aside {
        grid-area: 2 / 2 / 3 / 3;
        padding: 1.5em 0.75em 1em 0.75em;
        margin-inline-start: calc(env(viewport-segment-left 1 0) - env(viewport-segment-right 0 0));
        hinge width margin-inline-end: calc(100% - env(viewport-segment-left 1 0));
        width: auto;
    }

    article {
        grid-area: 1 / 2 / 2 / 3;
        padding-top: 0px;
        margin-inline-start: calc(env(viewport-segment-left 1 0) - env(viewport-segment-right 0 0));
        hinge width margin-inline-end: calc(100% - env(viewport-segment-left 1 0));
        width: auto;
    }
}



@media (min-width: 800px) {
    .fluent-dialog-main {
        --dialog-width: 340px;
    }
}


@media (max-width: 480px) {
    .fluent-dialog-main {
        --dialog-width: 100vw;
    }
}
