@import url('https://fonts.googleapis.com/css2?family=Jost:ital,wght@0,100..900;1,100..900&family=Karla:ital,wght@0,200..800;1,200..800&display=swap');

* {
    font-optical-sizing: auto;
    font-style: normal;
}

:root {
    /* primary */
    --theme-orange: #dc440a;
    --theme-black: #101921;

    /* secondary */
    --theme-warm-grey: #d8d4d7;
    --theme-petrol-blue: #1a6694;

    /* extras not from branding */
    --theme-green: #158f36;

    --footer-h: 50px; /* height of the footer */

    /* pico.css overrides */
    --pico-font-family: Karla, sans-serif;
    --pico-nav-element-spacing-vertical: 10px;
}

/* Custom Light scheme (Default) */
/* Can be forced with data-theme="light" */
[data-theme="light"],
:root:not([data-theme="dark"]) {
    --pico-primary-background: var(--theme-orange);
    --pico-secondary-background: var(--theme-petrol-blue);
}

/* Custom Dark scheme (Auto) */
/* Automatically enabled if user has Dark mode enabled */
@media only screen and (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --pico-primary-background: var(--theme-orange);
        --pico-secondary-background: var(--theme-petrol-blue);
    }
}

/* Custom Dark scheme (Forced) */
/* Enabled if forced with data-theme="dark" */
[data-theme="dark"] {
    --pico-primary-background: var(--theme-orange);
    --pico-secondary-background: var(--theme-petrol-blue);
}

/* Custom (Common styles) */
:root {
    --pico-primary-background: var(--theme-orange);
    --pico-secondary-background: var(--theme-petrol-blue);
}

body {
    padding-bottom: var(--footer-h); /* prevent footer from overlapping body content */
}

header {
    background-color: var(--theme-orange);
    border-radius: 30px;
    margin-top: 5px;
}

nav {
    padding-left: 32px;
    padding-right: 32px;
    font-family: "Jost", sans-serif;
}

nav h1 {
    color: white;
    margin-bottom: 0;
}

nav a {
    color: white;
}

nav, nav ul {
    flex-direction: column;
}

nav ul:first-of-type {
    margin-left: 0;
}

nav ul:last-of-type {
    margin-right: 0;
    padding-top: 10px;
}

@media (min-width: 780px) {
    nav, nav ul {
        flex-direction: row;
    }
}

.logo {
    width: 117.7px;
    min-width: 117.7px;
    height: 88.8px;
    min-height: 88.8px;
    margin-top: 8px;
    margin-bottom: 8px;
    margin-left: 24px;
    margin-right: 24px;
}

.logo-group {
    display: flex;
    align-items: center;
}

@media (min-width: 780px) {
    .logo {
        margin-left: 0;
    }
}

/* Set button visibility based on data-theme (set by JavaScript on load) */
html[data-theme="light"] #light-to-dark { display: inline-flex; }
html[data-theme="light"] #dark-to-light { display: none; }

html[data-theme="dark"] #dark-to-light { display: inline-flex; }
html[data-theme="dark"] #light-to-dark { display: none; }

#scheme-toggle {
    position: relative;
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-top: 12px;
    cursor: pointer;
}

#dark-to-light {
    position: absolute;
    top: 0;
    left: 0;
    width: 24px;
    height: 24px;
    display: none;
}

#light-to-dark {
    position: absolute;
    top: 0;
    left: 0;
    width: 24px;
    height: 24px;
    display: inline-flex;
}

#content {
    border-color: #888;
    border-width: 3px;
    border-style: solid;
    border-radius: 30px;
    padding: 30px;
}

/* Use Jost for headings, etc. */
h1,
h2,
h3,
h4,
h5,
h6,
.md-header,
.md-sidebar,
.tabbed-labels,
.admonition-title {
    font-family: "Jost", sans-serif;
}

textarea {
    border-radius: 20px;
}

input {
    border-radius: 20px;
}

input[type=submit] {
    border-radius: 30px;
}

input[type=checkbox] {
    border-radius: 3px;
}

.rounded {
    border-radius: 30px;
}

select {
    border-radius: 20px;
}

#page-footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    height: var(--footer-h);
    margin: auto;
    text-align: center;
    background-color: white;
    padding-block-start: 0.5em;
    padding-block-end: 0;
}

html[data-theme="dark"] #page-footer {background-color: black;}

@media (prefers-color-scheme: dark) {
    html[data-theme="auto"] #page-footer {background-color: black;}
}

.workflow-run-link {
    font-family: monospace;
}

/*
https://lucide.dev/icons/external-link
%23006688 is URL-encoded petrol blue
*/
a.workflow-run-link::after {
    content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23006688' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='lucide lucide-external-link-icon lucide-external-link'%3E%3Cpath d='M15 3h6v6'/%3E%3Cpath d='M10 14 21 3'/%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3C/svg%3E");
    margin-left: 5px;
}
