// floating

.top-right {
  position: absolute;
  top: 1em;
  right: 1em;
}

// hidden

.hidden {
  display: none !important;
}

// layout and figures

.quarto-layout-panel {
  margin-bottom: 1em;
}

.quarto-layout-panel > figure {
  width: 100%;
}
.quarto-layout-panel > figure > figcaption,
.quarto-layout-panel > .panel-caption {
  margin-top: 10pt;
}

.quarto-layout-panel > .table-caption {
  margin-top: 0px;
}

.table-caption p {
  margin-bottom: 0.5em;
}

.quarto-layout-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
}
.quarto-layout-valign-top {
  align-items: flex-start;
}
.quarto-layout-valign-bottom {
  align-items: flex-end;
}
.quarto-layout-valign-center {
  align-items: center;
}
.quarto-layout-cell {
  position: relative;
  margin-right: 20px;
}
.quarto-layout-cell:last-child {
  margin-right: 0;
}
.quarto-layout-cell figure,
.quarto-layout-cell > p {
  margin: 0.2em;
}
.quarto-layout-cell img {
  max-width: 100%;
}
.quarto-layout-cell .html-widget {
  width: 100% !important;
}
.quarto-layout-cell div figure p {
  margin: 0;
}
.quarto-layout-cell figure {
  display: inline-block;
  margin-inline-start: 0;
  margin-inline-end: 0;
}
.quarto-layout-cell table {
  display: inline-table;
}
.quarto-layout-cell-subref figcaption,
figure .quarto-layout-row figure figcaption {
  text-align: center;
  font-style: italic;
}
.quarto-figure {
  position: relative;
  margin-bottom: 1em;
}

.quarto-figure > figure {
  width: 100%;
  margin-bottom: 0;
}
.quarto-figure-left > figure > p {
  text-align: left;
}
.quarto-figure-center > figure > p {
  text-align: center;
}
.quarto-figure-right > figure > p {
  text-align: right;
}
figure > p:empty {
  display: none;
}
figure > p:first-child {
  margin-top: 0;
  margin-bottom: 0;
}
figure > figcaption {
  margin-top: 0.5em;
}

// anchor

// anchor js

div[id^="tbl-"] {
  position: relative;
}

.quarto-figure > .anchorjs-link,
div[id^="tbl-"] > .anchorjs-link {
  position: absolute;
  top: 0;
  right: 0;
}

/* workaround for anchorjs not hitting on generic :hover selector */
.quarto-figure:hover > .anchorjs-link,
div[id^="tbl-"]:hover > .anchorjs-link,
h2:hover > .anchorjs-link,
h3:hover > .anchorjs-link,
h4:hover > .anchorjs-link,
h5:hover > .anchorjs-link,
h6:hover > .anchorjs-link,
.reveal-anchorjs-link > .anchorjs-link {
  opacity: 1;
}

#title-block-header {
  margin-block-end: 1rem;
  position: relative;
  margin-top: -1px; // Chrome draws 1px white line between navbar and title block
}

#title-block-header .abstract {
  margin-block-start: 1rem;
}

#title-block-header .abstract .abstract-title {
  font-weight: 600;
}

#title-block-header a {
  text-decoration: none;
}

#title-block-header .author,
#title-block-header .date,
#title-block-header .doi {
  margin-block-end: 0.2rem;
}

#title-block-header .quarto-title-block > div {
  display: flex;
}

#title-block-header .quarto-title-block > div > h1 {
  flex-grow: 1;
}

#title-block-header .quarto-title-block > div > button {
  flex-shrink: 0;
  height: 2.25rem;
  margin-top: 0;
}

#title-block-header .quarto-title-block > div > button {
  @if mixin-exists(media-breakpoint-up) {
    @include media-breakpoint-up(lg) {
      margin-top: 5px;
    }
  }
}

// (Remove bottom margin from paragraphs in table headers)
tr.header > th > p:last-of-type {
  margin-bottom: 0px;
}

