@font-face {
    font-family: "SamsungOne";
    font-style: normal;
    font-weight: 400;
    src:
        local("SamsungOne"),
        local("SamsungOne-Regular"),
        url("https://d3unf4s5rp9dfh.cloudfront.net/public/fonts/SamsungOne-400.woff") format("woff"),
        url("https://d3unf4s5rp9dfh.cloudfront.net/public/fonts/SamsungOne-400.woff2")
            format("woff2");
}

@font-face {
    font-family: "SamsungOne";
    font-style: normal;
    font-weight: 700;
    src:
        local("SamsungOne"),
        local("SamsungOne-Bold"),
        url("https://d3unf4s5rp9dfh.cloudfront.net/public/fonts/SamsungOne-700.woff") format("woff"),
        url("https://d3unf4s5rp9dfh.cloudfront.net/public/fonts/SamsungOne-700.woff2")
            format("woff2");
}

@font-face {
    font-family: "SamsungSharpSans-Bold";
    font-style: normal;
    font-weight: 700;
    font-display: fallback;
    src:
        local("SamsungSharpSans-Bold"),
        url("https://d3unf4s5rp9dfh.cloudfront.net/public/fonts/SamsungSharpSans-Bold.woff")
            format("woff"),
        url("https://d3unf4s5rp9dfh.cloudfront.net/public/fonts/SamsungSharpSans-Bold.woff2")
            format("woff2");
}

/* variables */
:root {
    --st-blacker: #121212;
    --st-black: #000000;
    --st-black-02: #333333;
    --st-black-03: #1f1f1f;
    --st-black-footer: #191d22;

    --st-grey-02: #f1f1f1;
    --st-grey-03: #e5e5e5;
    --st-grey-04: #cdcdcd;
    --st-grey-05: #f8f9fc;
    --st-grey-10: #edeff4;
    --st-grey-40: #ced0d6;
    --st-grey-60: #a9aeb8;
    --st-grey-100: #4b4d52;

    --st-dark-grey-02: #515151;
    --st-dark-grey-03: #79808a;
    --st-dark-grey-04: #9b9b9b;
    --st-docs-body-grey: #f7f7f7;

    --st-white: #ffffff;
    --st-whitish: #f7f8f9;
    --st-azureish-white: #cce5f3;
    --ifm-color-emphasis-600: var(--st-white);

    --st-primary-blue: #3169b2;
    --st-primary-pale-cerulean: #9ebdde;
    --st-dim-blue: #0077c8;
    --st-blue-overlay: rgba(158, 189, 222, 0.08);
    --st-yellow-highlight: #ffe564;

    --st-skyblue: #008df7;
    --st-skyblue-light: #68aeff;
    --st-skyblue-extra-light: #ebf6fe;
    --st-skyblue-dark: #006bea;
    --st-skyblue-extra-dark: #153853;

    --st-bg-secondary: white;
    --st-bg-success: white;
    --st-bg-info: white;
    --st-bg-warning: white;
    --st-bg-warning-border: #e7ae00;
    --st-bg-danger: #ffeaed;

    --st-mobile-nav-hover: rgba(255, 255, 255, 0.2);
    --st-mobile-nav-active: #21579d;

    --font-regular: SamsungOne, sans-serif;
    --font-heading: SamsungSharpSans-Bold, sans-serif;

    --st-h1-font-size: 2.25rem;
    --st-h2-font-size: 2rem;
    --st-h3-font-size: 1.5625rem;
    --st-h4-font-size: 1.125rem;
    --st-h5-font-size: 1rem;
    --st-h6-font-size: 0.625rem;
    --st-p-font-size: 1rem;

    --st-sidebar-width: 320px;
    --st-sidebar-search-top-padding: 16px;
    --st-sidebar-search-bottom-padding: 24px;
    --st-sidebar-search-height: 48px;

    --st-navbar-height: 3.6rem;
    --st-page-left-padding: var(--st-sidebar-width);
    --body-header-height: calc(
        var(--st-sidebar-search-top-padding) + var(--st-sidebar-search-height) +
            var(--st-sidebar-search-bottom-padding)
    );

    --seealso-accent: #42b983;
}

