/* Notice bar above the panel */
.demo-notice {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.25rem 1.5rem;
    padding: 0.4rem 1rem;
    font-size: 0.8125rem;
    color: white;
    background: rgb(17 24 39);
}

.demo-notice a {
    color: rgb(253 186 116);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.demo-notice-links {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem 1rem;
}

/* On a phone the links wrap between links, not inside one */
.demo-notice-links a {
    white-space: nowrap;
}

.demo-notice a.demo-notice-buy {
    color: white;
    font-weight: 600;
}

.demo-notice-lang select {
    padding: 0.1rem 1.6rem 0.1rem 0.5rem;
    font-size: 0.8125rem;
    color: white;
    background-color: rgb(31 41 55);
    border: 1px solid rgb(75 85 99);
    border-radius: 0.375rem;
}

.demo-notice-lang .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
}

/* Start page guide */
.demo-guide { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1rem; }
.demo-guide li { display: flex; gap: 0.75rem; padding: 1rem; border-radius: 0.75rem; outline: 1px solid rgb(3 7 18 / 0.08); }
.dark .demo-guide li { outline-color: rgb(255 255 255 / 0.1); }
.demo-guide-number { flex-shrink: 0; width: 1.75rem; height: 1.75rem; border-radius: 9999px; display: inline-flex; align-items: center; justify-content: center; font-size: 0.8125rem; font-weight: 600; color: white; background: var(--primary-700); }
.demo-guide p { margin-top: 0.25rem; font-size: 0.875rem; color: rgb(75 85 99); }
.dark .demo-guide p { color: rgb(156 163 175); }
.demo-guide a { display: inline-block; margin-top: 0.5rem; font-size: 0.875rem; font-weight: 600; color: var(--primary-700); }
.dark .demo-guide a { color: var(--primary-400); }
.demo-guide-office { outline: 2px solid var(--primary-500) !important; }
.demo-guide-action { margin-top: 0.75rem; }

/* QR labels */
.demo-qr-labels { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1rem; }
.demo-qr-label { display: flex; align-items: center; gap: 1rem; padding: 0.75rem; border-radius: 0.75rem; background: white; outline: 1px solid rgb(3 7 18 / 0.08); break-inside: avoid; }
.dark .demo-qr-label { background: rgb(255 255 255 / 0.05); outline-color: rgb(255 255 255 / 0.1); }
.demo-qr-label > div:last-child { min-width: 0; }
.demo-qr-code { flex-shrink: 0; width: 136px; height: 136px; padding: 8px; background: white; border-radius: 0.375rem; }
.demo-qr-code img, .demo-qr-code canvas { width: 120px; height: 120px; }
.demo-qr-label strong { display: block; font-size: 1.125rem; font-family: ui-monospace, monospace; white-space: nowrap; }
.demo-qr-label span { display: block; font-size: 0.875rem; }
.demo-qr-site { color: rgb(107 114 128); }
.dark .demo-qr-site { color: rgb(156 163 175); }

@media print {
    .demo-notice, .fi-sidebar, .fi-topbar, .fi-header-actions-ctn, .fi-header-subheading, .fi-warp-offline-runtime { display: none !important; }
    .fi-main-ctn, .fi-main { margin: 0 !important; padding: 0 !important; max-width: none !important; }
    .demo-qr-labels { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
    .demo-qr-label { outline: 1px dashed #999; background: white !important; color: black !important; }
}

/* Japanese headings wrap between phrases, not in the middle of a word (Chrome and Edge; other browsers keep the usual wrap) */
html:lang(ja) :is(h1, h2, h3) {
    word-break: auto-phrase;
}

/* "More to try" under the guide's steps */
.demo-guide-more { margin-top: 1.5rem; }

/* What to try on the plugin's own pages (Offline, Offline changes) */
.demo-page-help { padding: 0.75rem 1rem; font-size: 0.875rem; line-height: 1.5; border-radius: 0.75rem; color: rgb(55 65 81); background: color-mix(in oklab, var(--primary-50) 70%, white); outline: 1px solid color-mix(in oklab, var(--primary-500) 30%, transparent); }
.dark .demo-page-help { color: rgb(209 213 219); background: color-mix(in oklab, var(--primary-500) 10%, transparent); }

/* The code in "View code" on the plugin's pages */
.demo-code pre { overflow-x: auto; padding: 1rem; font-size: 0.8125rem; border-radius: 0.5rem; }
.dark .demo-code .phiki { background-color: var(--phiki-dark-background-color) !important; }
.dark .demo-code .phiki span { color: var(--phiki-dark-color) !important; }

/* The inspections list's subheading in parts (ListInspections::getSubheading()): a lead, numbered steps, the columns, the cards */
.fi-header-subheading .demo-sub-line { display: block; }
.fi-header-subheading .demo-sub-line + .demo-sub-line, .fi-header-subheading .demo-try + .demo-sub-line { margin-top: 0.5rem; }
.fi-header-subheading .demo-try { display: block; margin-top: 0.5rem; }
.fi-header-subheading .demo-try-title { display: block; font-weight: 600; color: rgb(17 24 39); }
.dark .fi-header-subheading .demo-try-title { color: white; }
.fi-header-subheading .demo-try-step { display: flex; gap: 0.5rem; align-items: baseline; margin-top: 0.25rem; }
.fi-header-subheading .demo-try-number { flex: none; display: inline-grid; place-items: center; width: 1.25rem; height: 1.25rem; font-size: 0.75rem; font-weight: 600; border-radius: 9999px; color: white; background: var(--primary-700); }
@media (max-width: 767.98px) { .fi-header-subheading .demo-only-wide { display: none; } }
@media (min-width: 768px) { .fi-header-subheading .demo-only-phone { display: none; } }

/* Tables: the buttons at the end of a row wrap onto a second line instead of making the table wider than the window (1280 px: no sideways scroll) */
.fi-ta-table .fi-ta-actions { flex-wrap: wrap; }
/* Long column titles (German, French…) wrap instead of widening the table */
.fi-ta-table .fi-ta-header-cell { white-space: normal; }
/* The same in the offline list (drawn from the device): the buttons at the end of a row wrap onto a second line */
.fi-warp-offline-table td.fi-warp-offline-actions-cell { white-space: normal; }

/* Wide screen: the notice bar stays on one line in every language. A long text is cut with … (the links and the language menu keep their size). */
@media (min-width: 1100px) {
    body .demo-notice {
        flex-wrap: nowrap;
    }

    body .demo-notice > :first-child {
        flex: 0 1 auto;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body .demo-notice-links {
        flex-wrap: nowrap;
        flex-shrink: 0;
    }

    body .demo-notice-lang {
        flex-shrink: 0;
    }
}
