/* Demo (spec 052 rules 3, 4, 6): the only two elements the signed-in app does not have.
   Everything else on the demo screens is styled by the app's own stylesheets. */

/* The side menu renders both states; NavMenu re-renders instead (spec 052 rule 2). */
div[data-demo-nav="expanded"],
.nav-footer > div[data-demo-nav="collapsed"] {
    display: contents;
}

.nav-wrapper:not(.nav-collapsed) [data-demo-nav="collapsed"],
.nav-wrapper.nav-collapsed [data-demo-nav="expanded"] {
    display: none !important;
}

.demo-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem 1rem;
    margin: 0 0 1rem;
    padding: 0.7rem 1rem;
    border: 1px solid;
}

.demo-banner p {
    flex: 1 1 12rem;
    margin: 0;
    font-weight: 600;
    font-size: 0.92rem;
}

.demo-banner .home-cta {
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .demo-banner {
        flex-wrap: nowrap;
        gap: 0.6rem;
        margin-bottom: 0.5rem;
        padding: 0.5rem 0.6rem 0.5rem 0.8rem;
    }

    .demo-banner p {
        font-size: 0.78rem;
        line-height: 1.3;
    }

    .demo-banner p {
        flex: 1 1 0;
        min-width: 0;
        font-size: 0.72rem;
    }

    .demo-banner .home-cta {
        padding: 0.4rem 0.55rem;
        font-size: 0.72rem;
        min-height: 0;
        max-width: 7.5rem;
        white-space: normal;
        text-align: center;
        line-height: 1.2;
    }
}

.demo-locked {
    position: fixed;
    left: 50%;
    bottom: calc(1rem + var(--app-viewport-bottom-inset, 0px));
    z-index: 2500;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: max-content;
    max-width: calc(100vw - 2rem);
    padding: 0.7rem 0.8rem 0.7rem 1rem;
    border: 1px solid;
    font-size: 0.9rem;
}

.demo-locked[hidden] {
    display: none;
}

/* Spec 212: "Create account" is a button in the notice, not an underlined link. */
.demo-locked .demo-locked-cta {
    width: auto;
    margin: 0;
    padding: .4rem .85rem;
    font-weight: 700;
    white-space: nowrap;
    text-decoration: none;
}

.demo-locked-close {
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 1.2rem;
    line-height: 1;
    padding: 0.1rem 0.3rem;
    cursor: pointer;
}

/* Spec 251: on a narrow phone the text and the cross share the first row and the button goes below, so nothing leaves the screen. */
@media (max-width: 420px) {
    .demo-locked {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        row-gap: 0.6rem;
    }

    .demo-locked > span {
        grid-column: 1;
        grid-row: 1;
    }

    .demo-locked-close {
        grid-column: 2;
        grid-row: 1;
        align-self: start;
    }

    .demo-locked .demo-locked-cta {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-self: start;
    }
}
