﻿/* Vue.js v-cloak directive - hides elements until Vue is ready */
[v-cloak] {
  display: none !important;
}

/* CSS Variables - Layout Dimensions */
:root {
  --vertical-menu-width: 5rem;
  --mobile-header-height: 3.5rem;
  --sidebar-left-width: 20vw;
  --sidebar-left-width-min: 15rem;
  --sidebar-left-width-max: 25rem;
  --sidebar-left-width-mobile: calc(100vw - var(--vertical-menu-width));
  --sidebar-left-width-mobile-max: 25rem;
  --sidebar-right-width: 27vw;
  --sidebar-right-width-min: 15rem;
  --sidebar-right-width-max: 45rem;
  --sidebar-right-width-mobile: 100vw;
  --sidebar-right-width-mobile-max: 35rem;
}

.dropdown-menu {
  --bs-dropdown-divider-bg: var(--bs-border-color);
}

/* Custom theme-aware variables (only what Bootstrap doesn't provide) */
[data-bs-theme=light] {
  --bg-sidebar: var(--bs-white);
  --bg-main: var(--bs-gray-100);
  --bg-hover: var(--bs-gray-200);
  --bg-vertical-menu: var(--bs-gray-100);
  --bs-body-color: var(--bs-gray-800);
  --svg-icon-filter: brightness(0) saturate(100%) invert(42%) sepia(0%) saturate(0%) hue-rotate(180deg) brightness(95%) contrast(88%);
}

[data-bs-theme=dark] {
  --bg-sidebar: color-mix(in oklab, var(--bs-body-bg), black 10%);
  --bg-main: var(--bs-body-bg);
  --bg-hover: color-mix(in oklab, var(--bs-body-bg), white 5%);
  --bg-vertical-menu: color-mix(in oklab, var(--bs-body-bg), black 30%);
  --bs-border-color: var(--bs-secondary-bg);
  --bs-body-color: var(--bs-gray-500);
  --svg-icon-filter: brightness(0) saturate(100%) invert(75%) sepia(0%) saturate(0%) hue-rotate(180deg) brightness(95%) contrast(88%);
}

/* Loading state */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.loading-spinner .spinner-border {
  color: var(--bs-primary);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--bs-gray-600);
}
.empty-state .empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.3;
}
.empty-state .empty-state-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--bs-body-color);
}
.empty-state .empty-state-text {
  font-size: 0.8125rem;
}

/* Smaller empty state for sidebars and compact areas */
.empty-state-small {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--bs-gray-600);
}
.empty-state-small .empty-state-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  opacity: 0.3;
}
.empty-state-small p {
  font-size: 0.8125rem;
  margin-bottom: 0;
}

/* Make main content use flexbox for independent tab scrolling */
.main-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  padding: 0;
}

/* Empty state in main content should be centered vertically */
.main-content .empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}

/* Standardize table header background in card bodies */
.card .card-body .table > thead > tr > th {
  background-color: var(--bs-tertiary-bg);
}

/* Remove caret from actions dropdown toggle buttons in tables */
.table .btn-group .dropdown-toggle::after {
  display: none;
}

/* Custom scrollbar mixin */
.svg-icon {
  filter: var(--svg-icon-filter);
}

/* Nested Modal Styles - for bootbox dialogs inside modals */
.modal.nested-modal {
  z-index: 1060 !important;
}
.modal.nested-modal + .modal-backdrop {
  z-index: 1059 !important;
}

/* Main grid layout */
.main-page-container {
  display: grid;
  grid-template-columns: var(--vertical-menu-width) 1fr;
  grid-template-rows: 100vh;
  height: 100vh;
  overflow: hidden;
  background-color: var(--bg-main);
}
.main-page-container.has-left-sidebar {
  grid-template-columns: var(--vertical-menu-width) minmax(var(--sidebar-left-width-min), min(var(--sidebar-left-width), var(--sidebar-left-width-max))) 1fr;
}
.main-page-container.has-right-sidebar {
  grid-template-columns: var(--vertical-menu-width) 1fr minmax(var(--sidebar-right-width-min), min(var(--sidebar-right-width), var(--sidebar-right-width-max)));
}
.main-page-container.has-left-sidebar.has-right-sidebar {
  grid-template-columns: var(--vertical-menu-width) minmax(var(--sidebar-left-width-min), min(var(--sidebar-left-width), var(--sidebar-left-width-max))) 1fr minmax(var(--sidebar-right-width-min), min(var(--sidebar-right-width), var(--sidebar-right-width-max)));
}

/* Main content area */
.main-content {
  background-color: var(--bg-main);
  overflow-y: auto;
  padding: 2rem 2.5rem;
}
.main-content .main-content-header {
  margin-bottom: 2rem;
}
.main-content .main-content-title {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--bs-body-color);
}

/* Vertical menu (far left) */
.vertical-menu {
  background-color: var(--bg-vertical-menu);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem 0;
  gap: 0.25rem;
  border-right: 1px solid var(--bs-border-color);
}
.vertical-menu .vertical-menu-item {
  width: 4.2rem;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /*gap: 0.25rem;*/
  padding: 0.5rem 0.25rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
  color: var(--bs-gray-600);
  text-decoration: none;
  position: relative;
}
.vertical-menu .vertical-menu-item:hover {
  background-color: var(--bs-body-bg);
  color: var(--bs-body-color);
}
.vertical-menu .vertical-menu-item.active {
  background-color: var(--bs-primary);
  color: var(--bs-white);
}
.vertical-menu .vertical-menu-item i {
  font-size: 1.8rem;
}
.vertical-menu .vertical-menu-item .vertical-menu-item-label {
  font-size: 0.75rem;
  font-weight: 500;
  /*text-align: center;*/
  line-height: 1;
  white-space: nowrap;
}
.vertical-menu button.vertical-menu-item {
  background: none;
  border: none;
}
.vertical-menu:is([data-bs-theme=dark] .vertical-menu) {
  border-right: none;
}

