/*-- scss:defaults --*/
$content-padding-top: 14px !default;

/*-- scss:mixins --*/

/*-- scss:rules --*/

footer.footer .nav-footer,
#quarto-header nav {
  padding-left: 1em;
  padding-right: 1em;
}

#TOC {
  padding-left: 0.5em;
}

// content padding
#quarto-content > * {
  padding-top: $content-padding-top;
}

@include media-breakpoint-down(lg) {
  #quarto-content > * {
    padding-top: 0;
  }

  #quarto-content .subtitle {
    padding-top: $content-padding-top;
  }

  #quarto-content section:first-of-type h2:first-of-type {
    margin-top: 1rem;
  }
}

// headroom
.headroom-target,
header.headroom {
  will-change: transform;
  transition: transform 200ms linear;
  transition: position 200ms linear;
}

header.headroom--pinned {
  transform: translateY(0%);
}

header.headroom--unpinned {
  transform: translateY(-100%);
}

.navbar-container {
  width: 100%;
}

.navbar-brand {
  text-overflow: ellipsis;
  overflow: hidden;
  max-width: calc(100% - 85px);
}

.navbar-toggler {
  flex-basis: content;
  flex-shrink: 0;
}

.navbar-brand > img {
  max-height: 24px;
  width: auto;
  padding-right: 6px;
}

nav .nav-item:not(.compact) {
  padding-top: 1px;
}

nav .nav-link i,
nav .dropdown-item i {
  padding-right: 1px;
}

.navbar-expand-lg .navbar-nav .nav-link {
  padding-left: 0.6rem;
  padding-right: 0.6rem;
}

nav .nav-item.compact .nav-link {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  font-size: 1.1rem;
}

.navbar-nav .dropdown-menu {
  min-width: 220px;
  font-size: 0.9rem;
}

.navbar {
  .navbar-nav {
    .nav-link.dropdown-toggle::after {
      opacity: 0.75;
      vertical-align: 0.175em;
    }
  }

  ul.dropdown-menu {
    padding-top: 0;
    padding-bottom: 0;
  }
  .dropdown-header {
    text-transform: uppercase;
    font-size: 0.8rem;
    padding: 0 0.5rem;
  }

  .dropdown-item {
    padding: 0.4rem 0.5rem;
    & > i.bi {
      margin-left: 0.1rem;
      margin-right: 0.25em;
    }
  }
}

.sidebar #quarto-search {
  margin-top: -1px;
  svg.aa-SubmitIcon {
    width: 16px;
    height: 16px;
  }
}

.sidebar-navigation a {
  color: inherit;
}

.sidebar-title {
  margin-top: 0.25rem;
  padding-bottom: 0.5rem;
  font-size: 1.3rem;
  line-height: 1.6rem;
  visibility: visible;
}

.sidebar-title > a {
  font-size: inherit;
  text-decoration: none;
}

.sidebar-title .sidebar-tools-main {
  margin-top: -6px;
}

.sidebar-header-stacked .sidebar-title {
  margin-top: 0.6rem;
}

.sidebar-logo {
  max-width: 90%;
  padding-bottom: 0.5rem;
}

.sidebar-navigation li a {
  text-decoration: none;
}

// Sidebar tools
.sidebar-navigation .sidebar-tool {
  opacity: 0.7;
  font-size: 0.875rem;
}

#quarto-sidebar > nav > .sidebar-tools-main {
  margin-left: 14px;
}

.sidebar-tools-main {
  margin-left: 0px;
}

.sidebar-tools-main:not(.tools-wide) {
  display: inline-block;
  vertical-align: middle;
}

.sidebar-tools-main.tools-wide {
  padding-top: 0.3em;
}

.sidebar-navigation .sidebar-tool.dropdown-toggle::after {
  display: none;
}

// Sidebar navigation items
$sidebar-items-gap-spacing: 0.2em;
$sidebar-section-indent: 0.5em;
$sidebar-section-bottom-margin: 0.2em;

.sidebar.sidebar-navigation > * {
  padding-top: 1em;
}

.sidebar-item {
  margin-bottom: $sidebar-items-gap-spacing;
}

.sidebar-section {
  margin-top: $sidebar-items-gap-spacing;
  padding-left: $sidebar-section-indent;
  padding-bottom: $sidebar-section-bottom-margin;
}

.sidebar-item .sidebar-item-container {
  // Positions the link and dongle
  display: flex;
  justify-content: space-between;
}

.sidebar-item .sidebar-item-toggle .bi {
  // The dongle for opening and closing sections
  font-size: 0.7rem;
  text-align: center;
}

