@media (min-width: 768px) {
    ::deep.layout {
        height: 100vh;
        width: 100vw;
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto 1fr;
        grid-template-areas:
            "icon head"
            "nav messagebar"
            "nav main";
        background-color: var(--fill-color);
        color: var(--neutral-foreground-rest);
    }

    ::deep.layout > .aspire-icon {
        grid-area: icon;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: var(--neutral-layer-4);
    }

    ::deep.layout > header {
        grid-area: head;
    }

    ::deep.layout > .fluent-appbar {
        grid-area: nav;
        overflow-y: auto;
        background: var(--neutral-layer-4);
    }

    ::deep.layout > .layout-body-container {
        grid-area: main;
        overflow-x: auto; /* allow horizontal scrolling */
        overflow: auto;
        border-left: 1px solid var(--neutral-stroke-rest);
        display: flex;
        flex: 1;
    }

    ::deep.layout .layout-sidebar-spacer {
        flex: 0 0 auto;
        width: 480px;
    }

    ::deep.layout > .messagebar-container {
        grid-area: messagebar;
        border-top: 1px solid var(--neutral-stroke-rest);
        border-left: 1px solid var(--neutral-stroke-rest);
        display: flex;
    }

    ::deep .header-right {
        margin-left: auto;
    }

    ::deep.layout > header {
        background-color: var(--neutral-layer-4);
        margin-bottom: 0;
    }

    ::deep.layout > header > .header-gutters > fluent-anchor {
        font-size: var(--type-ramp-plus-2-font-size);
    }

    ::deep .aspire-icon fluent-anchor.logo::part(control) {
        padding: 0;
        border: none;
    }

    ::deep .aspire-icon fluent-anchor.logo,
    ::deep .aspire-icon fluent-anchor.logo::part(control),
    ::deep .aspire-icon fluent-anchor.logo::part(content) {
        height: 24px;
        width: 24px;
    }

    ::deep.layout > header > .header-gutters {
        margin: 0;
    }
}

@media (max-width: 768px) {
    ::deep.layout {
        height: 100vh;
        width: 100vw;
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto auto 1fr;
        grid-template-areas:
            "icon head"
            "nav-menu nav-menu"
            "messagebar messagebar"
            "main main";
        background-color: var(--fill-color);
        color: var(--neutral-foreground-rest);
    }

    ::deep.layout > .aspire-icon {
        grid-area: icon;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: var(--neutral-layer-4);
    }

    ::deep.layout > header {
        grid-area: head;
    }

    ::deep.layout > .fluent-appbar {
        grid-area: nav;
        overflow-y: auto;
        background: var(--neutral-layer-4);
    }

    ::deep.layout > .layout-body-container {
        grid-area: main;
        overflow-x: auto; /* allow horizontal scrolling */
        overflow: auto;
        border-left: 1px solid var(--neutral-stroke-rest);
    }

    ::deep.layout > .messagebar-container {
        grid-area: messagebar;
        border-top: 1px solid var(--neutral-stroke-rest);
        border-left: 1px solid var(--neutral-stroke-rest);
        display: flex;
    }

    ::deep .header-right {
        margin-left: auto;
    }

    ::deep.layout > .aspire-icon {
        padding-left: 15px;
        background-color: var(--neutral-layer-4);
    }

    ::deep.layout > .aspire-icon fluent-anchor {
        margin-left: 5px;
    }

    ::deep.layout > .aspire-icon .navigation-button {
        border: 1px solid #a8aeb3;
    }

    ::deep.layout > header {
        background-color: var(--neutral-layer-4);
        margin-bottom: 0;
    }

    ::deep.layout > header > .header-gutters > fluent-anchor {
        font-size: var(--type-ramp-plus-2-font-size);
    }

    ::deep .aspire-icon fluent-anchor.logo::part(control) {
        padding: 0;
        border: none;
    }

    ::deep .aspire-icon fluent-anchor.logo,
    ::deep .aspire-icon fluent-anchor.logo::part(control),
    ::deep .aspire-icon fluent-anchor.logo::part(content) {
        height: 24px;
        width: 24px;
    }

    ::deep.layout > header > .header-gutters {
        margin-left: 0;
    }
}

::deep .desktop-nav-menu > .fluent-appbar-item > .fluentui-counterbadge-container > a > .stack-vertical {
    /* FluentAppBarItems have a default width. However, we have a wide range of widths
       in content depending on the language (ie, from traces to seguimientos).
       Remove the default horizontal padding to allow for more text  */
    padding-left: 0;
    padding-right: 0;
}

::deep.layout > header > .header-gutters > fluent-button[appearance=stealth]:not(:hover)::part(control),
::deep.layout > header > .header-gutters > fluent-anchor[appearance=stealth]:not(:hover)::part(control),
::deep.layout > header > .header-gutters > fluent-anchor[appearance=stealth].logo::part(control),
::deep.layout > .aspire-icon fluent-anchor[appearance=stealth].logo::part(control) {
    background-color: var(--neutral-layer-4);
}

::deep .header-gutters .header-button {
    height: 100%;
    display: block;
}

::deep .header-gutters .header-button::part(control) {
    width: 50px;
    height: 100%;
    border-radius: 0;
    background-color: var(--neutral-fill-secondary-rest);
}

::deep.layout > header > .header-gutters > .header-button-selected:not(:hover)::part(control) {
    background-color: var(--chat-background-color) !important;
}

#blazor-error-ui {
    background: var(--highlight-bg);
    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;
    color: var(--error-ui-foreground-color);
}

#blazor-error-ui a {
    color: var(--error-ui-accent-foreground-color);
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
    text-decoration: none;
}