/* Shared sidebar styles */
.sidebar {
  background-color: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sidebar.show {
  transform: translateX(0);
}
.sidebar .sidebar-header {
  padding: 1rem;
  border-bottom: 1px solid var(--bs-border-color);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.sidebar .sidebar-header .sidebar-title {
  margin: 0;
}
.sidebar .sidebar-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.5rem;
}
.sidebar .sidebar-content::-webkit-scrollbar {
  width: 0.4rem;
}
.sidebar .sidebar-content::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar .sidebar-content::-webkit-scrollbar-thumb {
  background: var(--bs-gray-600);
  border-radius: 0.3125rem;
}
.sidebar .sidebar-content::-webkit-scrollbar-thumb:hover {
  background: var(--bs-gray-700);
}
[data-bs-theme=dark] .sidebar .sidebar-content::-webkit-scrollbar-thumb:hover {
  background: var(--bs-gray-400);
}
.sidebar .sidebar-footer {
  padding: 1rem;
  border-top: 1px solid var(--bs-border-color);
}
.sidebar.left-sidebar {
  border-right: 1px solid var(--bs-border-color);
}
.sidebar.right-sidebar {
  border-left: 1px solid var(--bs-border-color);
}
.sidebar.right-sidebar .sidebar-header {
  border-bottom: none;
}

/* Sidebar Tabs */
.sidebar-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--bs-border-color);
  margin: -1rem -1rem 0 -1rem;
}

.sidebar-tab {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  background: transparent;
  color: var(--bs-gray-700);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
}
.sidebar-tab i {
  font-size: 1rem;
}
.sidebar-tab:hover {
  color: var(--bs-body-color);
  background-color: var(--bg-hover);
}
.sidebar-tab.active {
  color: var(--bs-body-color);
  font-weight: bold;
  /*background-color: var(--bs-primary);*/
}
.sidebar-tab.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 3px;
  background-color: var(--bs-primary);
}

.sidebar-tab-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  position: relative;
}