.sidebar-navigation .sidebar-divider {
  margin-left: 0;
  margin-right: 0;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

// Toggle the top secondar navigation bar
@include media-breakpoint-down(md) {
  .quarto-secondary-nav {
    display: block;
  }
}

@include media-breakpoint-up(lg) {
  .quarto-secondary-nav {
    display: none;
  }
}

$sidebar-hl: if(
  $sidebar-hl,
  sidebar-hl,
  theme-contrast($nav-link-color, $sidebar-bg)
);
$sidebar-color: rgba($sidebar-fg, 1) !default;
$sidebar-hover-color: rgba($sidebar-hl, 0.8) !default;
$sidebar-active-color: $sidebar-hl !default;
$sidebar-disabled-color: rgba($sidebar-fg, 0.75) !default;

.quarto-secondary-nav .quarto-btn-toggle {
  color: $sidebar-color;
  padding-right: 0;
}

.quarto-secondary-nav[aria-expanded="false"]
  .quarto-btn-toggle
  .bi-chevron-right::before {
  transform: none;
}

.quarto-secondary-nav[aria-expanded="true"]
  .quarto-btn-toggle
  .bi-chevron-right::before {
  transform: rotate(90deg);
}

.quarto-secondary-nav .quarto-btn-toggle .bi-chevron-right::before {
  transition: transform 200ms ease;
}

.quarto-secondary-nav {
  cursor: pointer;
}

.quarto-secondary-nav-title {
  color: $sidebar-color;
  padding-top: 4px;
}

div.sidebar-item-container {
  color: $sidebar-color;
  &:hover,
  &:focus {
    color: $sidebar-hover-color;
  }

  &.disabled {
    color: $sidebar-disabled-color;
  }

  .active,
  .show > .nav-link {
    color: $sidebar-active-color;
  }
}

nav.sidebar.sidebar-navigation {
  @if $sidebar-bg {
    background-color: $sidebar-bg;
  } @else {
    background-color: $body-bg;
  }
}

@if $sidebar-border {
  .sidebar.sidebar-navigation:not(.rollup) {
    border-right: 1px solid $table-border-color !important;
  }
}

@include media-breakpoint-down(lg) {
  .sidebar-navigation .sidebar-item a,
  .nav-page .nav-page-text,
  .sidebar-navigation {
    font-size: $sidebar-font-size-collapse;
  }

  .sidebar-navigation ul.sidebar-section.depth1 .sidebar-section-item {
    font-size: $sidebar-font-size-section-collapse;
  }

  .sidebar-logo {
    display: none;
  }

  .sidebar.sidebar-navigation {
    position: static;
    border-bottom: 1px solid $table-border-color;
  }

  .sidebar.sidebar-navigation.collapsing {
    position: fixed;
    z-index: 1000;
  }

  .sidebar.sidebar-navigation.show {
    position: fixed;
    z-index: 1000;
  }

  .sidebar.sidebar-navigation {
    transition: height 0.15s linear;
    width: 100%;
  }

  nav.quarto-secondary-nav {
    @if $sidebar-bg {
      background-color: $sidebar-bg;
    } @else {
      background-color: $body-bg;
    }
    border-bottom: 1px solid $table-border-color;
  }

  .sidebar .sidebar-footer {
    visibility: visible;
    padding-top: 1rem;
    position: inherit;
  }

  .sidebar-tools-collapse {
    display: block;
  }
}

@include media-breakpoint-up(lg) {
  #quarto-sidebar {
    display: flex;
    flex-direction: column;
  }
  .nav-page .nav-page-text,
  .sidebar-navigation .sidebar-section .sidebar-item {
    font-size: $sidebar-font-size-section;
  }

  .sidebar-navigation .sidebar-item {
    font-size: $sidebar-font-size;
  }

  .sidebar.sidebar-navigation {
    display: block;
    position: sticky;
  }

  .sidebar-search {
    width: 100%;
  }

  .sidebar .sidebar-footer {
    visibility: visible;
  }
}

.sidebar .sidebar-footer {
  padding: 0.5rem 1rem;
  align-self: flex-end;
  color: $text-muted;
  width: 100%;
}

#quarto-sidebar {
  width: 100%;
  padding-right: 1em;
  color: $sidebar-fg;
}

.quarto-sidebar-footer {
  font-size: 0.875em;
}

.sidebar-section .bi-chevron-right {
  vertical-align: middle;
}

.sidebar-section a .bi-chevron-right::before {
  transform: rotate(90deg);
}

.sidebar-section a.collapsed .bi-chevron-right::before {
  transform: none;
}

.sidebar-section .bi-chevron-right::before {
  font-size: 0.9em;
  transition: transform 200ms ease;
}

.notransition {
  -webkit-transition: none !important;
  -moz-transition: none !important;
  -o-transition: none !important;
  transition: none !important;
}

// This is used to suppress the focus borders on Chrome when the user is simply
// clicking with the mouse vs using the keyboard to move focus.
.btn:focus:not(:focus-visible) {
  box-shadow: none;
}

.page-navigation {
  display: flex;
  justify-content: space-between;
}

