/* Cyberdream theme for mdBook */

:root {
    --sidebar-target-width: 300px;
    --sidebar-width: min(var(--sidebar-target-width), 80vw);
    --sidebar-resize-indicator-width: 8px;
    --sidebar-resize-indicator-space: 2px;
    --page-padding: 15px;
    --content-max-width: 750px;
    --menu-bar-height: 50px;
    --mono-font: "Source Code Pro", Consolas, "Ubuntu Mono", Menlo, "DejaVu Sans Mono", monospace, monospace;
    --code-font-size: 0.875em;
    --searchbar-margin-block-start: 5px;
}

/* Light theme */
.light {
    --bg: #ffffff;
    --fg: #16181a;

    --sidebar-bg: #eff1f5;
    --sidebar-fg: #16181a;
    --sidebar-non-existant: #7b8496;
    --sidebar-active: #5ea1ff;
    --sidebar-spacer: #7b8496;

    --scrollbar: #7b8496;

    --icons: #7b8496;
    --icons-hover: #16181a;

    --links: #5ea1ff;

    --inline-code-color: #ffbd5e;

    --theme-popup-bg: #eff1f5;
    --theme-popup-border: #7b8496;
    --theme-hover: #e4e5e8;

    --quote-bg: #eff1f5;
    --quote-border: #7b8496;

    --warning-border: #ffbd5e;

    --table-border-color: #e4e5e8;
    --table-header-bg: #eff1f5;
    --table-alternate-bg: #ffffff;

    --searchbar-border-color: #7b8496;
    --searchbar-bg: #e4e5e8;
    --searchbar-fg: #16181a;
    --searchbar-shadow-color: #5ea1ff;
    --searchresults-header-fg: #7b8496;
    --searchresults-border-color: #7b8496;
    --searchresults-li-bg: #e4e5e8;
    --search-mark-bg: #5ea1ff;

    --color-scheme: light;

    --copy-button-filter: invert(45.49%);
    --copy-button-filter-hover: invert(14%) sepia(93%) saturate(4250%) hue-rotate(243deg) brightness(99%) contrast(130%);

    --footnote-highlight: #5ea1ff;

    --overlay-bg: rgba(200, 200, 205, 0.4);

    --blockquote-note-color: #5ea1ff;
    --blockquote-tip-color: #5eff6c;
    --blockquote-important-color: #bd5eff;
    --blockquote-warning-color: #ffbd5e;
    --blockquote-caution-color: #ff6e5e;

    --sidebar-header-border-color: #5ea1ff;
}

/* Dark theme */
.navy {
    --bg: #16181a;
    --fg: #ffffff;

    --sidebar-bg: #1e2124;
    --sidebar-fg: #ffffff;
    --sidebar-non-existant: #7b8496;
    --sidebar-active: #5ea1ff;
    --sidebar-spacer: #3c4048;

    --scrollbar: #7b8496;

    --icons: #7b8496;
    --icons-hover: #ffffff;

    --links: #5ea1ff;

    --inline-code-color: #ffbd5e;

    --theme-popup-bg: #1e2124;
    --theme-popup-border: #3c4048;
    --theme-hover: #272a2d;

    --quote-bg: #1e2124;
    --quote-border: #3c4048;

    --warning-border: #ffbd5e;

    --table-border-color: #3c4048;
    --table-header-bg: #1e2124;
    --table-alternate-bg: #16181a;

    --searchbar-border-color: #3c4048;
    --searchbar-bg: #272a2d;
    --searchbar-fg: #ffffff;
    --searchbar-shadow-color: #5ea1ff;
    --searchresults-header-fg: #7b8496;
    --searchresults-border-color: #3c4048;
    --searchresults-li-bg: #1e2124;
    --search-mark-bg: #5ea1ff;

    --color-scheme: dark;

    --copy-button-filter: invert(90%) sepia(0%) saturate(0%) hue-rotate(180deg) brightness(100%) contrast(100%);
    --copy-button-filter-hover: invert(100%) sepia(0%) saturate(0%) hue-rotate(180deg) brightness(100%) contrast(100%);

    --footnote-highlight: #5ea1ff;

    --overlay-bg: rgba(33, 40, 48, 0.4);

    --blockquote-note-color: #5ea1ff;
    --blockquote-tip-color: #5eff6c;
    --blockquote-important-color: #bd5eff;
    --blockquote-warning-color: #ffbd5e;
    --blockquote-caution-color: #ff6e5e;

    --sidebar-header-border-color: #5ea1ff;
}

