/*
 * ACF Chef documentation site.
 *
 * Copied verbatim into the built site by tools/DocSite.php. Edit it here.
 *
 * The palette is defined once on :root and only the tokens are redefined for
 * dark mode, so nothing has a colour that exists in only one scheme. The
 * --acf-chef-* names are the logo's own custom properties: the mark is inlined
 * into every page, so it picks these up and follows the reader's theme.
 */

:root {
    --acf-chef-navy: #08284e;
    --acf-chef-blue: #174b86;
    --acf-chef-teal: #157a7a;
    --acf-chef-mint: #35b8a4;
    --acf-chef-ink: #12212f;
    --acf-chef-shadow: rgba(8, 40, 78, 0.16);
    --acf-chef-white: #ffffff;

    --bg: #ffffff;
    --bg-soft: #f5f7fa;
    --bg-code: #f5f7fa;
    --text: #1c2b3a;
    --text-soft: #5a6b7c;
    --rule: #dfe5ec;
    --accent: #12608f;
    --accent-soft: #e8f1f7;

    --tok-kw: #9a2c8a;
    --tok-var: #1f5f9c;
    --tok-str: #1f7a4d;
    --tok-num: #9a5518;
    --tok-com: #6c7a89;
    --tok-name: #22303d;
    --tok-op: #5a6b7c;

    --sidebar: 17rem;
    --outline: 14rem;
    --measure: 46rem;
}

@media (prefers-color-scheme: dark) {
    :root {
        --acf-chef-navy: #0b1a2b;
        --acf-chef-blue: #2f7fd0;
        --acf-chef-teal: #2aa19a;
        --acf-chef-mint: #4fd6bd;
        --acf-chef-ink: #e6edf5;
        --acf-chef-shadow: rgba(0, 0, 0, 0.5);
        --acf-chef-white: #0d1520;

        --bg: #0d1520;
        --bg-soft: #131d2a;
        --bg-code: #111a26;
        --text: #d9e2ec;
        --text-soft: #97a6b8;
        --rule: #22303f;
        --accent: #6bb6e8;
        --accent-soft: #16283a;

        --tok-kw: #e08bd0;
        --tok-var: #7fc3f5;
        --tok-str: #79d3a1;
        --tok-num: #e0b072;
        --tok-com: #7d8b9a;
        --tok-name: #cfdae6;
        --tok-op: #97a6b8;
    }
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.65 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
}

.skip {
    position: absolute;
    left: -9999px;
    top: 0;
    padding: 0.6rem 1rem;
    background: var(--accent);
    color: #fff;
    z-index: 10;
}

.skip:focus {
    left: 0;
}

.shell {
    display: grid;
    grid-template-columns: var(--sidebar) minmax(0, 1fr) var(--outline);
    gap: 0 2.5rem;
    max-width: 90rem;
    margin: 0 auto;
    padding: 0 1.5rem;
    align-items: start;
}

/* Sidebar ---------------------------------------------------------------- */

.sidebar {
    position: sticky;
    top: 0;
    max-height: 100vh;
    overflow-y: auto;
    padding: 1.75rem 0 2.5rem;
    border-right: 1px solid var(--rule);
}

.brand {
    display: block;
    padding-right: 1.5rem;
    margin-bottom: 1.5rem;
}

.brand svg {
    display: block;
    width: 100%;
    height: auto;
}

.sidebar ul {
    list-style: none;
    margin: 0;
    padding: 0 1rem 0 0;
}

.sidebar li.group {
    margin: 1.5rem 0 0.4rem;
    padding: 0 0.75rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-soft);
}

.sidebar li.group:first-child {
    margin-top: 0;
}

.sidebar a {
    display: block;
    padding: 0.3rem 0.75rem;
    border-radius: 0.35rem;
    color: var(--text-soft);
    text-decoration: none;
    font-size: 0.925rem;
}

.sidebar a:hover {
    background: var(--bg-soft);
    color: var(--text);
}

.sidebar a[aria-current="page"] {
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
}

/* Content ---------------------------------------------------------------- */

main {
    min-width: 0;
    padding: 2.5rem 0 4rem;
}

article {
    max-width: var(--measure);
}

article > *:first-child {
    margin-top: 0;
}

h1,
h2,
h3,
h4 {
    line-height: 1.25;
    color: var(--text);
    scroll-margin-top: 1.5rem;
}

h1 {
    font-size: 2.1rem;
    margin: 0 0 1.5rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 1.5rem;
    margin: 3rem 0 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--rule);
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.15rem;
    margin: 2.25rem 0 0.75rem;
}

