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

/* The start page's tips, grouped by the page they are tried on */
.demo-guide-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1.75rem 1rem; }
/* A page with one tip takes one column, so those sit side by side */
.demo-guide-group:has(li + li) { grid-column: 1 / -1; }
.demo-guide-group:not(:has(li + li)) .demo-guide { grid-template-columns: 1fr; }
.demo-guide-group h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 1rem; margin-bottom: 0.75rem; font-size: 1rem; font-weight: 600; }
.demo-guide-group h3 a { font-size: 0.875rem; font-weight: 600; color: var(--primary-600); }

/* "Try it on this page", above the content of each page */
.demo-page-tips { margin-bottom: 0.25rem; padding: 0.75rem 1rem; border-radius: 0.75rem; background: rgb(236 253 245); outline: 1px solid rgb(16 185 129 / 0.25); font-size: 0.875rem; }
.dark .demo-page-tips { background: rgb(6 78 59 / 0.25); outline-color: rgb(16 185 129 / 0.3); }
.demo-page-tips summary { cursor: pointer; font-weight: 600; color: rgb(6 95 70); }
.dark .demo-page-tips summary { color: rgb(110 231 183); }
.demo-page-tips ol { display: grid; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: 0.375rem 1.75rem; font-size: 0.8125rem; line-height: 1.35; margin-top: 0.5rem; list-style: decimal; padding-left: 1.25rem; color: rgb(55 65 81); }
.dark .demo-page-tips ol { color: rgb(209 213 219); }
.demo-page-tips strong { display: block; color: rgb(17 24 39); }
.dark .demo-page-tips strong { color: white; }
.demo-page-tips a { font-weight: 600; color: var(--primary-600); white-space: nowrap; }
@media (max-width: 40rem) { .demo-page-tips ol { grid-template-columns: 1fr; } }

/* The heading above the plugin's dashboard widgets */
.demo-widgets-intro h2 { font-size: 1.125rem; font-weight: 600; }
.demo-widgets-intro p { margin-top: 0.25rem; font-size: 0.875rem; color: rgb(75 85 99); }
.dark .demo-widgets-intro p { color: rgb(156 163 175); }
.demo-page-tips ol:has(> li:only-child) { grid-template-columns: 1fr; list-style: none; padding-left: 0; }

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