/*
===============================================================================================================================
Put your custom CSS in this file.
===============================================================================================================================
*/

/* CSS to better visually match Docsify pages within Canvas LMS (uncomment to use) */
/*
@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0,700;1,400;1,700&display=swap');

body .markdown-section {
    font-family: "Lato Extended","Lato","Helvetica Neue",Arial,sans-serif;
    line-height: 1.5;
    font-size: 16px;
}
*/

/* Link colors to match SFU branding visual styling (uncomment to use) */
/*
:root {
    --theme-color: #CC0633;
    --link-color: #CC0633;
    --link-color-hover: var(--link-color);
    --link-underline-color: #CC0633;
    --link-underline-thickness: auto;
    --link-underline-thickness-hover: var(--link-underline-thickness);
    --blockquote-border-color: #757B7F;
}
*/

/* Dark mode colours to match SFU branding visual styling for use with light + dark theme (uncomment to use) */
/*
@media (prefers-color-scheme: dark) {
:root {
    --theme-color: #EA7688;
    --link-color: #EA7688;
    --link-color-hover: var(--link-color);
    --link-underline-color: #EA7688;
    --link-underline-thickness: auto;
    --link-underline-thickness-hover: var(--link-underline-thickness);
    --blockquote-border-color: #757B7F;
    }
}
*/

/* CSS to better visually match Docsify pages within Moodle LMS (uncomment to use) */
/*
body .markdown-section {
    font-family: system-ui,sans-serif;
    line-height: 1.5;
    font-size: 15px;
}
*/

/* Link colors to match visual styling of Moodle LMS (uncomment to use) */
/*
:root {
    --theme-color: #0F6CBF;
    --link-color: #0F6CBF;
    --link-color-hover: var(--link-color);
    --link-underline-color: #0F6CBF;
    --link-underline-thickness: 0px;
    --link-underline-color-hover: #0F6CBF;
    --link-underline-thickness-hover: auto;
    --blockquote-border-color: #0F6CBF;
}
*/

/* CSS to better visually match Docsify pages within Sakai LMS (uncomment to use) */
/*
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,600;0,700;1,400;1,600;1,700&display=swap');

body .markdown-section {
    font-family: "Open Sans",sans-serif;
    line-height: 1.3;
    font-size: 14px;
}
*/

/* Link colors to match visual styling of Sakai LMS (uncomment to use) */
/*
:root {
    --theme-color: #0B1660;
    --link-color: #0B1660;
    --link-color-hover: var(--link-color);
    --link-underline-color: #0B1660;
    --link-underline-thickness: 0px;
    --link-underline-color-hover: #0B1660;
    --link-underline-thickness-hover: auto;
    --blockquote-border-color: #0B1660;
}
*/

/* Example custom CSS: blue accent colour (a more saturated take on the Grav Open Course Hub slate blue), page title accent bar and tinted blockquotes, in both light and dark mode */
:root {
    --theme-color: #2F508E;
    --link-color: #2F508E;
    --link-color-hover: var(--link-color);
    --link-underline-color: #2F508E;
    --blockquote-border-color: #2F508E;
    --blockquote-bg: color-mix(in srgb, var(--theme-color) 8%, transparent);

    /* Shared corner rounding and accent tint used by the rules below */
    --demo-radius: 6px;
    --demo-tint: color-mix(in srgb, var(--theme-color) 10%, transparent);
}

@media (prefers-color-scheme: dark) {
:root {
    --theme-color: #92B1E8;
    --link-color: #92B1E8;
    --link-color-hover: var(--link-color);
    --link-underline-color: #92B1E8;
    --blockquote-border-color: #92B1E8;
    }
}

/* Short accent bar under each page title */
.markdown-section h1::after {
    content: "";
    display: block;
    width: 3rem;
    height: 4px;
    margin-top: 0.4rem;
    border-radius: 2px;
    background: var(--theme-color);
}

/* Rounded corners for the tinted blockquotes */
.markdown-section blockquote {
    border-radius: 0 var(--demo-radius) var(--demo-radius) 0;
}

/* Match the rounded corners of code blocks to the blockquotes */
.markdown-section pre {
    --border-radius: var(--demo-radius);
}

/* Show the PREVIOUS and NEXT page links at full strength */
.pagination-item .pagination-item-label {
    opacity: 1 !important;
}

/* Show the Edit this Page link as a small outlined button */
.markdown-section a.edit-link {
    display: inline-block;
    padding: 0.3em 0.8em;
    border: 1px solid var(--theme-color);
    border-radius: 999px;
    font-size: 0.9em;
    text-decoration: none;
}

.markdown-section a.edit-link:hover {
    background: var(--demo-tint);
}

/* Tint table header rows with the accent colour */
.markdown-section th {
    background: var(--demo-tint);
}

/* Show the language label on code blocks (such as markdown) in the accent colour */
.markdown-section pre[data-lang]:not([data-lang="markup"])::after {
    color: var(--theme-color);
    opacity: 1;
}

/* Mark the current page or section in the sidebar with a tinted background */
.sidebar-nav li.active > a,
.sidebar-nav li.active > a.page-link,
.sidebar-nav li.active > a.page-link:only-child {
    background-color: var(--demo-tint);
    border-radius: var(--demo-radius);
    padding-left: 0.5em;
    margin-left: -0.5em;
}