/* fonts */
html {
    font-family: var(--font-regular);
    font-weight: 400;
}

body {
    font-family: var(--font-regular);
    font-weight: 400;
}

.btn {
    font-family: var(--font-regular);
    font-weight: 400;
}

.sidebar {
    font-family: var(--font-regular);
    font-weight: 400;
}

legend {
    font-family: var(--font-regular);
    font-weight: 400;
}

.rst-versions {
    font-family: var(--font-regular);
    font-weight: 400;
}

h1,
h2 {
    font-family: var(--font-heading);
    font-weight: 700;
}

/* light/dark color variables */
body.theme-light {
    --docs-bg: var(--st-docs-body-grey);
    --nav-bg: white;
    --logo-text-color: black;
    --link-color: var(--st-primary-blue);
    --active-sidebar-bg: var(--st-skyblue-extra-light);
    --active-sidebar-fg: var(--st-skyblue-dark);

    --preformat-text-color: var(--st-grey-100);

    --lua-module-underline-color: var(--st-primary-pale-cerulean);

    --lua-class-bg: var(--st-skyblue-extra-light);
    --lua-class-primary-accent: var(--st-skyblue-light);
    --lua-class-secondary-accent: var(--st-skyblue-dark);

    --lua-item-bg: var(--st-grey-03);
    --lua-item-primary-accent: var(--st-grey-40);
    --lua-item-secondary-accent: var(--st-dark-grey-02);

    --seealso-bg: var(--st-whitish);
}

body.theme-dark {
    --docs-bg: var(--st-black-02);
    --nav-bg: var(--st-black-03);
    --border-color: var(--st-grey-100);
    --text-color: var(--st-grey-02);
    --background-color: var(--nav-bg);
    --logo-text-color: white;
    --link-color: var(--st-primary-pale-cerulean);
    /*--box-shadow-color: var(--border-color);*/
    --active-sidebar-bg: var(--st-skyblue-extra-dark);
    --active-sidebar-fg: var(--st-skyblue-light);

    --preformat-text-color: var(--st-grey-40);

    --lua-module-underline-color: var(--st-primary-pale-cerulean);

    --lua-class-bg: var(--st-skyblue-extra-dark);
    --lua-class-primary-accent: var(--st-skyblue-dark);
    --lua-class-secondary-accent: var(--st-skyblue-light);

    --lua-item-bg: var(--st-dark-grey-02);
    --lua-item-primary-accent: var(--st-grey-40);
    --lua-item-secondary-accent: var(--st-grey-02);

    --seealso-bg: var(--st-grey-100);
}

a {
    color: var(--link-color);
}

.content:not(.custom) a {
    text-decoration: underline;
}

dt.field-odd,
dt.field-even,
p.rubric,
.content code {
    color: var(--preformat-text-color);
}

.vp-sidebar:has(.localtoc) {
    display: none;
}

.nav-item > a:not(.external):hover,
.nav-item > a:not(.external).router-link-active {
    border-bottom-color: var(--st-skyblue);
}

