@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;700');
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@100..900&display=swap');

:root {
    /* egenn webex */
    --incorrect: #E44C9A;
    --incorrect_alpha: #E9ABCB;
    --correct: #00A3AD;
    --correct_alpha: #A4D0D5;
    --highlight: #FF8F28;
}

html,
body {
    font-family: Geist, sans-serif;
}

/* @supports (font-variation-settings: normal) {

    html,
    body {
        font-family: InterVariable, sans-serif;
        font-feature-settings: 'cv11' 1, 'liga' 1, 'calt' 1;
    }
} */

/* .sidebar {
    line-height: 1.2rem;
} */

/* Sidebar background */
/* .col-sm-12.col-lg-3.sidebar.sidebar-book {
    background-color: #f1f1f1;
} */

/* Spacing around paragraphs */
/* h2, h3, h4, h5 {
    margin-top: 3.5rem !important;
} */

/* For paragraphs in boxes */
p {
    margin-bottom: 0;
}

/* Font sizes */
.figure-caption {
    font-size: 0.9rem;
}

/* Links */
a {
    text-decoration: none;
}

/* Source code */
div.sourceCode {
    border: none;
}

pre,
code,
kbd,
samp {
    font-family: "Fira Code", "Fira Mono";
}

/* Input source code teal left border */
/* pre.sourceCode {
    border-left-color: #16A0AC !important;
    border-left-style: solid !important;
    border-left-width: medium;
} */

/* no bg for code in headings */
h1 code,
h2 code,
h3 code,
h4 code {
    background-color: transparent;
}