/* Coal (fallback for prefers-color-scheme: dark when js is disabled) */
.coal {
    --bg: #16181a;
    --fg: #ffffff;

    --sidebar-bg: #1e2124;
    --sidebar-fg: #ffffff;
    --sidebar-non-existant: #7b8496;
    --sidebar-active: #5ea1ff;
    --sidebar-spacer: #3c4048;

    --scrollbar: #7b8496;

    --icons: #7b8496;
    --icons-hover: #ffffff;

    --links: #5ea1ff;

    --inline-code-color: #ffbd5e;

    --theme-popup-bg: #1e2124;
    --theme-popup-border: #3c4048;
    --theme-hover: #272a2d;

    --quote-bg: #1e2124;
    --quote-border: #3c4048;

    --warning-border: #ffbd5e;

    --table-border-color: #3c4048;
    --table-header-bg: #1e2124;
    --table-alternate-bg: #16181a;

    --searchbar-border-color: #3c4048;
    --searchbar-bg: #272a2d;
    --searchbar-fg: #ffffff;
    --searchbar-shadow-color: #5ea1ff;
    --searchresults-header-fg: #7b8496;
    --searchresults-border-color: #3c4048;
    --searchresults-li-bg: #1e2124;
    --search-mark-bg: #5ea1ff;

    --color-scheme: dark;

    --copy-button-filter: invert(90%) sepia(0%) saturate(0%) hue-rotate(180deg) brightness(100%) contrast(100%);
    --copy-button-filter-hover: invert(100%) sepia(0%) saturate(0%) hue-rotate(180deg) brightness(100%) contrast(100%);

    --footnote-highlight: #5ea1ff;

    --overlay-bg: rgba(33, 40, 48, 0.4);

    --blockquote-note-color: #5ea1ff;
    --blockquote-tip-color: #5eff6c;
    --blockquote-important-color: #bd5eff;
    --blockquote-warning-color: #ffbd5e;
    --blockquote-caution-color: #ff6e5e;

    --sidebar-header-border-color: #5ea1ff;
}

@media (prefers-color-scheme: dark) {
    html:not(.js) {
        --bg: #16181a;
        --fg: #ffffff;

        --sidebar-bg: #1e2124;
        --sidebar-fg: #ffffff;
        --sidebar-non-existant: #7b8496;
        --sidebar-active: #5ea1ff;
        --sidebar-spacer: #3c4048;

        --scrollbar: #7b8496;

        --icons: #7b8496;
        --icons-hover: #ffffff;

        --links: #5ea1ff;

        --inline-code-color: #ffbd5e;

        --theme-popup-bg: #1e2124;
        --theme-popup-border: #3c4048;
        --theme-hover: #272a2d;

        --quote-bg: #1e2124;
        --quote-border: #3c4048;

        --warning-border: #ffbd5e;

        --table-border-color: #3c4048;
        --table-header-bg: #1e2124;
        --table-alternate-bg: #16181a;

        --searchbar-border-color: #3c4048;
        --searchbar-bg: #272a2d;
        --searchbar-fg: #ffffff;
        --searchbar-shadow-color: #5ea1ff;
        --searchresults-header-fg: #7b8496;
        --searchresults-border-color: #3c4048;
        --searchresults-li-bg: #1e2124;
        --search-mark-bg: #5ea1ff;

        --color-scheme: dark;

        --copy-button-filter: invert(90%) sepia(0%) saturate(0%) hue-rotate(180deg) brightness(100%) contrast(100%);
        --copy-button-filter-hover: invert(100%) sepia(0%) saturate(0%) hue-rotate(180deg) brightness(100%) contrast(100%);

        --footnote-highlight: #5ea1ff;

        --overlay-bg: rgba(33, 40, 48, 0.4);

        --blockquote-note-color: #5ea1ff;
        --blockquote-tip-color: #5eff6c;
        --blockquote-important-color: #bd5eff;
        --blockquote-warning-color: #ffbd5e;
        --blockquote-caution-color: #ff6e5e;

        --sidebar-header-border-color: #5ea1ff;
    }
}
