/* Dark mode and Tabulator styling */

/* Global font family */
body {
  font-family: 'JetBrains Mono', monospace !important;
}

* {
  font-family: 'JetBrains Mono', monospace !important;
}

/* Dark mode styles */
body.dark-mode {
  background-color: #1a1a1a !important;
  color: #ffffff !important;
}

body.dark-mode .card {
  background-color: #2d2d2d !important;
  border-color: #404040 !important;
}

body.dark-mode .navbar {
  background-color: #2d2d2d !important;
}

body.dark-mode .table {
  background-color: #2d2d2d !important;
  color: #ffffff !important;
}

/* Tabulator dark mode styles */
body.dark-mode .tabulator {
  background-color: #2d2d2d !important;
  color: #ffffff !important;
  border-color: #404040 !important;
}

body.dark-mode .tabulator-header {
  background-color: #404040 !important;
  color: #ffffff !important;
  border-color: #404040 !important;
}

body.dark-mode .tabulator-header .tabulator-col {
  background-color: #404040 !important;
  color: #ffffff !important;
  border-color: #404040 !important;
}

body.dark-mode .tabulator-header .tabulator-col:hover {
  background-color: #505050 !important;
}

body.dark-mode .tabulator-row {
  background-color: #2d2d2d !important;
  color: #ffffff !important;
  border-color: #404040 !important;
}

body.dark-mode .tabulator-row:hover {
  background-color: #404040 !important;
}

body.dark-mode .tabulator-cell {
  background-color: transparent !important;
  color: #ffffff !important;
  border-color: #404040 !important;
}

body.dark-mode .tabulator-footer {
  background-color: #404040 !important;
  color: #ffffff !important;
  border-color: #404040 !important;
}

body.dark-mode .tabulator-paginator {
  background-color: #404040 !important;
  color: #ffffff !important;
}

body.dark-mode .tabulator-page {
  background-color: #2d2d2d !important;
  color: #ffffff !important;
  border-color: #404040 !important;
}

body.dark-mode .tabulator-page:hover {
  background-color: #404040 !important;
}

body.dark-mode .tabulator-page.active {
  background-color: #007bff !important;
  color: #ffffff !important;
}

/* Context / header menus
   Do not use overflow:hidden here — it overrides Tabulator's overflow-y:auto
   and clips long column lists when the menu height is constrained by the page. */
.tabulator-menu {
  background-color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  overflow-x: hidden;
  overflow-y: auto;
  max-height: min(70vh, 560px);
}

.tabulator-menu .tabulator-menu-item {
  font-family: 'JetBrains Mono', monospace;
  color: #212529;
  padding: 8px 12px;
}

.tabulator-menu .tabulator-menu-item:hover {
  background-color: #f1f3f5;
}

body.dark-mode .tabulator-menu {
  background-color: #2d2d2d;
  border: 1px solid #404040;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.45);
}

body.dark-mode .tabulator-menu .tabulator-menu-item {
  color: #ffffff;
}

body.dark-mode .tabulator-menu .tabulator-menu-item:hover {
  background-color: #3a3a3a;
}

body.dark-mode .tabulator-edit-list .tabulator-edit-list-item.active {
  background: #3a3a3a;
  color: inherit;
}

body.dark-mode .tabulator-edit-list .tabulator-edit-list-item.focused {
  outline: 1px solid #6c757d;
}

@media (hover: hover) and (pointer: fine) {
  body.dark-mode .tabulator-edit-list .tabulator-edit-list-item:hover {
    background: #3a3a3a;
    color: inherit;
  }
}

/* Font family for Tabulator tables */
.tabulator {
  font-family: 'JetBrains Mono', monospace !important;
}

.tabulator-header {
  font-family: 'JetBrains Mono', monospace !important;
}

.tabulator-cell {
  font-family: 'JetBrains Mono', monospace !important;
}