.imgs {
    display: block;
    margin-left: auto;
    margin-right: auto;
    overflow: visible;
    filter: drop-shadow(0 0 .4rem #333);
}

.figure-caption {
    font-style: italic;
}

/* Code output */
.cell-output.cell-output-stdout {
    background-color: unset;
    border-radius: .25rem
}

/* Do not add bg color to code outside code blocks */
p code:not(.sourceCode),
li code:not(.sourceCode) {
    background-color: transparent;
}

/* rtemis interactive learning */
/* UC Colors: https: //brand.universityofcalifornia.edu/guidelines/identity/color.html */

@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@300..700&display=swap');

:root {
    --runcolor: #00A3AD;
    --linkcolor: #00778B;
    --hoverlinkcolor: #00A3AD;
    /* --code-bg: #efefef; */
    --orange: #FF8F28;
}

/* Code Editor toolbar */
.qwebr-editor-toolbar {
    background-color: var(--code-bg);
    padding: 0.1rem 0.1rem;
    /* border-radius: 5px; */
}

/* Button (within Code Editor Toolbar) */
.qwebr-button {
    background-color: #fff0;
    display: inline-block;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    text-align: center;
    color: #000;
    border-color: #ccc;
    border: 1px solid rgba(0, 0, 0, 0);
    /* padding: 0.375rem 0.75rem; */
    font-size: .9rem;
    border-radius: 0.25rem;
    transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

/* Run button icon (within button within Code editor toolbar) */
.qwebr-icon-run-code {
    color: var(--runcolor);
}

/* Code Editor */
.qwebr-editor .monaco-editor .margin,
.qwebr-editor .monaco-editor .monaco-editor-background {
    background-color: var(--code-bg);
}

.monaco-editor pre {
    background-color: var(--code-bg);
}

/* Practice */

/* Check */
.check {
    border-radius: 5px;
}

/* Check run button icon */
.check .qwebr-icon-run-code {
    color: var(--orange);
}

/* Custom text for run button */
.qwebr-button-run span {
    display: none;
}

.qwebr-button-run::after {
    content: "Run";
}

/* Custom text for check button */

/* Remove default text */
.check .qwebr-button-run span {
    display: none;
}

/* Practice custom text */
/* .practice .qwebr-button-run::after {
  content: "Run";
} */

/* Practice toolbar top, right and left border orange */
.practice .qwebr-editor-toolbar {
    border-top: 1px solid var(--orange);
    border-right: 1px solid var(--orange);
    border-left: 1px solid var(--orange);
}

/* Practice box orange border */
.practice .qwebr-editor {
    border-bottom: 1px solid var(--orange) !important;
    border-right: 1px solid var(--orange) !important;
    border-left: 1px solid var(--orange) !important;
}

/* Insert custom text */
.check .qwebr-button-run::after {
    content: "Check";
}

/* Code Editor */
.qwebr-editor {
    font-family: "Fira Code";
    /* font-size: 90%; */
}

/* Line numbers */
.qwebr-editor .monaco-editor .line-numbers {
    font-size: 80%;
    color: #aaa !important;
    font-style: italic;
}

/* folding indicators */
.monaco-editor .margin .cldr.codicon.codicon-folding-expanded,
.monaco-editor .margin .cldr.codicon.codicon-folding-collapsed {
    color: #6c727c !important;
}

/* Interactive area */
/* add space above and below .qwebr-interactive-area */
.qwebr-interactive-area {
    margin: 1rem 0;
}

/* Code Editor */
.view-line {
    font-family: "Fira Code";
    /* font-size: 90%; */
}

/* ext */
/* run button */

button.qwebr-button-run {
    /* margin-bottom: 15px; */
    border-radius: 0.5rem;
    /* background-color: white; */
    /* background-color: #181818; */
    border-width: 1.5px;
    text-transform: uppercase;
    font-size: 70%;
    /* font-weight: bold; */
    /* color: var(--runcolor); */
    /* border-color: var(--runcolor); */
    /* border-color: #181818; */
    /* animation: 8s infinite alternate pulse; */
}

/* .qwebr-editor {
  border-radius: .3rem;
  overflow: hidden;
  font-size: 85%;
} */

/* Source code for Solution */
.sourceCode {
    background-color: var(--code-bg);
}

/* Hide solution/explanation before exercise is attempted */
.hidden {
    /* display: none; */
    -webkit-filter: blur(5px);
    -moz-filter: blur(5px);
    -o-filter: blur(5px);
    -ms-filter: blur(5px);
    filter: blur(5px);
}

/* Make all visible for printing */
@media print {
    .hidden {
        display: block;
    }
}

/* Custom webex css */
/* .webex-check {} */

.webex-box {
    border: 1px solid var(--highlight);
    padding: 0.5em 0.25em;
    margin: 1em 0;
    /* border-radius: .25em; */
    background-color: rgba(127, 127, 127, 0.05);
}

.webex-total_correct {
    margin-left: 1em;
}

.unchecked .webex-total_correct {
    display: none;
}

.unchecked .webex-incorrect,
.unchecked .webex-correct {
    border: 2px dotted grey !important;
    background-color: white !important;
}

/* styles for webex-solveme */
.webex-select,
input.webex-solveme,
.unchecked .webex-radiogroup label.webex-incorrect,
.unchecked .webex-radiogroup label.webex-correct {
    border: 2px dotted grey;
    background-color: white;
    border-radius: 0.25em;
}

.webex-incorrect,
input.webex-solveme.webex-incorrect,
.webex-radiogroup label.webex-incorrect {
    border: 2px dotted var(--incorrect);
    background-color: var(--incorrect_alpha);
    color: black;
    border-radius: 0.25em;
}

.webex-correct,
input.webex-solveme.webex-correct,
.webex-radiogroup label.webex-correct {
    border: 2px solid var(--correct);
    background-color: var(--correct_alpha);
    color: black;
    border-radius: 0.25em;
}

.unchecked .webex-incorrect span::before,
.unchecked .webex-incorrect+.webex-icon::after,
.unchecked .webex-correct span::before,
.unchecked .webex-correct+.webex-icon::after {
    content: "  ";
}

.webex-incorrect span::before,
.webex-incorrect+.webex-icon::after {
    content: "\274C  ";
}

.webex-correct span::before,
.webex-correct+.webex-icon::after {
    content: "\2705  ";
}


/* styles for hidden solutions */
.webex-solution {
    height: 2.5em;
    overflow-y: hidden;
    padding: 0.5em;
    margin-bottom: 10px;
}

.webex-solution.open {
    height: auto;
    border: 2px solid var(--highlight);
    border-radius: 5px;
}

.webex-solution button,
.webex-check-button {
    height: 2em;
    margin-top: 1em;
    margin-bottom: 0.5em;
    border-radius: 0.5em;
    background-color: var(--highlight);
    color: white;
    padding: 0 0.5em;
    border: none;
}

.webex-solution pre.sourceCode {
    border-color: var(--correct);
}

.webex-radiogroup label {
    margin-left: 2em;
    text-indent: -1em;
    padding-left: 0.5em;
    font-weight: 400;
    display: block;
    border: 2px solid rgba(255, 255, 255, 0);
    background-color: inherit;
    border-radius: 0.25em;
}

.webex-radiogroup label input {
    position: relative;
    left: -1em;
}

.webex-radiogroup {
    margin: 1em 0;
}


/* quarto-webr */
/* fix modal colors */
.qwebr-modal-content {
    background-color: #161616 !important;
    color: #e7e7e7 !important;
}

/* Add space between code block and output */
.qwebr-output-code-area {
    margin-top: 0.5rem;
}

/* webexercises in dark mode */
.quarto-dark .webex-solveme {
    background-color: #222222 !important;
    color: #e7e7e7 !important;
}

/* Invert sidebar logo with dark mode */
.quarto-dark .sidebar-logo {
    filter: invert(1);
}

/* Add language name at bottom right of code block */
pre.sourceCode.sh::before {
    /* content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M30 14.784c0-5.178-6.268-9.376-14-9.376S2 9.606 2 14.784c0 4.615 4.981 8.442 11.536 9.223v2.991l4.776-.001v-2.974a19.4 19.4 0 0 0 3.342-.665L23.593 27l5.398-.002l-3.253-5.485C28.363 19.809 30 17.426 30 14.784m-22.498.7c0-3.54 4.764-6.41 10.641-6.41s10.214 1.963 10.214 6.41a5.47 5.47 0 0 1-3.398 5.126a3 3 0 0 0-.298-.175a10.5 10.5 0 0 0-1.34-.505s4.174-.31 4.174-4.466s-4.368-4.234-4.368-4.234h-9.59v10.025c-3.567-1.035-6.035-3.227-6.035-5.771m13.742 1.845l-2.893.001l.001-2.68h2.892a1.248 1.248 0 0 1 1.34 1.316a1.323 1.323 0 0 1-1.34 1.363m-2.933 3.495h1.283a.88.88 0 0 1 .64.291a3.3 3.3 0 0 1 .51.63a22 22 0 0 1-2.432.145Z'/%3E%3C/svg%3E"); */
    content: "shell";
    padding: 0.25em 0.5em;
    opacity: 0.8;
    position: absolute;
    top: 0;
    right: 8px;
    font-family: Geist, sans-serif;
    font-weight: 300;
    transition: opacity 0.2s ease;
}

pre.sourceCode.sh:hover::before {
    opacity: 0;
}

pre.sourceCode.r::before {
    /* content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M30 14.784c0-5.178-6.268-9.376-14-9.376S2 9.606 2 14.784c0 4.615 4.981 8.442 11.536 9.223v2.991l4.776-.001v-2.974a19.4 19.4 0 0 0 3.342-.665L23.593 27l5.398-.002l-3.253-5.485C28.363 19.809 30 17.426 30 14.784m-22.498.7c0-3.54 4.764-6.41 10.641-6.41s10.214 1.963 10.214 6.41a5.47 5.47 0 0 1-3.398 5.126a3 3 0 0 0-.298-.175a10.5 10.5 0 0 0-1.34-.505s4.174-.31 4.174-4.466s-4.368-4.234-4.368-4.234h-9.59v10.025c-3.567-1.035-6.035-3.227-6.035-5.771m13.742 1.845l-2.893.001l.001-2.68h2.892a1.248 1.248 0 0 1 1.34 1.316a1.323 1.323 0 0 1-1.34 1.363m-2.933 3.495h1.283a.88.88 0 0 1 .64.291a3.3 3.3 0 0 1 .51.63a22 22 0 0 1-2.432.145Z'/%3E%3C/svg%3E"); */
    content: "R";
    padding: 0.25em 0.5em;
    opacity: 0.8;
    position: absolute;
    top: 0;
    right: 8px;
    font-family: Geist, sans-serif;
    font-weight: 300;
    transition: opacity 0.2s ease;
}

pre.sourceCode.r:hover::before {
    opacity: 0;
}

pre.sourceCode.python::before {
    /* content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M30 14.784c0-5.178-6.268-9.376-14-9.376S2 9.606 2 14.784c0 4.615 4.981 8.442 11.536 9.223v2.991l4.776-.001v-2.974a19.4 19.4 0 0 0 3.342-.665L23.593 27l5.398-.002l-3.253-5.485C28.363 19.809 30 17.426 30 14.784m-22.498.7c0-3.54 4.764-6.41 10.641-6.41s10.214 1.963 10.214 6.41a5.47 5.47 0 0 1-3.398 5.126a3 3 0 0 0-.298-.175a10.5 10.5 0 0 0-1.34-.505s4.174-.31 4.174-4.466s-4.368-4.234-4.368-4.234h-9.59v10.025c-3.567-1.035-6.035-3.227-6.035-5.771m13.742 1.845l-2.893.001l.001-2.68h2.892a1.248 1.248 0 0 1 1.34 1.316a1.323 1.323 0 0 1-1.34 1.363m-2.933 3.495h1.283a.88.88 0 0 1 .64.291a3.3 3.3 0 0 1 .51.63a22 22 0 0 1-2.432.145Z'/%3E%3C/svg%3E"); */
    content: "python";
    padding: 0.25em 0.5em;
    opacity: 0.8;
    position: absolute;
    top: 0;
    right: 8px;
    font-family: Geist, sans-serif;
    font-weight: 300;
    transition: opacity 0.2s ease;
}

pre.sourceCode.python:hover::before {
    opacity: 0;
}

pre.sourceCode.julia::before {
    content: "julia";
    padding: 0.25em 0.5em;
    opacity: 0.8;
    position: absolute;
    top: 0;
    right: 8px;
    font-family: Geist, sans-serif;
    font-weight: 300;
    transition: opacity 0.2s ease;
}

pre.sourceCode.julia:hover::before {
    opacity: 0;
}
