/* Globals */

:root {
    --sidebar-width: 300px;
    --page-padding: 15px;
    --content-max-width: 750px;
    --menu-bar-height: 50px;
    /* Colours from 21 Analytics Website globals.css */
    --off-white: #fafafc;
    --primary-grey: #3e4b52;
    --secondary-green: #23c7ac;
    --neutrals-10-dark: #060708;
    --off-white-blue: #f5f5fb;
    --primary-green-75-dark: #05b776;
    --primary-blue-70-dark: #060666;
    --primary-blue-60-dark: #050658;
    --primary-blue-50-dark: #040549;
    --secondary-green-90-dark: #1fb39b;
    --secondary-green-70-dark: #188b78;
}

/* Themes */

.light {
    --bg: var(--off-white);
    --fg: var(--neutrals-10-dark);

    --sidebar-bg: var(--off-white-blue);
    --sidebar-fg: var(--neutrals-10-dark);
    --sidebar-non-existent: #aaaaaa;
    --sidebar-active: var(--secondary-green-70-dark);
    --sidebar-spacer: #f4f4f4;

    --scrollbar: var(--primary-blue-70-dark);

    --icons: var(--primary-grey);
    --icons-hover: var(--neutrals-10-dark);

    --links: var(--secondary-green-90-dark);

    --inline-code-color: var(--primary-green-75-dark);

    --theme-popup-bg: var(--off-white);
    --theme-popup-border: var(--primary-blue-70-dark);
    --theme-popup-hover: var(--off-white-blue);
    --arrow-hover: var(--off-white);
    --theme-hover: var(--primary-blue-70-dark);

    --quote-bg: hsl(197, 37%, 96%);
    --quote-border: hsl(197, 37%, 91%);

    --table-border-color: var(--primary-blue-70-dark);
    --table-header-bg: var(--primary-blue-70-dark);
    --table-header-text: var(--off-white-blue);
    --table-alternate-bg: var(--off-white-blue);

    --searchbar-border-color: var(--primary-blue-70-dark);
    --searchbar-bg: var(--off-white-blue);
    --searchbar-fg: var(--neutrals-10-dark);
    --searchbar-shadow-color: var(--primary-blue-70-dark);
    --searchresults-header-fg: var(--primary-grey);
    --searchresults-border-color: var(--primary-blue-70-dark);
    --searchresults-li-bg: #e4f2fe;
    --search-mark-bg: #a2cff5;
}

.navy {
    --bg: var(--primary-blue-50-dark);
    --fg: var(--off-white);

    --sidebar-bg: var(--primary-blue-70-dark);
    --sidebar-fg: var(--off-white);
    --sidebar-non-existent: #505274;
    --sidebar-active: var(--secondary-green);
    --sidebar-spacer: #2d334f;

    --scrollbar: var(--sidebar-fg);

    --icons: var(--off-white);
    --icons-hover: var(--off-white-blue);

    --links: var(--secondary-green-90-dark);

    --inline-code-color: var(--primary-green-75-dark);

    --theme-popup-bg: var(--primary-blue-50-dark);
    --theme-popup-border: var(--off-white-blue);
    --theme-popup-hover: var(--primary-blue-70-dark);
    --arrow-hover: var(--primary-blue-50-dark);
    --theme-hover: var(--off-white-blue);

    --quote-bg: hsl(226, 15%, 17%);
    --quote-border: hsl(226, 15%, 22%);

    --table-border-color: var(--off-white-blue);
    --table-header-bg: var(--off-white-blue);
    --table-header-text: var(--primary-blue-50-dark);
    --table-alternate-bg: var(--primary-blue-60-dark);

    --searchbar-border-color: var(--off-white);
    --searchbar-bg: var(--off-white-blue);
    --searchbar-fg: var(--primary-grey);
    --searchbar-shadow-color: #aaa;
    --searchresults-header-fg: var(--off-white);
    --searchresults-border-color: var(--off-white);
    --searchresults-li-bg: #242430;
    --search-mark-bg: #a2cff5;
}

@media (prefers-color-scheme: dark) {
    .light.no-js {
        --bg: hsl(200, 7%, 8%);
        --fg: #98a3ad;

        --sidebar-bg: #292c2f;
        --sidebar-fg: #a1adb8;
        --sidebar-non-existent: #505254;
        --sidebar-active: #3473ad;
        --sidebar-spacer: #393939;

        --scrollbar: var(--sidebar-fg);

        --icons: #43484d;
        --icons-hover: #b3c0cc;

        --links: #2b79a2;

        --inline-code-color: #c5c8c6;

        --theme-popup-bg: #141617;
        --theme-popup-border: #43484d;
        --theme-hover: #1f2124;

        --quote-bg: hsl(234, 21%, 18%);
        --quote-border: hsl(234, 21%, 23%);

        --table-border-color: hsl(200, 7%, 13%);
        --table-header-bg: hsl(200, 7%, 28%);
        --table-alternate-bg: hsl(200, 7%, 11%);

        --searchbar-border-color: #aaa;
        --searchbar-bg: #b7b7b7;
        --searchbar-fg: #000;
        --searchbar-shadow-color: #aaa;
        --searchresults-header-fg: #666;
        --searchresults-border-color: #98a3ad;
        --searchresults-li-bg: #2b2b2f;
        --search-mark-bg: #355c7d;
    }
}