h4 {
    font-size: 1rem;
    margin: 1.75rem 0 0.6rem;
    color: var(--text-soft);
}

.anchor {
    margin-left: 0.4rem;
    color: var(--rule);
    text-decoration: none;
    font-weight: 400;
    opacity: 0;
    transition: opacity 0.12s ease;
}

h1:hover .anchor,
h2:hover .anchor,
h3:hover .anchor,
h4:hover .anchor,
.anchor:focus {
    opacity: 1;
}

p,
ul,
ol {
    margin: 0 0 1.15rem;
}

li {
    margin-bottom: 0.35rem;
}

a {
    color: var(--accent);
    text-underline-offset: 0.15em;
}

strong {
    font-weight: 650;
}

blockquote {
    margin: 1.5rem 0;
    padding: 0.1rem 0 0.1rem 1.15rem;
    border-left: 3px solid var(--acf-chef-mint);
    color: var(--text-soft);
}

hr {
    height: 1px;
    margin: 2.5rem 0;
    border: 0;
    background: var(--rule);
}

/* Code ------------------------------------------------------------------- */

code,
pre {
    font-family: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}

code {
    font-size: 0.875em;
}

:not(pre) > code {
    padding: 0.12em 0.36em;
    border-radius: 0.25rem;
    background: var(--bg-soft);
    border: 1px solid var(--rule);
    word-break: break-word;
}

pre {
    margin: 0 0 1.35rem;
    padding: 1rem 1.15rem;
    border: 1px solid var(--rule);
    border-radius: 0.5rem;
    background: var(--bg-code);
    overflow-x: auto;
    line-height: 1.55;
}

pre code {
    background: none;
    border: 0;
    padding: 0;
    font-size: 0.83rem;
}

.kw { color: var(--tok-kw); }
.var { color: var(--tok-var); }
.str { color: var(--tok-str); }
.num { color: var(--tok-num); }
.com { color: var(--tok-com); font-style: italic; }
.name { color: var(--tok-name); }
.op { color: var(--tok-op); }

/* Tables ----------------------------------------------------------------- */

.table-wrap,
article > table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
}

table {
    border-collapse: collapse;
    margin: 0 0 1.5rem;
    font-size: 0.92rem;
}

th,
td {
    padding: 0.5rem 0.9rem;
    border-bottom: 1px solid var(--rule);
    text-align: left;
    vertical-align: top;
}

th {
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-soft);
    border-bottom: 2px solid var(--rule);
    white-space: nowrap;
}

tbody tr:hover {
    background: var(--bg-soft);
}

/* On this page ----------------------------------------------------------- */

.outline {
    position: sticky;
    top: 0;
    max-height: 100vh;
    overflow-y: auto;
    padding: 2.9rem 0 2rem;
    font-size: 0.85rem;
}

.outline p {
    margin: 0 0 0.6rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-soft);
}

.outline ul {
    list-style: none;
    margin: 0;
    padding: 0;
    border-left: 1px solid var(--rule);
}

.outline li {
    margin: 0;
}

.outline a {
    display: block;
    padding: 0.22rem 0 0.22rem 0.8rem;
    color: var(--text-soft);
    text-decoration: none;
}

.outline a:hover {
    color: var(--accent);
}

.outline .l3 a {
    padding-left: 1.6rem;
    font-size: 0.95em;
}

/* Pager ------------------------------------------------------------------ */

.pager {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    max-width: var(--measure);
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--rule);
}

.pager a {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.7rem 1rem;
    border: 1px solid var(--rule);
    border-radius: 0.5rem;
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    max-width: 48%;
}

.pager a:hover {
    border-color: var(--accent);
}

.pager .next {
    text-align: right;
    margin-left: auto;
}

.pager span {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-soft);
}

/* Narrow screens --------------------------------------------------------- */

@media (max-width: 78rem) {
    .shell {
        grid-template-columns: var(--sidebar) minmax(0, 1fr);
    }

    .outline {
        display: none;
    }
}

@media (max-width: 52rem) {
    .shell {
        display: block;
        padding: 0 1.15rem;
    }

    .sidebar {
        position: static;
        max-height: none;
        border-right: 0;
        border-bottom: 1px solid var(--rule);
        padding-bottom: 1.5rem;
    }

    .brand {
        max-width: 15rem;
        padding-right: 0;
    }

    .sidebar ul {
        display: flex;
        flex-wrap: wrap;
        gap: 0.15rem;
        padding-right: 0;
    }

    .sidebar li.group {
        flex-basis: 100%;
        margin-top: 1rem;
        padding: 0;
    }

    main {
        padding-top: 1.75rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    .pager a {
        max-width: 49%;
    }
}
