/* Sidebar & Content Transitions */
#quarto-sidebar {
  transition: transform 0.3s ease, margin-left 0.3s ease;
}

#quarto-content {
  transition: margin-left 0.3s ease;
}

/* Fixed Toggle Button at Top-Left */
#fixed-sidebar-toggle {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1050; /* Sits above sidebar and topbar */
  background: var(--bs-body-bg, #ffffff);
  border: 1px solid var(--bs-border-color, #dee2e6);
  color: var(--bs-body-color, #333);
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

#fixed-sidebar-toggle:hover {
  background-color: var(--bs-light, #f8f9fa);
  border-color: var(--bs-primary, #007bff);
}

/* Sidebar Hidden State */
body.sidebar-hidden #quarto-sidebar {
  transform: translateX(-100%);
  position: absolute;
}

body.sidebar-hidden #quarto-content {
  margin-left: 0 !important;
  max-width: 100% !important;
}

/* Add slight top padding to content/sidebar title if the button overlaps text */
@media (min-width: 992px) {
  #quarto-sidebar .sidebar-header {
    padding-left: 45px; /* Leaves space for the toggle button inside sidebar header */
  }
}