table,
.table {
  caption-side: $tbl-cap-location;
  margin-bottom: 1.5rem;
}

caption,
.table-caption {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  text-align: center;
}

// utterances
.utterances {
  max-width: none;
  margin-left: -8px;
}

// iframe
iframe {
  margin-bottom: 1em;
}

// details
details {
  margin-bottom: 1em;
}
details[show] {
  margin-bottom: 0;
}

details > summary {
  @if variable-exists(text-muted) {
    color: $text-muted;
  }
}

details > summary > p:only-child {
  display: inline;
}

// codeCopy
pre.sourceCode,
code.sourceCode {
  position: relative;
}

// default to scrolling <code> output rather than wrapping, since
// multi-column tabular output (very common for R & Python) is
// unreadable when wrapped.
code {
  white-space: pre;
}
@media print {
  code {
    white-space: pre-wrap;
  }
}
pre > code {
  display: block;
}

pre > code.sourceCode {
  white-space: $code-white-space;
}

pre > code.sourceCode > span > a:first-child::before {
  text-decoration: none;
}

pre.code-overflow-wrap > code.sourceCode {
  white-space: pre-wrap;
}

pre.code-overflow-scroll > code.sourceCode {
  white-space: pre;
}

// code linking (pkgdown style)
code a:any-link {
  color: inherit;
  text-decoration: none;
}
code a:hover {
  color: inherit;
  text-decoration: underline;
}

// task lists
ul.task-list {
  padding-left: 1em;
}

// tippy

[data-tippy-root] {
  display: inline-block;
}

.tippy-content .footnote-back {
  display: none;
}

// embedded source code
.quarto-embedded-source-code {
  display: none;
}

// unresolved crossrefs
.quarto-unresolved-ref {
  font-weight: 600;
}

// html cover image injection
.quarto-cover-image {
  max-width: 35%;
  float: right;
  margin-left: 30px;
}

// provide margin below jupyter widgets
.cell-output-display .widget-subarea {
  margin-bottom: 1em;
}

// fix for selectize inputs getting their contents clipped
.cell-output-display:not(.no-overflow-x) {
  overflow-x: auto;
}

.panel-input {
  margin-bottom: 1em;
}

.panel-input > div,
.panel-input > div > div {
  display: inline-block;
  vertical-align: top;
  padding-right: 12px;
}

.panel-input > p:last-child {
  margin-bottom: 0;
}

.layout-sidebar {
  margin-bottom: 1em;
}

.layout-sidebar .tab-content {
  border: none;
}

.tab-content > .page-columns.active {
  display: grid;
}

// default styling for .code-preview=".." iframes
div.sourceCode > iframe {
  width: 100%;
  height: 300px;

  // this negative-margin hack works around the rendering issue with
  // iframes and parent elements with rounded corners if the border
  // radius for (eg) div.sourceCode is changed, this is likely going
  // to need changing as well.
  @if variable-exists(code-preview-margin-bottom) {
    margin-bottom: $code-preview-margin-bottom;
  } @else {
    margin-bottom: -0.5em;
  }
  @if variable-exists(code-preview-border-color) {
    border: $code-preview-border-color;
  }
}

// ansi escaping
div.ansi-escaped-output {
  font-family: monospace;
  display: block;
}

/*!
*
* ansi colors from IPython notebook's
*
*/
/* CSS font colors for translated ANSI escape sequences */
/* The color values are a mix of
   http://www.xcolors.net/dl/baskerville-ivorylight and
   http://www.xcolors.net/dl/euphrasia */