.nav-page {
  padding-bottom: 0.75em;
}

.nav-page .bi {
  font-size: 1.8rem;
  vertical-align: middle;
}

.nav-page .nav-page-text {
  padding-left: 0.25em;
  padding-right: 0.25em;
}

.nav-page a {
  color: $text-muted;
  text-decoration: none;
  display: flex;
  align-items: center;
}

.nav-page a:hover {
  color: $link-hover-color;
}

.toc-actions {
  display: flex;
}

.toc-actions p {
  margin-block-start: 0;
  margin-block-end: 0;
}

.toc-actions a {
  text-decoration: none;
  color: inherit;
  font-weight: 400;
}

.toc-actions a:hover {
  color: $link-hover-color;
}

.toc-actions .action-links {
  margin-left: 4px;
}

.sidebar nav#TOC .toc-actions .bi {
  margin-left: -4px;
  font-size: 0.7rem;
  color: $text-muted;
}

.sidebar nav#TOC .toc-actions > div:first-of-type {
  margin-top: -3px;
}

.sidebar nav#TOC .toc-actions p {
  font-size: $toc-font-size;
}

.sidebar nav#TOC .header-section-number {
  display: none;
}

// border weight
// border style
.nav-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  @if variable-exists(footer-bg) {
    background-color: $footer-bg;
  }
}

body:not(.floating) .nav-footer {
  @if variable-exists(footer-border) and $footer-border {
    @if variable-exists(footer-border-color) {
      border-top: 1px solid $footer-border-color;
    } @else {
      border-top: 1px solid $table-border-color;
    }
  }
}

.nav-footer-contents {
  color: $text-muted;
  margin-top: 0.25rem;
}

.nav-footer {
  min-height: 3.5em;
  color: $footer-fg;
  a {
    @if variable-exists(footer-fg) {
      color: $footer-fg;
    }
  }
}

@if variable-exists(footer-left-font-size) {
  .nav-footer .nav-footer-left {
    font-size: $footer-left-font-size;
  }
}

@if variable-exists(footer-center-font-size) {
  .nav-footer .nav-footer-center {
    font-size: $footer-center-font-size;
  }
}

@if variable-exists(footer-right-font-size) {
  .nav-footer .nav-footer-right {
    font-size: $footer-right-font-size;
  }
}

.nav-footer-left .footer-items,
.nav-footer-center .footer-items,
.nav-footer-right .footer-items {
  display: flex;
  padding-top: 0.3em;
  padding-bottom: 0.3em;
  margin-bottom: 0em;
}

.nav-footer-left .footer-items .nav-link,
.nav-footer-center .footer-items .nav-link,
.nav-footer-right .footer-items .nav-link {
  padding-left: 0.6em;
  padding-right: 0.6em;
}
.nav-footer-left {
  margin-right: auto;
}

.nav-footer-center {
  min-height: 3em;
  position: absolute;
  text-align: center;
  .footer-items {
    justify-content: center;
  }
}

@include media-breakpoint-down(md) {
  .nav-footer-center {
    margin-top: 3em;
  }
}

.nav-footer-right {
  margin-left: auto;
}

.navbar .quarto-reader-toggle {
  padding-left: 0.4em;
  padding-right: 0;
}

.navbar .quarto-reader-toggle.reader .quarto-reader-toggle-btn {
  background-color: $navbar-fg;
  border-radius: 3px;
}

.quarto-reader-toggle.reader.sidebar-tool .quarto-reader-toggle-btn {
  background-color: $sidebar-fg;
  border-radius: 3px;
}

.quarto-reader-toggle.sidebar-tool {
  padding-left: 0.3em;
}

.quarto-reader-toggle .quarto-reader-toggle-btn {
  display: inline-flex;
  padding-left: 0.1em;
  padding-right: 0.3em;
  text-align: center;
}

.navbar .quarto-reader-toggle:not(.reader) .bi::before {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="#{colorToRGBA($navbar-fg)}" class="bi bi-justify-left" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M2 12.5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5zm0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5zm0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5zm0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5z"/></svg>');
}

.navbar .quarto-reader-toggle.reader .bi::before {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="#{colorToRGBA($navbar-bg)}" class="bi bi-justify-left" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M2 12.5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5zm0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5zm0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5zm0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5z"/></svg>');
}

.sidebar-navigation .quarto-reader-toggle:not(.reader) .bi::before {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="#{colorToRGBA(theme-dim($sidebar-fg, 10%))}" class="bi bi-justify-left" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M2 12.5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5zm0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5zm0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5zm0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5z"/></svg>');
}

.sidebar-navigation .quarto-reader-toggle.reader .bi::before {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="#{colorToRGBA(theme-dim($sidebar-bg, 10%))}" class="bi bi-justify-left" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M2 12.5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5zm0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5zm0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5zm0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5z"/></svg>');
}
