/* The frame around every page: the sidebar on the left once signed in,
   the page on the right, and the banners above the page. */

.app-shell {
    display: flex;
    height: 100vh;
    height: 100dvh;
}

.app-main {
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* Whatever the address shows. It scrolls by itself; a room fills it and
   scrolls its own timeline instead. */
.page {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Shown when the app fails. What failed is behind "What happened". */
#blazor-error-ui {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 30;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-5);
    max-height: 70vh;
    overflow-y: auto;
    background: var(--color-danger);
    color: var(--color-on-accent);
    padding: var(--space-6) var(--space-8);
}

#blazor-error-ui a {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
}

#blazor-error-ui button {
    background: var(--color-on-accent);
    color: var(--color-text);
    padding: var(--space-2) var(--space-6);
}

#blazor-error-ui pre {
    flex-basis: 100%;
    margin: 0;
    padding: var(--space-5);
    border-radius: var(--radius-m);
    background: var(--color-on-accent);
    color: var(--color-text);
    font-size: var(--text-xs);
    white-space: pre-wrap;
    word-break: break-word;
    user-select: text;
}

.banner {
    display: flex;
    gap: var(--space-6);
    align-items: center;
    flex-wrap: wrap;
    padding: var(--space-5) var(--space-7);
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface);
    font-size: var(--text-s);
}

.banner.ask {
    border-left: 4px solid var(--color-accent);
}

.banner.wait {
    border-left: 4px solid var(--color-warning);
}

/* The sidebar is a drawer on a phone; these two open and close it. */
.drawer-toggle, .drawer-shade {
    display: none;
}

@media (max-width: 720px) {
    .drawer-toggle {
        display: inline-flex;
        position: fixed;
        top: calc((var(--bar-height) - var(--control-size)) / 2);
        left: var(--space-5);
        z-index: 3;
    }

    .drawer-shade {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 4;
        background: var(--color-scrim);
    }
}
