@import '/_content/Microsoft.FluentUI.AspNetCore.Components/css/reboot.css';

body {
    height: 100%;
    overflow: hidden;
}

    body:has(.loading-progress)::after {
        content: "";
        background-image: url("/logo.svg");
        background-position: right bottom;
        background-size: 50%;
        background-repeat: no-repeat;
        opacity: 0.2;
        top: 0;
        left: 0;
        bottom: 15px;
        right: 15px;
        position: absolute;
        z-index: -1;
    }

blockquote p:last-child {
    margin-bottom: 0;
}

.home div[sm="4"], .home div[sm="6"], .home div[sm="8"] {
    border-bottom: 1px solid var(--neutral-stroke-divider-rest) !important;
}

.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 .search {
    display: flex;
    align-items: center;
    padding-right: 20px;
}

.siteheader .links {
    padding-right: 10px;
    display: flex;
    align-items: center;
}

.siteheader .notifications {
    display: flex;
    align-items: center;
}

.siteheader .settings {
    padding-right: 6px;
    display: flex;
    align-items: center;
    margin-left: 0;
    margin-right: 10px;
}

[dir="rtl"] .siteheader .settings {
    padding: 0 0 0 6px;
    margin-left: 10px;
    margin-right: 0;
}

[dir="rtl"] .siteheader .search {
    padding-left: 20px;
    padding-right: 0;
}

[dir="rtl"] .siteheader .links {
    padding-left: 10px;
}

.search-result-icon {
    vertical-align: middle;
}

.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 {
    padding: 1.5rem 1rem;
    height: calc(100dvh - 90px);
    width: 20rem;
    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;
}

ul.news {
    padding-left: 0;
    list-style-type: none;
}

ul.news li {
    display: flex;
    gap: calc(var(--design-unit) * 2px);
    align-items: center;
    padding-bottom: calc(var(--design-unit) * 2px);
}

.news .calendar {

}

.news a {
    font-size: var(--type-ramp-plus-1-font-size);
    line-height: var(--type-ramp-plus-1-line-height);
    font-weight: 600;
    text-decoration: none;
}


article {
    padding: 1.5rem 1rem;
    border-right: 1px solid var(--neutral-stroke-divider-rest);
    margin: 0 0;
    width: calc(100% - 18rem);
}

aside {
    padding: 1.5rem 1rem;
    top: 0px;
    height: 100vh;
    position: sticky;
    width: 18rem;
    max-height: calc(100dvh - 90px);
    overflow-y: auto;
}

#navmenu-toggle {
    display: none;
}

.navmenu-icon {
    display: none;
}

#navmenu-toggle:checked > nav {
    width: 0px;
}

[dir="rtl"] #navmenu-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 {
    background-color: var(--accent-stroke-control-active);
}

.highlighted > td {
    color: var(--neutral-fill-inverse-rest);
}


kbd {
    padding: 0.10rem 0.25rem;
    font-size: 0.875em;
    color: var(--neutral-foreground-rest);
    background-color: var(--neutral-fill-secondary-rest);
    border-radius: 0.25rem;
    border: 1px solid var(--accent-fill-rest);
}

#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: "
}

/* Animate the blazor FluentUI during the loading */
.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

#logo-anim path:nth-child(1) {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    stroke-width: 1.25em;
    fill: #682A7B;
    fill-opacity: 0.1;
    animation: line-anim 2s ease forwards, fill-anim 1s ease forwards 1.5s;
}

#logo-anim path:nth-child(2) {
    stroke-width: 1.25em;
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    fill: #4A81C3;
    fill-opacity: 0.1;
    animation: line-anim 2s ease forwards, fill-anim 3s ease forwards 1.2s;
}

@keyframes line-anim {
    to {
        stroke-dashoffset: 0;
        stroke-width: 0;
    }
}

@keyframes fill-anim {
    from {
        fill-opacity: 0.1;
    }
    to {
        fill-opacity: 1;
    }
}

.loading-progress-text {
    text-align: center;
    font-weight: bold;
    font-size: 1.5em;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading...");
}