.sidebar-tab-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}
.sidebar-tab-pane > * {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Mobile header bar */
.mobile-header {
  height: var(--mobile-header-height);
  background-color: var(--bg-vertical-menu);
  border-bottom: 1px solid var(--bs-border-color);
  display: flex;
  align-items: center;
  padding: 0 0.5rem;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1050;
}
.mobile-header .mobile-header-left, .mobile-header .mobile-header-right {
  flex: 0 0 3rem;
  display: flex;
  justify-content: center;
}
.mobile-header .mobile-header-center {
  flex: 1;
  text-align: center;
  overflow: hidden;
}
.mobile-header .mobile-header-title {
  font-weight: 600;
  font-size: 1.1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.mobile-header .mobile-header-left i,
.mobile-header .mobile-header-right i {
  font-size: 1.8rem;
}
.mobile-header .mobile-header-left i {
  transform: scaleX(-1);
}

/* Mobile sidebar backdrop */
.mobile-sidebar-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1039;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}
.mobile-sidebar-backdrop.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
@media (max-width: 991px) {
  .mobile-sidebar-backdrop.show-initial {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
}

@media (min-width: 1200px) {
  .mobile-sidebar-backdrop {
    display: none;
  }
}
/* Medium breakpoint (lg to xl: 992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
  .main-page-container.has-left-sidebar, .main-page-container.has-left-sidebar.has-right-sidebar {
    grid-template-columns: var(--vertical-menu-width) minmax(var(--sidebar-left-width-min), min(var(--sidebar-left-width), var(--sidebar-left-width-max))) 1fr;
  }
  .main-page-container.has-right-sidebar {
    grid-template-rows: calc(100vh - var(--mobile-header-height));
    height: calc(100vh - var(--mobile-header-height));
    margin-top: var(--mobile-header-height);
  }
  .main-page-container.has-right-sidebar:not(.has-left-sidebar) {
    grid-template-columns: var(--vertical-menu-width) 1fr;
  }
  .vertical-menu {
    top: var(--mobile-header-height);
  }
  .left-sidebar {
    top: var(--mobile-header-height);
  }
  .right-sidebar {
    position: fixed;
    right: 0;
    top: var(--mobile-header-height);
    bottom: 0;
    width: min(var(--sidebar-right-width-mobile-max), var(--sidebar-right-width-mobile));
    z-index: 1040;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    border-left: 1px solid var(--bs-border-color) !important;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  }
  .right-sidebar.show {
    transform: translateX(0);
  }
}
/* Mobile breakpoint (< 992px) */
@media (max-width: 991px) {
  .main-page-container {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    height: calc(100vh - var(--mobile-header-height));
    margin-top: var(--mobile-header-height);
  }
  .main-page-container.has-left-sidebar, .main-page-container.has-right-sidebar, .main-page-container.has-left-sidebar.has-right-sidebar {
    grid-template-columns: 1fr;
  }
  .vertical-menu {
    position: fixed;
    left: 0;
    top: var(--mobile-header-height);
    bottom: 0;
    width: var(--vertical-menu-width);
    z-index: 1041;
    transform: translateX(-30rem);
    transition: transform 0.3s ease;
  }
  .vertical-menu.show {
    transform: translateX(0);
  }
  .sidebar {
    position: fixed;
    top: var(--mobile-header-height);
    bottom: 0;
    z-index: 1040;
    transition: transform 0.3s ease;
  }
  .left-sidebar {
    left: var(--vertical-menu-width);
    width: min(var(--sidebar-left-width-mobile-max), var(--sidebar-left-width-mobile));
    transform: translateX(-30rem);
    border-right: 1px solid var(--bs-border-color) !important;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
  }
  .left-sidebar.show {
    transform: translateX(0);
  }
  .right-sidebar {
    right: 0;
    width: min(var(--sidebar-right-width-mobile-max), var(--sidebar-right-width-mobile));
    transform: translateX(100%);
    border-left: 1px solid var(--bs-border-color) !important;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  }
  .right-sidebar.show {
    transform: translateX(0);
  }
  /* Adjust main content padding on mobile */
  .main-content {
    padding: 1rem 1.25rem;
  }
}
/* Tree view styles */
.tree-view {
  list-style: none;
  padding: 0;
  margin: 0;
}
.tree-view .tree-item {
  display: block;
  margin: 0;
}
.tree-view .tree-item .tree-item-content {
  display: flex;
  align-items: center;
  padding: 0.375rem 0.5rem;
  border-radius: var(--bs-border-radius);
  transition: background-color 0.15s ease, border 0.15s ease;
  text-decoration: none;
  color: var(--bs-body-color);
  margin-bottom: 0.125rem;
  border: 2px solid transparent;
}
.tree-view .tree-item .tree-item-content:hover {
  background-color: var(--bg-hover);
  color: var(--bs-body-color);
}
.tree-view .tree-item .tree-item-content.active {
  background-color: var(--bs-primary);
  color: var(--bs-white);
}
.tree-view .tree-item .tree-item-content.drag-over {
  border: 2px solid var(--bs-primary);
  background-color: rgba(var(--bs-primary-rgb), 0.1);
}
.tree-view .tree-item .tree-item-content.drag-over.active {
  background-color: rgba(var(--bs-primary-rgb), 0.8);
}
.tree-view .tree-item .tree-item-content .tree-item-icon,
.tree-view .tree-item .tree-item-content .tree-item-label {
  pointer-events: none;
}
.tree-view .tree-item-toggle {
  width: 1.25rem;
  height: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.25rem;
  cursor: pointer;
  border: none;
  background: transparent;
  padding: 0;
  color: inherit;
}
.tree-view .tree-item-toggle i {
  font-size: 0.75rem;
  transition: transform 0.15s ease;
}
.tree-view .tree-item-toggle.expanded i {
  transform: rotate(90deg);
}
.tree-view .tree-item-icon {
  margin-right: 0.5rem;
  width: 1rem;
  text-align: center;
  font-size: 1rem;
  opacity: 0.8;
}
.tree-view .tree-item-label {
  flex: 1;
  font-size: 0.8125rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tree-view .tree-item {
  position: relative;
}
.tree-view .tree-children {
  list-style: none;
  padding-left: 1.25rem;
  margin: 0;
}

/* List view styles */
.list-view {
  list-style: none;
  padding: 0;
  margin: 0;
}
.list-view .list-item {
  display: block;
  margin-bottom: 0.125rem;
}
.list-view .list-item-content {
  display: flex;
  align-items: center;
  padding: 0.625rem 0.75rem;
  border-radius: var(--bs-border-radius);
  cursor: pointer;
  transition: background-color 0.15s ease;
  text-decoration: none;
  color: var(--bs-body-color);
}
.list-view .list-item-content:hover {
  background-color: var(--bg-hover);
  color: var(--bs-body-color);
}
.list-view .list-item-content.active {
  background-color: var(--bs-primary);
  color: var(--bs-white);
}
.list-view .list-item-icon {
  margin-right: 0.75rem;
  width: 1rem;
  text-align: center;
  font-size: 1.1rem;
  opacity: 0.8;
}
.list-view .list-item-body {
  flex: 1;
  min-width: 0;
}
.list-view .list-item-title {
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 0.125rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.list-view .list-item-subtitle {
  font-size: 0.6875rem;
  color: var(--bs-gray-600);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Virtual Scroller Component Styles */
.virtual-scroller {
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
}
.virtual-scroller::-webkit-scrollbar {
  width: 0.4rem;
}
.virtual-scroller::-webkit-scrollbar-track {
  background: transparent;
}
.virtual-scroller::-webkit-scrollbar-thumb {
  background: var(--bs-gray-600);
  border-radius: 0.3125rem;
}
.virtual-scroller::-webkit-scrollbar-thumb:hover {
  background: var(--bs-gray-700);
}
[data-bs-theme=dark] .virtual-scroller::-webkit-scrollbar-thumb:hover {
  background: var(--bs-gray-400);
}

.virtual-scroller-spacer {
  width: 100%;
}

/* Article List Styles */
.article-list-scroller {
  height: 100%;
  overflow-x: hidden;
  margin: -0.5rem;
  padding: 0;
}

.article-list-row {
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: background-color 0.15s ease;
  background-color: transparent;
  padding: 0.375rem 0rem 0.375rem 0.5rem;
  font-size: 0.8125rem;
}
.article-list-row:hover {
  background-color: var(--bg-hover);
}
.article-list-row.active {
  background-color: var(--bs-primary);
  color: var(--bs-white);
}
.article-list-row .article-list-icon {
  width: 1.5rem;
  padding-right: 0.25rem;
  flex-shrink: 0;
}
.article-list-row .article-list-icon .article-icon {
  font-size: 1rem;
  opacity: 0.8;
}
.article-list-row .article-list-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  padding-right: 0.5rem;
}
.article-list-row .article-list-title .article-title-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.article-list-row .article-list-title .article-breadcrumbs {
  font-size: 0.75rem;
  color: var(--bs-secondary);
  margin-top: 0.125rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.article-list-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  color: var(--bs-secondary);
}

/* Shared status/actions behavior - used by both tree-item-content and article-list-row */
.status-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding-left: 0.25rem;
  padding-right: 0.5rem;
  min-width: 2rem;
}
.status-actions .user-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 600;
  color: white;
  flex-shrink: 0;
  margin-right: 0.125rem;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.status-actions .user-badge:hover {
  opacity: 0.85;
  transform: scale(1.05);
}
.status-actions .user-badge:active {
  transform: scale(0.95);
}
.status-actions .status-icon-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
}
.status-actions .status-icon-wrapper .status-icon {
  font-size: 1.2rem;
}
.status-actions .status-icon-wrapper .status-overlay-spinner {
  position: absolute;
  font-size: 1.7rem;
  pointer-events: none;
}
.status-actions .status-icon-wrapper .status-overlay-badge {
  position: absolute;
  top: -0.2rem;
  right: -0.2rem;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  border: 1px solid var(--bs-body-bg);
  z-index: 1;
  pointer-events: none;
}
.status-actions .actions-container {
  display: none;
  align-items: center;
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
}
.status-actions .actions-container .actions-btn {
  padding: 0;
  color: inherit;
  width: 1.5rem;
  height: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--bs-border-radius);
  transition: background-color 0.15s ease;
  border: none;
  background: transparent;
  cursor: pointer;
}
.status-actions .actions-container .actions-btn:hover {
  background-color: rgba(0, 0, 0, 0.1);
}
.status-actions .actions-container .actions-btn i {
  font-size: 1rem;
}
.status-actions .actions-container .dropdown-menu {
  z-index: 1050;
}

.tree-item-content:hover .status-actions .status-icon-wrapper,
.article-list-row:hover .status-actions .status-icon-wrapper {
  display: none;
}
.tree-item-content:hover .status-actions .actions-container,
.article-list-row:hover .status-actions .actions-container {
  display: flex;
}

.tree-item-content.active .actions-btn,
.article-list-row.active .actions-btn {
  color: var(--bs-white);
}
.tree-item-content.active .actions-btn:hover,
.article-list-row.active .actions-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

/* Pure Vue Dropdown Styles */
.dropdown-container {
  position: relative;
}
.dropdown-container .dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 1050;
}
.dropdown-container .dropdown-menu.dropdown-up {
  top: auto;
  bottom: 100%;
}
.dropdown-container .dropdown-menu.dropdown-left {
  right: auto;
  left: 0;
}