@media (min-width: 720px) {
    html {
        scroll-padding-top: calc(var(--st-navbar-height) + var(--body-header-height) + 1rem);
    }

    header.navbar {
        height: var(--st-navbar-height);
    }

    .page {
        margin: 0;
        padding: 0;
    }

    .theme-container {
        display: grid;
        grid-template-columns:
            var(--st-sidebar-width) calc(100% - calc(var(--st-sidebar-width) * 2))
            var(--st-sidebar-width);
        grid-template-rows: var(--st-navbar-height) var(--body-header-height) auto;
        column-gap: 0;
        row-gap: 0;
    }

    .theme-container > .navbar {
        grid-row: 1;
        grid-column: 1;
        column-span: all;
    }

    .theme-container > .main-sidebars {
        grid-row: 2 / span 2;
        grid-column: 1;
    }

    .theme-container > .body-header {
        grid-row: 2;
        grid-column: 2 / span 2;
        position: sticky;
        top: var(--st-navbar-height);
        border-bottom: 1px solid var(--border-color);
    }

    .theme-container > .page {
        grid-row: 3;
        grid-column: 2;
    }

    .vp-sidebar:has(.localtoc) {
        display: block;
        padding: 1.5rem 0 0 0;
        width: var(--st-sidebar-width);
        top: calc(var(--st-navbar-height) + var(--body-header-height));
        right: 0;
        left: unset;
        border-right: unset;
        border-left: 1px solid var(--border-color);
        font-size: 0.9rem;
    }

    .localtoc,
    .localtoc * {
        overflow-x: hidden;
        scroll-margin-top: calc(var(--st-navbar-height) + var(--body-header-height) + 1rem);
    }

    .localtoc > ul {
        width: 100%;
        margin: 1rem 0 0 0;
    }

    .localtoc ul {
        display: inline-block;
        width: 100%;
        box-sizing: border-box;
        list-style-type: none;
        margin: 0;
        padding: 0;
    }

    .localtoc ul ul {
        padding-inline-start: 1em;
    }

    .localtoc li {
        display: list-item;
        width: 100%;
        box-sizing: border-box;
        margin: 0;
        padding: 0;
    }

    .localtoc a[href="#"] {
        display: inline-block;
        font-size: 1.7em;
        font-weight: 700;
    }

    .localtoc a.current[href="#"] {
        border-left: 0.5rem solid var(--st-primary-blue);
    }

    .localtoc a {
        display: block;
        width: var(--st-sidebar-width);
        box-sizing: border-box;
        border-left: 0.5rem solid transparent;
        padding-left: 1rem;
    }

    .localtoc a.current {
        background-color: var(--active-sidebar-bg);
    }

    .localtoc ul ul a.current:before {
        content: "\0200B";
        position: absolute;
        z-index: -1;
        left: 0;
        right: 0;
        border-left: 0.5rem solid var(--st-primary-blue);
        background-color: var(--active-sidebar-bg);
    }

    .theme-container > .vp-sidebar:has(.localtoc) {
        grid-row: 3;
        grid-column: 3;
    }

    .vp-sidebar {
        width: var(--st-sidebar-width);
    }

    .main-sidebars .vp-sidebar .toctree-l1 a,
    .main-sidebars .vp-sidebar .toctree-l2 a {
        padding-top: 0.5rem;
        padding-bottom: 0.6rem;
    }

    .content:not(.custom) {
        max-width: 100%;
        margin: 0;
        padding: 1rem 3rem 2rem 3rem;
    }

    .darkmode-switch {
        bottom: 0;
        right: 0;
        width: 4rem;
        height: 24px;
        padding: 0.55rem 1.25rem 0.4rem 0.55rem;
        border-top: 1px solid var(--border-color);
        border-left: 1px solid var(--border-color);
        border-top-left-radius: 4px;
        background-color: var(--nav-bg);
    }

    .darkmode-switch .item {
        background-color: var(--nav-bg);
    }
}

@media (max-width: 1200px) and (min-width: 720px) {
    .body-header ul.page-nav {
        margin-right: 0;
        padding-right: 2rem;
    }
}

.theme-container .body-header + hr {
    padding: 0;
    margin: 0;
    border: none;
}

.page {
    background-color: var(--docs-bg);
}

.navbar,
.vp-sidebar,
.body-header {
    background-color: var(--nav-bg);
}

.vp-sidebar .searchbox {
    border-bottom-color: var(--border-color);
}

.main-sidebars .vp-sidebar .toctree-l1.current a {
    border-left: 0.5rem solid var(--st-primary-pale-cerulean);
    background-color: var(--active-sidebar-bg);
}