.loading-info {
    margin-top: 1em;
    text-align: center;
    font-size: 1.5em;
}

    .loading-info a {
        color: var(--neutral-foreground-rest);
    }

        .loading-info a:hover {
            color: var(--neutral-foreground-hover);
        }

@media (max-width: 767px) {

    .siteheader {
        grid-area: header;
        grid-template-columns: 150px 1fr;
        align-items: center;
        justify-content: flex-start;
    }

    .siteheader .search {
        display: none;
    }

    .siteheader .logo {
        width: 160px;
        height: 23px;
        /*padding: 0 25px;*/
    }


    .body-stack {
        flex-direction: column !important;
    }

    nav.sitenav {
        width: 100%;
        height: calc(100dvh - 50px);
    }

    .navmenu {
        width: 100%;
    }

    #navmenu-toggle {
        appearance: none;
    }

    .navmenu-icon {
        cursor: pointer;
        z-index: 10;
        display: block;
        position: absolute;
        top: 15px;
        left: unset;
        right: 20px;
        width: 20px;
        height: 20px;
        border: none;
    }

    [dir="rtl"] .navmenu-icon {
        left: 20px;
        right: unset
    }

    #navmenu-toggle ~ nav {
        display: none;
    }

    #navmenu-toggle:checked ~ nav {
        display: block;
    }

    #navmenu-toggle ~ article {
        display: block;
    }

    #navmenu-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-self: 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;
        }
    }
}

@media (min-width: 768px) and (max-width: 1279px) {
    fluent-select::part(control) {
        width: 150px;
    }

    .content {
        flex-direction: column;
    }

    aside {
        padding: 1.5em 0.75em 1em 0.75em;
        width: 100%;
        height: 100% !important;
        max-height: 100% !important;
    }

    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;
    }
}

/*  Responvive Youtube Video

    <div class="youtube-responsive">
      <iframe src="https://www.youtube.com/embed/lUZ5mrg2Q8k" frameborder="0" allowfullscreen></iframe>
    </div>
*/
.youtube-responsive {
    position: relative;
    height: 0;
    padding-top: 56%;
    overflow: hidden;
    max-width: 100%;
}

.youtube-responsive iframe,
.youtube-responsive object,
.youtube-responsive embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.youtube-responsive .fluid-vids {
    position: initial !important
}

.youtube-title {
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    min-height: 24px;
}

.youtube-thumbnail {
    position: relative;
    overflow: hidden;
    max-width: 100%;
}

.youtube-thumbnail img {
    width: 100%;
}


@media print {
    pre, code {
        white-space: pre-wrap !important;
        word-wrap: break-word !important;
    }

    body {
        overflow: visible !important;
        height: auto !important;
    }

    .body-content {
        overflow: visible !important;
        max-height: 100% !important;
    }

    h2:nth-of-type(n+2) {
        page-break-before: always !important;
    }


    h3, h4, h5, h6 {
        page-break-after: avoid !important;
    }

    fluent-tab-panel {
        page-break-inside: avoid !important;
    }

    .navmenu, .siteheader, aside {
        visibility: hidden !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .layout > footer {
        visibility: hidden !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    a {
        text-decoration: none;
        color: black;
    }

    a::after {
        content: " (" attr(href) ")";
        font-size: 12px;
        color: #555;
    }

    .youtube-title {
        font-weight: bold;
        font-size: 16pt;
        margin-bottom: 5px;
    }

    .youtube-responsive {
        display: none !important; /* Hide embedded videos */
    }

    fluent-tab-panel {
        display: block !important; /* Make all tab panels visible */
        visibility: visible !important;
        page-break-inside: avoid !important;
    }

    fluent-tab-panel[hidden] {
        display: block !important; /* Override hidden attribute */
    }

    button, .FluentButton {
        display: none !important;
    }

    article {
        padding: 0 !important;
        border-right: hidden !important;
    }

    .video-link {
        display: block;
        font-size: 12pt;
        color: black;
    }

    img {
        width: auto !important; /* Shrinks oversized images */
        max-height: 250px !important; /* Limits vertical size */
        display: block; /* Prevents inline scaling issues */
    }
}


@media screen {
    .video-link {
        display: none;
    }
}