/* Tiptap Editor Styles */
.tiptap-editor {
  background-color: var(--bs-body-bg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.tiptap-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.5rem;
  border-bottom: 1px solid var(--bs-border-color);
  background-color: var(--bg-hover);
}

.tiptap-toolbar-left {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  flex: 1;
}

.tiptap-formatting-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.tiptap-toolbar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.tiptap-toolbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--bs-border-radius-sm);
  background-color: transparent;
  color: var(--bs-body-color);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}
.tiptap-toolbar-btn:hover:not(:disabled) {
  background-color: var(--bs-body-bg);
  border-color: var(--bs-border-color);
}
.tiptap-toolbar-btn:active:not(:disabled) {
  transform: translateY(1px);
}
.tiptap-toolbar-btn.is-active {
  background-color: var(--bs-primary);
  color: white;
  border-color: var(--bs-primary);
}
.tiptap-toolbar-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.tiptap-toolbar-btn i {
  pointer-events: none;
}

.tiptap-btn-with-text {
  width: auto;
  padding: 0 0.5rem;
}

.tiptap-toolbar-divider {
  width: 1px;
  background-color: var(--bs-border-color);
  margin: 0.25rem 0.5rem;
}

.tiptap-dropdown {
  position: relative;
  display: inline-flex;
}

.tiptap-dropdown-toggle {
  width: auto;
  padding: 0 0.5rem;
  gap: 0.25rem;
}

.tiptap-dropdown-caret {
  font-size: 0.65rem;
  opacity: 0.7;
}

.tiptap-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 9999;
  min-width: 160px;
  max-height: 400px;
  overflow-y: auto;
  padding: 0.25rem 0;
  background-color: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
  margin-top: 0.25rem;
}
.tiptap-dropdown-menu.right-aligned {
  left: auto;
  right: 0;
}

.tiptap-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.375rem 0.75rem;
  border: none;
  background-color: transparent;
  color: var(--bs-body-color);
  font-size: 0.875rem;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease-in-out;
}
.tiptap-dropdown-item:hover {
  background-color: var(--bg-hover);
}
.tiptap-dropdown-item.is-active {
  background-color: var(--bs-primary);
  color: white;
}
.tiptap-dropdown-item.is-active .text-muted {
  color: rgba(255, 255, 255, 0.7) !important;
}
.tiptap-dropdown-item i {
  width: 1rem;
  text-align: center;
}

.tiptap-dropdown-divider {
  height: 1px;
  margin: 0.25rem 0;
  background-color: var(--bs-border-color);
}

.tiptap-h4-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  font-size: 0.75rem;
  font-weight: 700;
}

.tiptap-content {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.tiptap-editor-content {
  padding: 1rem;
  flex: 1;
  overflow-y: auto;
  outline: none;
  color: var(--bs-body-color);
}

/* Auto-save indicator */
.auto-save-indicator {
  display: flex;
  align-items: center;
  color: var(--bs-success);
  font-size: 0.875rem;
  padding: 0 0.5rem;
}
.auto-save-indicator i {
  font-size: 1rem;
}

/* Versions List */
.versions-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.version-item {
  padding: 0.75rem;
  border-radius: var(--bs-border-radius);
  background-color: var(--bg-hover);
  cursor: pointer;
  transition: all 0.15s ease;
  border: 2px solid transparent;
}
.version-item:hover {
  background-color: var(--bs-border-color);
  transform: translateX(2px);
}
.version-item.active {
  border-color: var(--bs-primary);
  background-color: rgba(var(--bs-primary-rgb), 0.1);
}
.version-item .version-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.375rem;
  gap: 0.5rem;
}
.version-item .version-header .badge {
  font-size: 0.75rem;
  font-weight: 600;
}
.version-item .version-header .version-date {
  font-size: 0.75rem;
  color: var(--bs-gray-600);
  white-space: nowrap;
}
.version-item .version-header .version-author {
  font-size: 0.75rem;
  color: var(--bs-gray-600);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}
