/* 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-600); }
.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-600); }

/* 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;
}

/* Korean wraps between words, not in the middle of one */
html:lang(ko) { word-break: keep-all; }

/* The table to copy on the paste page: looks like a spreadsheet, and the whole table is selected with one click */
.demo-sheet { border-collapse: collapse; font-size: 0.875rem; font-variant-numeric: tabular-nums; user-select: all; }
.demo-sheet th, .demo-sheet td { padding: 0.25rem 0.75rem; border: 1px solid rgb(3 7 18 / 0.15); text-align: right; }
.demo-sheet th { font-weight: 600; background: rgb(3 7 18 / 0.04); }
.demo-sheet th:first-child { text-align: left; }
.dark .demo-sheet th, .dark .demo-sheet td { border-color: rgb(255 255 255 / 0.15); }
.dark .demo-sheet th { background: rgb(255 255 255 / 0.06); }
.demo-sheet-wrap { max-width: 100%; overflow-x: auto; }
/* The sample on the paste page: space between the sample, its button and the "copied" note, and before the table below
   (the panel has no Tailwind build for the demo's own views, so these are plain CSS) */
.demo-paste-sample { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1.5rem; }
.demo-paste-sample-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.demo-paste-sample-copied { font-size: 0.875rem; color: var(--success-600); }
.dark .demo-paste-sample-copied { color: var(--success-400); }

/* 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;
    }
}
