@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Text:ital@0;1&family=Fira+Code:wght@300..700&family=Geist:wght@100..900&display=swap');

:root {
    --orange: #FF8F28;
}

/* Header font: Serif */
/* h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "DM Serif Text", serif;
} */

/* Body font: Sans-serif */
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;
    }
} */

/* Code font */
pre,
code,
kbd,
samp {
    font-family: "Fira Code", monospace;
}


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

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

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

/* 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;
}

/* Width */
.w-100 {
    width: 100%;
}

/* Image Classes */
.shdw {
    filter: drop-shadow(0 0 .4rem #333);
}

/* Invert inv class in dark mode */
.quarto-dark .inv img {
    filter: invert(1);
}

.img75 {
    width: 75%;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.img50 {
    width: 50%;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

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

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

/* alternating fansi-message & fansi-output adds unnecessary margins */
.fansi {
    margin-bottom: 0 !important;
}

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

/* 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: 7pc;
    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: 7px;
    font-family: Geist, sans-serif;
    font-weight: 300;
    transition: opacity 0.2s ease;
}

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

/* Padding */
.pad1 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}
.pad2 {
    padding-top: 2rem;
    padding-bottom: 2rem;
}
.pad3 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}
.pad4 {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.padt1 {
    padding-top: 1rem;
}
.padt2 {
    padding-top: 2rem;
}
.padt3 {
    padding-top: 3rem;
}
.padt4 {
    padding-top: 4rem;
}

.padb1 {
    padding-bottom: 1rem;
}
.padb2 {
    padding-bottom: 2rem;
}
.padb3 {
    padding-bottom: 3rem;
}
.padb4 {
    padding-bottom: 4rem;
}

/* Fix quarto-title-meta */
/* The two items should be far left and far right */
.quarto-title-meta {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding-left: 2rem !important;
    padding-right: 2rem !important;
}
/* Make quarto-title-meta vertical for mobile */
/* @media (max-width: 768px) {
    .quarto-title-meta {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    .quarto-title-meta .quarto-title-meta-left {
        margin-bottom: 0.5rem !important;
    }
} */

.quarto-title-meta-contents {
    font-weight: 500 !important;
}

/* Wrap */
code {
    white-space: pre-wrap;
}

/* DT::datatable dark mode support */
.quarto-dark .dataTables_wrapper {
    color: #d1d5db !important;
}

.quarto-dark .dataTables_wrapper table.dataTable {
    background-color: transparent !important;
    color: #d1d5db !important;
}

.quarto-dark .dataTables_wrapper table.dataTable thead th,
.quarto-dark .dataTables_wrapper table.dataTable thead td {
    background-color: transparent !important;
    color: #f3f4f6 !important;
}

.quarto-dark .dataTables_wrapper table.dataTable tbody tr {
    background-color: transparent !important;
    color: #d1d5db !important;
}

.quarto-dark .dataTables_wrapper table.dataTable tbody tr:nth-child(odd) {
    background-color: rgba(107, 114, 128, 0.2) !important;
}

.quarto-dark .dataTables_wrapper table.dataTable tbody tr:hover {
    background-color: rgba(107, 114, 128, 0.3) !important;
}

/* DataTables controls and info */
.quarto-dark .dataTables_wrapper .dataTables_length,
.quarto-dark .dataTables_wrapper .dataTables_filter,
.quarto-dark .dataTables_wrapper .dataTables_info,
.quarto-dark .dataTables_wrapper .dataTables_paginate {
    color: #d1d5db !important;
}

.quarto-dark .dataTables_wrapper .dataTables_filter input {
    background-color: rgba(107, 114, 128, 0.3) !important;
    color: #d1d5db !important;
    border: 1px solid rgba(156, 163, 175, 0.3) !important;
}

.quarto-dark .dataTables_wrapper .dataTables_length select {
    background-color: rgba(107, 114, 128, 0.3) !important;
    color: #d1d5db !important;
    border: 1px solid rgba(156, 163, 175, 0.3) !important;
}

/* Pagination buttons - simplified styling */
.quarto-dark .dataTables_wrapper .dataTables_paginate .paginate_button {
    color: #d1d5db !important;
}

.quarto-dark .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background-color: rgba(107, 114, 128, 0.4) !important;
    color: #f3f4f6 !important;
}

.quarto-dark .dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background-color: rgba(107, 114, 128, 0.6) !important;
    color: #f9fafb !important;
}

.quarto-dark .dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    color: #6b7280 !important;
}

/* Selected rows */
.quarto-dark .dataTables_wrapper table.dataTable tbody tr.selected {
    background-color: rgba(75, 85, 99, 0.5) !important;
    color: #f3f4f6 !important;
}

/* Processing indicator */
.quarto-dark .dataTables_wrapper .dataTables_processing {
    background-color: rgba(55, 65, 81, 0.9) !important;
    color: #d1d5db !important;
}

/* Empty state */
.quarto-dark .dataTables_wrapper .dataTables_empty {
    color: #9ca3af !important;
}

/* Navigation shelf - clean responsive flexbox */
.nav-shelf p {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 0.75rem !important;
    margin: 0 !important;
}