.version-item .version-header .version-author i {
  font-size: 0.75rem;
}
.version-item .version-message {
  font-size: 0.75rem;
  color: var(--bs-gray-600);
  margin-top: 0.375rem;
  padding-left: 0.25rem;
  font-style: italic;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Diff Viewer */
.diff-viewer {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}
.diff-viewer .diff-viewer-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.5rem;
  border-bottom: 1px solid var(--bs-border-color);
  background-color: var(--bg-hover);
  flex-shrink: 0;
}
.diff-viewer .diff-viewer-header .diff-viewer-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  font-size: 0.9375rem;
}
.diff-viewer .diff-viewer-header .diff-viewer-title .badge {
  font-size: 0.8125rem;
}
.diff-viewer .diff-viewer-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1rem;
}
.diff-viewer .diff-viewer-content .diff-content ins, .diff-viewer .diff-viewer-content .diff-content del {
  text-decoration: none;
  padding: 0.125rem 0.25rem;
  border-radius: 0.25rem;
}
.diff-viewer .diff-viewer-content .diff-content ins {
  background-color: #d4edda;
  color: #155724;
}
.diff-viewer .diff-viewer-content .diff-content del {
  background-color: #f8d7da;
  color: #721c24;
  text-decoration: line-through;
}
.diff-viewer .loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
}

[data-bs-theme=dark] .diff-viewer .diff-viewer-content .diff-content ins {
  background-color: rgba(40, 167, 69, 0.2);
  color: #4ade80;
}
[data-bs-theme=dark] .diff-viewer .diff-viewer-content .diff-content del {
  background-color: rgba(220, 53, 69, 0.2);
  color: #f87171;
}

.chat-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.conversation-selector-bar {
  display: flex;
  align-items: center;
  padding: 0rem 1rem 0.75rem 0.75rem;
}
.conversation-selector-bar .form-select {
  flex: 1;
  font-size: 0.875rem;
}
.conversation-selector-bar .btn {
  flex-shrink: 0;
  padding: 0.25rem 0.5rem;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0 0.75rem 0.5rem 0.75rem;
  display: flex;
  flex-direction: column;
}
.chat-messages::-webkit-scrollbar {
  width: 0.4rem;
}
.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}
.chat-messages::-webkit-scrollbar-thumb {
  background: var(--bs-gray-600);
  border-radius: 0.3125rem;
}
.chat-messages::-webkit-scrollbar-thumb:hover {
  background: var(--bs-gray-700);
}
[data-bs-theme=dark] .chat-messages::-webkit-scrollbar-thumb:hover {
  background: var(--bs-gray-400);
}
.chat-messages .empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 2rem;
}
.chat-messages .empty-state .empty-state-text {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}
.chat-messages .empty-state .empty-state-hint {
  font-size: 0.85rem;
  opacity: 0.7;
  margin: 0;
}

.chat-message {
  display: flex;
  flex-direction: column;
  animation: slideIn 0.2s ease-out;
  font-size: 0.9rem;
}
.chat-message .chat-message-tools {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.75rem 0 0 0;
  padding-bottom: 0.5rem;
}
.chat-message .chat-message-tools .tool-call-item {
  display: block;
  font-size: 0.85rem;
  line-height: 1.4;
}
.chat-message .chat-message-tools .tool-call-item .tool-call-text {
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-message .chat-message-tools .tool-call-item .tool-call-link {
  color: var(--bs-link-color);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-message .chat-message-tools .tool-call-item .tool-call-link:hover {
  text-decoration: underline;
}
.chat-message .chat-message-tools .tool-call-item .bi-check-circle {
  font-size: 0.9rem;
}
.chat-message .chat-message-tools .tool-call-item .tool-knowledge-units-list {
  margin-left: 1.5rem;
  margin-top: 0.25rem;
  padding-left: 0.5rem;
  border-left: 2px solid var(--bs-border-color);
}
.chat-message .chat-message-tools .tool-call-item .knowledge-unit-link {
  color: var(--bs-secondary-color);
  transition: color 0.15s ease-in-out;
}
.chat-message .chat-message-tools .tool-call-item .knowledge-unit-link:hover {
  color: var(--bs-link-color);
  text-decoration: underline !important;
}

.chat-message-user {
  align-self: flex-end;
}
.chat-message-user .chat-message-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 0.25rem;
  padding: 0 0.5rem;
  font-size: 0.75rem;
  color: var(--bs-secondary-color);
}
.chat-message-user .chat-message-header .chat-message-author {
  font-weight: 600;
  margin-right: 0.5rem;
}
.chat-message-user .chat-message-header .chat-message-time {
  opacity: 0.7;
}
.chat-message-user .chat-message-body {
  position: relative;
  padding: 0.75rem 1rem;
  background-color: var(--bs-primary);
  color: white;
  border-radius: 1rem 1rem 0 1rem;
  word-wrap: break-word;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.chat-message-assistant {
  margin-top: 0.5rem;
}
.chat-message-assistant .chat-message-body {
  color: var(--bs-body-color);
  word-wrap: break-word;
}
.chat-message-assistant .chat-message-body .markdown-container {
  font-size: 0.9rem;
}
.chat-message-assistant.thinking .chat-message-body {
  opacity: 0.7;
}
@media (prefers-color-scheme: dark) {
  .chat-message-assistant .chat-message-body {
    color: var(--bs-light);
  }
}

.chat-message-preview {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  opacity: 0.7;
  cursor: pointer;
  font-size: 0.9rem;
  font-style: italic;
}
.chat-message-preview:hover {
  opacity: 1;
}

.typing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.typing-indicator span {
  width: 0.5rem;
  height: 0.5rem;
  background-color: var(--bs-secondary);
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out;
}
.typing-indicator span:nth-child(1) {
  animation-delay: 0s;
}
.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}
.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

.chat-input-container {
  padding: 0.5rem;
}
.chat-input-container .chat-input-box {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.75rem;
  background-color: var(--bs-body-bg);
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  overflow: hidden;
}
.chat-input-container .chat-input-box:focus-within {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
}
.chat-input-container .chat-input-box .chat-input {
  border: none;
  box-shadow: none;
  background: transparent;
  resize: none;
  padding: 0.75rem;
  min-height: 2.5rem;
  max-height: 12rem;
  font-size: 0.95rem;
}
.chat-input-container .chat-input-box .chat-input:focus {
  box-shadow: none;
}
.chat-input-container .chat-input-box .chat-input:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}
.chat-input-container .chat-input-box .chat-input-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.25rem 0.5rem 0.5rem 0.5rem;
}
.chat-input-container .chat-input-box .chat-input-footer .chat-mode-selector {
  display: flex;
  align-items: center;
}
.chat-input-container .chat-input-box .chat-input-footer .chat-mode-selector .mode-select {
  border: none;
  background-color: transparent;
  font-size: 0.85rem;
  padding: 0.25rem 0.5rem;
  padding-right: 1.5rem;
  cursor: pointer;
  color: var(--bs-body-color);
  font-weight: 500;
  margin-left: 0.25rem;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.25rem center;
  background-size: 10px 8px;
}
.chat-input-container .chat-input-box .chat-input-footer .chat-mode-selector .mode-select:focus {
  box-shadow: none;
  outline: none;
}
.chat-input-container .chat-input-box .chat-input-footer .chat-mode-selector .mode-select:hover {
  background-color: var(--bs-tertiary-bg);
  border-radius: 0.25rem;
}
@media (prefers-color-scheme: dark) {
  .chat-input-container .chat-input-box .chat-input-footer .chat-mode-selector .mode-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23adb5bd' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  }
}
.chat-input-container .chat-input-box .chat-input-footer .chat-send-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.chat-input-container .chat-input-box .chat-input-footer .chat-send-btn i {
  font-size: 1.5rem;
}
.chat-input-container .chat-input-box .chat-input-footer .chat-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--bs-secondary-color);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(0.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes toolFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes checkmarkAppear {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes typingBounce {
  0%, 60%, 100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-0.4rem);
  }
}
.spinner-border-xs {
  --bs-spinner-width: .6rem;
  --bs-spinner-height: .6rem;
}