.main-sidebars .vp-sidebar .toctree-l1 a.current {
    border-left-color: var(--st-primary-blue);
}

.main-sidebars .vp-sidebar .toctree-l1 a:hover,
.main-sidebars .vp-sidebar .toctree-l2 a:hover {
    color: var(--st-primary-blue);
}

.main-sidebars .vp-sidebar .toctree-l1 a.current,
.main-sidebars .vp-sidebar .toctree-l2 a.current {
    color: var(--active-sidebar-fg);
}

.logo-container {
    align-items: center;
    display: inline-flex;
    gap: 0.5rem;
}

.logo-parent {
    fill: var(--st-skyblue);
    flex-shrink: 0;
    height: 1.875rem;
}

.logo-inner {
    fill: white;
}

.logo-text {
    color: var(--logo-text-color);
    font-family: var(--font-regular);
    font-size: var(--st-h4-font-size);
}

dl.lua dt {
    display: table;
}

dl.lua.module > dd,
dl.lua.class > dd,
dl.lua.function > dd {
    margin-top: 1rem;
    margin-inline-start: 3rem;
}

dl.lua.module > dt,
dl.lua.class > dt {
    display: table;
    margin: 6px 0;
    padding: 6px;
}

dl.lua.class > dt {
    background-color: var(--lua-class-bg);
    border-top: 3px solid var(--lua-class-primary-accent);
}

dl.lua.module > dt {
    padding-right: 10rem;
    border-bottom: 3px solid var(--lua-module-underline-color);
}

dl.lua.function > dt,
dl.lua.class > dd > dl.lua:not(.class) > dt {
    background-color: var(--lua-item-bg);
    display: table;
    margin: 4px 0;
    padding: 4px;
    border-left: 4px solid var(--lua-item-primary-accent);
}

dl.lua.class .field-list,
dl.lua.function .field-list {
    margin-top: 1rem;
}

.sig .property,
dl.lua.class > dd > dl.lua > dt::before,
section > dl.lua.function > dt::before {
    font-family:
        SFMono-Regular,
        Menlo,
        Consolas,
        Monaco,
        Liberation Mono,
        Lucida Console,
        monospace;
    white-space: pre;
    display: inline-block;
    font-style: italic;
    font-weight: 700;
    color: var(--lua-item-secondary-accent);
    padding-right: 0.5rem;
}

dl.lua.class > dt > .property {
    color: var(--lua-class-secondary-accent);
}

dl.lua.class > dd > dl.lua.attribute > dt::before,
dl.lua.class > dd > dl.lua.data > dt::before {
    content: "field";
}

dl.lua.class > dd > dl.lua.method > dt::before {
    content: "method";
}

section > dl.lua.function > dt::before {
    content: "function";
}

dl.lua.class > dd > dl.lua > dt code.xref.lua {
    background: none;
}

.darkmode-switch .item:first-child {
    border-left-color: var(--st-skyblue);
}

.darkmode-switch .item {
    border-color: var(--st-skyblue);
}

.darkmode-switch .item.active {
    background-color: var(--st-skyblue);
}

.darkmode-switch .item .icon {
    fill: var(--st-skyblue);
}

.admonition {
    padding-bottom: 0.6rem;
    border-top: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    box-shadow:
        rgba(50, 50, 93, 0.25) 0px 2px 5px -1px,
        rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;
}

.admonition .admonition-title {
    margin-bottom: 0.6rem;
}

.admonition code.highlight {
    background-color: var(--st-blacker);
}

.theme-dark .admonition.attention,
.theme-dark .admonition.hint,
.theme-dark .admonition.note,
.theme-dark .admonition.important,
.theme-dark .admonition.tip {
    color: var(--st-blacker);
}

.theme-dark .admonition.warning,
.theme-dark .admonition.caution {
    color: var(--st-grey-02);
}

.admonition.seealso {
    background-color: var(--seealso-bg);
    border-left-color: var(--seealso-accent);
}