.ansi-black-fg {
  color: #3e424d;
}
.ansi-black-bg {
  background-color: #3e424d;
}
.ansi-black-intense-fg {
  color: #282c36;
}
.ansi-black-intense-bg {
  background-color: #282c36;
}
.ansi-red-fg {
  color: #e75c58;
}
.ansi-red-bg {
  background-color: #e75c58;
}
.ansi-red-intense-fg {
  color: #b22b31;
}
.ansi-red-intense-bg {
  background-color: #b22b31;
}
.ansi-green-fg {
  color: #00a250;
}
.ansi-green-bg {
  background-color: #00a250;
}
.ansi-green-intense-fg {
  color: #007427;
}
.ansi-green-intense-bg {
  background-color: #007427;
}
.ansi-yellow-fg {
  color: #ddb62b;
}
.ansi-yellow-bg {
  background-color: #ddb62b;
}
.ansi-yellow-intense-fg {
  color: #b27d12;
}
.ansi-yellow-intense-bg {
  background-color: #b27d12;
}
.ansi-blue-fg {
  color: #208ffb;
}
.ansi-blue-bg {
  background-color: #208ffb;
}
.ansi-blue-intense-fg {
  color: #0065ca;
}
.ansi-blue-intense-bg {
  background-color: #0065ca;
}
.ansi-magenta-fg {
  color: #d160c4;
}
.ansi-magenta-bg {
  background-color: #d160c4;
}
.ansi-magenta-intense-fg {
  color: #a03196;
}
.ansi-magenta-intense-bg {
  background-color: #a03196;
}
.ansi-cyan-fg {
  color: #60c6c8;
}
.ansi-cyan-bg {
  background-color: #60c6c8;
}
.ansi-cyan-intense-fg {
  color: #258f8f;
}
.ansi-cyan-intense-bg {
  background-color: #258f8f;
}
.ansi-white-fg {
  color: #c5c1b4;
}
.ansi-white-bg {
  background-color: #c5c1b4;
}
.ansi-white-intense-fg {
  color: #a1a6b2;
}
.ansi-white-intense-bg {
  background-color: #a1a6b2;
}
.ansi-default-inverse-fg {
  color: #ffffff;
}
.ansi-default-inverse-bg {
  background-color: #000000;
}
.ansi-bold {
  font-weight: bold;
}
.ansi-underline {
  text-decoration: underline;
}

:root {
  --quarto-body-bg: #{$body-bg};
  --quarto-body-color: #{$body-color};
  --quarto-text-muted: #{$text-muted};
  --quarto-border-color: #{$table-border-color};
  --quarto-border-width: #{$border-width};
  --quarto-border-radius: #{$border-radius};
}

/* rules to support GT table styling */
table.gt_table {
  color: var(--quarto-body-color);
  font-size: 1em;
  width: 100%; // to match other table styling
  background-color: transparent;
  border-top-width: inherit;
  border-bottom-width: inherit;
  border-color: var(--quarto-border-color);
}

table.gt_table th.gt_col_heading {
  color: var(--quarto-body-color);
  font-weight: bold;
  background-color: transparent;
}

table.gt_table thead.gt_col_headings {
  border-bottom: 1px solid currentColor;
  border-top-width: inherit;
  border-top-color: var(--quarto-border-color);
}

table.gt_table thead.gt_col_headings:not(:first-child) {
  border-top-width: 1px;
  border-top-color: var(--quarto-border-color);
}

table.gt_table td.gt_row {
  border-bottom-width: 1px;
  border-bottom-color: var(--quarto-border-color);
  border-top-width: 0px;
}

table.gt_table tbody.gt_table_body {
  border-top-width: 1px;
  border-bottom-width: 1px;
  border-bottom-color: var(--quarto-border-color);
  border-top-color: currentColor;
}

/* restore previous pandoc columns behavior 
   (too many reports of slide layout breaking)
   see https://github.com/jgm/pandoc/pull/8237
*/
div.columns {
  display: initial;
  gap: initial;
}
div.column {
  display: inline-block;
  overflow-x: initial;
  vertical-align: top;
  width: 50%;
}

@media print {
  :root {
    font-size: 11pt;
  }
  #quarto-sidebar,
  #TOC,
  .nav-page {
    display: none;
  }
  .page-columns .content {
    grid-column-start: page-start;
  }
  .fixed-top {
    position: relative;
  }
  .panel-caption,
  .figure-caption,
  figcaption {
    color: #666;
  }
}