/* Content Tabs Container */
.content-tabs-container {
  background-color: var(--bg-sidebar);
}
.content-tabs-container .nav-link.active {
  background: var(--bg-hover);
}
.content-tabs-container .nav-link .tab-close-icon {
  font-size: 0.75rem;
  opacity: 0.6;
  margin-left: 0.5rem;
  margin-right: -1rem;
  width: 1.25rem;
  height: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 0.25rem;
}
.content-tabs-container .nav-link .tab-close-icon:hover {
  opacity: 1;
  background-color: rgba(0, 0, 0, 0.1);
}

[data-bs-theme=light] .nav-tabs {
  --bs-nav-tabs-link-active-color: var(--bs-gray-900);
}

[data-bs-theme=dark] .nav-tabs {
  --bs-nav-tabs-link-active-color: var(--bs-gray-400);
  --bs-nav-tabs-link-active-border-color: #7b7f82 #7b7f82 transparent;
  --bs-nav-tabs-border-color: #7b7f82;
}

/* Content Tab Panes */
.content-tab-panes {
  overflow: hidden;
  position: relative;
}

.content-tab-pane {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Plan Viewer Component */
.plan-viewer {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}
.plan-viewer .tiptap-editor {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: visible;
}
.plan-viewer .tiptap-toolbar {
  position: sticky;
  top: 0;
  z-index: 10;
}
.plan-viewer .tiptap-content {
  overflow: visible;
}
[data-bs-theme=dark] .plan-viewer textarea.form-control {
  background-color: rgba(255, 255, 255, 0.05);
}

/* Plan Sections */
.plan-section {
  margin-bottom: 2rem;
}

.plan-section-title {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  color: var(--bs-primary);
  font-size: 1.125rem;
  font-weight: 600;
}

/* Fragments List */
.fragments-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Fragment Card */
.fragment-card {
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  background-color: var(--bs-body-bg);
  transition: box-shadow 0.15s ease;
}

.fragment-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.fragment-card.reference-fragment {
  opacity: 0.85;
}

.fragment-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  cursor: pointer;
  user-select: none;
}

.fragment-card-header:hover {
  background-color: var(--bg-hover);
}

.fragment-card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
}

.fragment-card-title i.bi-chevron-right,
.fragment-card-title i.bi-chevron-down {
  color: var(--bs-secondary);
  font-size: 0.875rem;
  transition: transform 0.15s ease;
}

.fragment-card-title strong {
  flex: 1;
}

.fragment-title {
  cursor: pointer;
}
.fragment-title:hover {
  text-decoration: underline;
}

.similarity-badge {
  font-size: 0.8125rem;
  font-weight: 500;
}

.fragment-card-actions {
  display: flex;
  gap: 0.5rem;
}

.fragment-card-body {
  padding: 0 1rem 1rem 1rem;
  border-top: 1px solid var(--bs-border-color);
}

/* Fragment Content Sections */
.fragment-summary {
  color: var(--bs-secondary);
  font-style: italic;
}

.fragment-metadata {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.fragment-reasoning,
.fragment-instructions {
  margin-top: 1rem;
  margin-bottom: 0;
  font-size: 0.9375rem;
}

.fragment-reasoning strong,
.fragment-instructions strong {
  display: block;
  margin-bottom: 0.25rem;
}

.fragment-content {
  margin-top: 1rem;
}

.fragment-content strong {
  display: block;
  margin-bottom: 0.5rem;
}

.fragment-content pre {
  background-color: var(--bg-hover);
  padding: 1rem;
  border-radius: var(--bs-border-radius);
  border: 1px solid var(--bs-border-color);
  font-size: 0.875rem;
  line-height: 1.5;
  overflow-x: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* Loading Spinner for Plan Viewer */
.plan-viewer .loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
}

/* Custom Overlapping Label Form Control */
.form-group-overlap {
  position: relative;
}
.form-group-overlap > label {
  position: absolute;
  top: -0.75rem;
  left: 0.5rem;
  background-color: var(--bs-body-bg);
  padding: 0 0.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--bs-secondary);
  z-index: 1;
}

.form-layout .form-group-overlap {
  max-width: 25rem;
}

/*based on https://github.com/sindresorhus/github-markdown-css*/
.markdown-container {
  --base-size-4: 0.25rem;
  --base-size-8: 0.5rem;
  --base-size-16: 1rem;
  --base-size-24: 1.5rem;
  --base-size-40: 2.5rem;
  --base-text-weight-normal: 400;
  --base-text-weight-medium: 500;
  --base-text-weight-semibold: 600;
  --fontStack-monospace: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
  --fgColor-accent: Highlight;
}