@media (max-width: 576px) {
    .nav-shelf p {
        flex-direction: column !important;
        align-items: center !important;
    }
    
    .nav-shelf .btn-rt,
    .nav-shelf .btn-rt-solid {
        width: 100% !important;
        max-width: 280px !important;
    }
}

/* Card component with Icon, Title, and Text. */

/* Feature Cards Grid */
.feature-cards-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}

/* Button Classes */
/* Custom button with transparent background, border that turns to highlight color on hover */
.btn-rt {
    border-radius: .33rem;
    padding: .5rem 1rem;
    background-color: transparent;
    border: 1px solid #808080;
    color: var(--bs-body-color);
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-rt:hover {
    background-color: transparent;
    border-color: var(--bs-primary);
    color: var(--bs-primary);
    text-decoration: none;
}

/* Button with solid background of highlight color which gets darker on hover */
.btn-rt-solid {
    border-radius: .33rem;
    padding: .5rem 1rem;
    background-color: var(--bs-primary);
    border: 1px solid var(--bs-primary);
    color: var(--bs-body-bg);
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-rt-solid:hover {
    background-color: var(--bs-primary);
    color: var(--bs-body-bg);
    text-decoration: none;
    opacity: 0.9;
    filter: brightness(0.9);
}

/* Individual Feature Card */
.feature-card {
    background: var(--bs-body-bg);
    /* border: 0.5px solid var(--bs-border-color); */
    border: 1px solid gray;
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* .feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--bs-primary);
} */

/* Card Icon */
.feature-card-icon {
    font-size: 2rem;
    color: var(--bs-primary);
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.feature-card-icon svg {
    width: 2rem;
    height: 2rem;
}

/* Card Title */
.feature-card-title {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--bs-heading-color);
    line-height: 1;
    opacity: 0.75;
}

/* Card Description */
.feature-card-description {
    color: var(--bs-body-color);
    line-height: 1.5;
    margin: 0;
    flex-grow: 1;
    font-size: 0.9rem;
}

.feature-card-description p {
    margin-bottom: 0px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .feature-cards-container {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        margin: 1rem 0;
    }
    
    .feature-card {
        padding: 1rem;
    }
    
    .feature-card-icon {
        font-size: 1.75rem;
    }
    
    .feature-card-icon svg {
        width: 1.75rem;
        height: 1.75rem;
    }
    
    .feature-card-title {
        font-size: 1rem;
    }
    
    .feature-card-description {
        font-size: 0.875rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .feature-cards-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.875rem;
    }
}

/* Custom note callout */
.note-rt {
    border-radius: .33rem;
    padding: 1rem;
    background-color: var(--bs-body-bg);
    /* border: 1px solid var(--bs-border-color); */
    color: var(--bs-body-color);
    margin: 1rem 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px color-mix(in srgb, var(--bs-body-color) 10%, transparent);
    position: relative;
}

.note-rt:hover {
    box-shadow: 0 4px 12px color-mix(in srgb, var(--bs-body-color) 20%, transparent);
    /* border-color: var(--bs-primary); */
}

/* Note icon/title styling */
.note-rt .note-title {
    font-weight: 700;
    color: var(--bs-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.note-rt .note-title svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* Note content */
.note-rt .note-content {
    color: var(--bs-body-color);
    line-height: 1.5;
}

.note-rt .note-content p:last-child {
    margin-bottom: 0;
}

/* Variants for different note types */
.note-rt.note-info {
    border-color: #0dcaf0;
}

.note-rt.note-info .note-title {
    color: #0dcaf0;
}

.note-rt.note-warning {
    border-color: #ffc107;
}

.note-rt.note-warning .note-title {
    color: #ffc107;
}

.note-rt.note-success {
    border-color: #198754;
}

.note-rt.note-success .note-title {
    color: #198754;
}

.note-rt.note-danger {
    border-color: #dc3545;
}

.note-rt.note-danger .note-title {
    color: #dc3545;
}

/* Simple callout that uses var(--bs-primary) and uses carbon icons to differentiate between note types */
.callout-rt-info {
    border-radius: .33rem;
    padding: 1rem;
    padding-left: 3rem;
    background-color: var(--bs-body-bg);
    border: 1px solid var(--bs-primary);
    color: var(--bs-body-color);
    margin: 1rem 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: relative;
}

.callout-rt-info::before {
    content: "";
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.5rem;
    height: 1.5rem;
    background-image: 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' d='M16 30a14 14 0 1 1 14-14a14.016 14.016 0 0 1-14 14m0-26a12 12 0 1 0 12 12A12.014 12.014 0 0 0 16 4'/%3E%3Cpath fill='currentColor' d='M16 22a6 6 0 1 1 6-6a6.007 6.007 0 0 1-6 6m0-10a4 4 0 1 0 4 4a4.005 4.005 0 0 0-4-4'/%3E%3Ccircle cx='16' cy='10' r='2' fill='currentColor'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    color: var(--bs-primary);
}

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

/* .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;
}

/* qwebr */
/* 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;
}

/* 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;
    }
}