@media (prefers-color-scheme: dark) {
  .markdown-container, [data-bs-theme=dark] {
    /* dark */
    color-scheme: dark;
    --focus-outlineColor: #1f6feb;
    --fgColor-default: #f0f6fc;
    --fgColor-muted: #9198a1;
    --fgColor-accent: #4493f8;
    --fgColor-success: #3fb950;
    --fgColor-attention: #d29922;
    --fgColor-danger: #f85149;
    --fgColor-done: #ab7df8;
    --bgColor-default: #0d1117;
    --bgColor-muted: #151b23;
    --bgColor-neutral-muted: #656c7633;
    --bgColor-attention-muted: #bb800926;
    --borderColor-default: #3d444d;
    --borderColor-muted: #3d444db3;
    --borderColor-neutral-muted: #3d444db3;
    --borderColor-accent-emphasis: #1f6feb;
    --borderColor-success-emphasis: #238636;
    --borderColor-attention-emphasis: #9e6a03;
    --borderColor-danger-emphasis: #da3633;
    --borderColor-done-emphasis: #8957e5;
  }
}
@media (prefers-color-scheme: light) {
  .markdown-container, [data-bs-theme=light] {
    /* light */
    color-scheme: light;
    --focus-outlineColor: #0969da;
    --fgColor-default: #1f2328;
    --fgColor-muted: #59636e;
    --fgColor-accent: #0969da;
    --fgColor-success: #1a7f37;
    --fgColor-attention: #9a6700;
    --fgColor-danger: #d1242f;
    --fgColor-done: #8250df;
    --bgColor-default: #ffffff;
    --bgColor-muted: #f6f8fa;
    --bgColor-neutral-muted: #818b981f;
    --bgColor-attention-muted: #fff8c5;
    --borderColor-default: #d1d9e0;
    --borderColor-muted: #d1d9e0b3;
    --borderColor-neutral-muted: #d1d9e0b3;
    --borderColor-accent-emphasis: #0969da;
    --borderColor-success-emphasis: #1a7f37;
    --borderColor-attention-emphasis: #9a6700;
    --borderColor-danger-emphasis: #cf222e;
    --borderColor-done-emphasis: #8250df;
  }
}
.markdown-container {
  -ms-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  margin: 0;
  /*color: var(--fgColor-default);*/
  /*background-color: var(--bgColor-default);*/
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  font-size: 16px;
  line-height: 1.5;
  word-wrap: break-word;
  /*table tr {
    background-color: var(--bgColor-default);
    border-top: 1px solid var(--borderColor-muted);
  }

  table tr:nth-child(2n) {
    background-color: var(--bgColor-muted);
  }*/
}
.markdown-container details,
.markdown-container figcaption,
.markdown-container figure {
  display: block;
}
.markdown-container summary {
  display: list-item;
}
.markdown-container [hidden] {
  display: none !important;
}
.markdown-container a {
  background-color: transparent;
  color: var(--fgColor-accent);
  text-decoration: none;
}
.markdown-container abbr[title] {
  border-bottom: none;
  -webkit-text-decoration: underline dotted;
  text-decoration: underline dotted;
}
.markdown-container b,
.markdown-container strong {
  font-weight: var(--base-text-weight-semibold, 600);
}
.markdown-container dfn {
  font-style: italic;
}
.markdown-container h1 {
  margin: 0.67em 0;
  font-weight: var(--base-text-weight-semibold, 600);
  padding-bottom: 0.3em;
  font-size: 2em;
  border-bottom: 1px solid var(--borderColor-muted);
}
.markdown-container mark {
  background-color: var(--bgColor-attention-muted);
  color: var(--fgColor-default);
}
.markdown-container small {
  font-size: 90%;
}
.markdown-container sub,
.markdown-container sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}
.markdown-container sub {
  bottom: -0.25em;
}
.markdown-container sup {
  top: -0.5em;
}
.markdown-container img {
  border-style: none;
  max-width: 100%;
  box-sizing: content-box;
}
.markdown-container code,
.markdown-container kbd,
.markdown-container pre,
.markdown-container samp {
  font-family: monospace;
  font-size: 1em;
}
.markdown-container figure {
  margin: 1em var(--base-size-40);
}
.markdown-container hr {
  box-sizing: content-box;
  overflow: hidden;
  background: transparent;
  border-bottom: 1px solid var(--borderColor-muted);
  height: 0.25em;
  padding: 0;
  margin: var(--base-size-24) 0;
  background-color: var(--borderColor-default);
  border: 0;
}
.markdown-container a:hover {
  text-decoration: underline;
}
.markdown-container hr::before {
  display: table;
  content: "";
}
.markdown-container hr::after {
  display: table;
  clear: both;
  content: "";
}
.markdown-container table {
  border-spacing: 0;
  border-collapse: collapse;
  display: block;
  width: max-content;
  max-width: 100%;
  overflow: auto;
  font-variant: tabular-nums;
}
.markdown-container td,
.markdown-container th {
  padding: 0;
}
.markdown-container details summary {
  cursor: pointer;
}
.markdown-container a:focus {
  outline: 2px solid var(--focus-outlineColor);
  outline-offset: -2px;
  box-shadow: none;
}
.markdown-container a:focus:not(:focus-visible) {
  outline: solid 1px transparent;
}
.markdown-container a:focus-visible {
  outline: 2px solid var(--focus-outlineColor);
  outline-offset: -2px;
  box-shadow: none;
}
.markdown-container a:not([class]):focus,
.markdown-container a:not([class]):focus-visible {
  outline-offset: 0;
}
.markdown-container kbd {
  display: inline-block;
  padding: var(--base-size-4);
  font: 11px var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace);
  line-height: 10px;
  color: var(--fgColor-default);
  vertical-align: middle;
  background-color: var(--bgColor-muted);
  border: solid 1px var(--borderColor-neutral-muted);
  border-bottom-color: var(--borderColor-neutral-muted);
  border-radius: 6px;
  box-shadow: inset 0 -1px 0 var(--borderColor-neutral-muted);
}
.markdown-container h1,
.markdown-container h2,
.markdown-container h3,
.markdown-container h4,
.markdown-container h5,
.markdown-container h6 {
  margin-top: var(--base-size-24);
  margin-bottom: var(--base-size-16);
  font-weight: var(--base-text-weight-semibold, 600);
  line-height: 1.25;
}
.markdown-container h2 {
  font-weight: var(--base-text-weight-semibold, 600);
  padding-bottom: 0.3em;
  font-size: 1.5em;
  border-bottom: 1px solid var(--borderColor-muted);
}
.markdown-container h3 {
  font-weight: var(--base-text-weight-semibold, 600);
  font-size: 1.25em;
}
.markdown-container h4 {
  font-weight: var(--base-text-weight-semibold, 600);
  font-size: 1em;
}
.markdown-container h5 {
  font-weight: var(--base-text-weight-semibold, 600);
  font-size: 0.875em;
}
.markdown-container h6 {
  font-weight: var(--base-text-weight-semibold, 600);
  font-size: 0.85em;
  color: var(--fgColor-muted);
}
.markdown-container p {
  margin-top: 0;
  margin-bottom: 10px;
}
.markdown-container blockquote {
  margin: 0;
  padding: 0 1em;
  color: var(--fgColor-muted);
  border-left: 0.25em solid var(--borderColor-default);
}
.markdown-container ul,
.markdown-container ol {
  margin-top: 0;
  margin-bottom: 0;
  padding-left: 2em;
}
.markdown-container ol ol,
.markdown-container ul ol {
  list-style-type: lower-roman;
}
.markdown-container ul ul ol,
.markdown-container ul ol ol,
.markdown-container ol ul ol,
.markdown-container ol ol ol {
  list-style-type: lower-alpha;
}
.markdown-container dd {
  margin-left: 0;
}
.markdown-container tt,
.markdown-container code,
.markdown-container samp {
  font-family: var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace);
  font-size: 12px;
}
.markdown-container pre {
  margin-top: 0;
  margin-bottom: 0;
  font-family: var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace);
  font-size: 12px;
  word-wrap: normal;
}
.markdown-container::before {
  display: table;
  content: "";
}
.markdown-container::after {
  display: table;
  clear: both;
  content: "";
}
.markdown-container > *:first-child {
  margin-top: 0 !important;
}
.markdown-container > *:last-child {
  margin-bottom: 0 !important;
}
.markdown-container a:not([href]) {
  color: inherit;
  text-decoration: none;
}
.markdown-container p,
.markdown-container blockquote,
.markdown-container ul,
.markdown-container ol,
.markdown-container dl,
.markdown-container table,
.markdown-container pre,
.markdown-container details {
  margin-top: 0;
  margin-bottom: var(--base-size-16);
}
.markdown-container blockquote > :first-child {
  margin-top: 0;
}
.markdown-container blockquote > :last-child {
  margin-bottom: 0;
}
.markdown-container h1 tt,
.markdown-container h1 code,
.markdown-container h2 tt,
.markdown-container h2 code,
.markdown-container h3 tt,
.markdown-container h3 code,
.markdown-container h4 tt,
.markdown-container h4 code,
.markdown-container h5 tt,
.markdown-container h5 code,
.markdown-container h6 tt,
.markdown-container h6 code {
  padding: 0 0.2em;
  font-size: inherit;
}
.markdown-container summary h1,
.markdown-container summary h2,
.markdown-container summary h3,
.markdown-container summary h4,
.markdown-container summary h5,
.markdown-container summary h6 {
  display: inline-block;
}
.markdown-container summary h1,
.markdown-container summary h2 {
  padding-bottom: 0;
  border-bottom: 0;
}
.markdown-container ul ul,
.markdown-container ul ol,
.markdown-container ol ol,
.markdown-container ol ul {
  margin-top: 0;
  margin-bottom: 0;
}
.markdown-container li > p {
  /*margin-top: var(--base-size-16);*/
  margin-top: 0;
  margin-bottom: 0;
}
.markdown-container li + li {
  margin-top: 0.25em;
}
.markdown-container dl {
  padding: 0;
}
.markdown-container dl dt {
  padding: 0;
  margin-top: var(--base-size-16);
  font-size: 1em;
  font-style: italic;
  font-weight: var(--base-text-weight-semibold, 600);
}
.markdown-container dl dd {
  padding: 0 var(--base-size-16);
  margin-bottom: var(--base-size-16);
}
.markdown-container table th {
  font-weight: var(--base-text-weight-semibold, 600);
}
.markdown-container table th,
.markdown-container table td {
  padding: 6px 13px;
  border: 1px solid var(--borderColor-default);
}
.markdown-container table td > :last-child {
  margin-bottom: 0;
}
.markdown-container table img {
  background-color: transparent;
}
.markdown-container img[align=right] {
  padding-left: 20px;
}
.markdown-container img[align=left] {
  padding-right: 20px;
}
.markdown-container code,
.markdown-container tt {
  padding: 0.2em 0.4em;
  margin: 0;
  font-size: 85%;
  white-space: break-spaces;
  background-color: var(--bgColor-neutral-muted);
  border-radius: 6px;
}
.markdown-container code br,
.markdown-container tt br {
  display: none;
}
.markdown-container del code {
  text-decoration: inherit;
}
.markdown-container samp {
  font-size: 85%;
}
.markdown-container pre code {
  font-size: 100%;
}
.markdown-container pre > code {
  padding: 0;
  margin: 0;
  word-break: normal;
  white-space: pre;
  background: transparent;
  border: 0;
}
.markdown-container pre code,
.markdown-container pre tt {
  display: inline;
  max-width: auto;
  padding: 0;
  margin: 0;
  overflow: visible;
  line-height: inherit;
  word-wrap: normal;
  background-color: transparent;
  border: 0;
}
