/* Custom Tabulator Theme - Dark Mode Compatible */

/* Table base */
.tabulator {
    background-color: #2c2c34;
    border: 1px solid #3a3a45;
    border-radius: 5px;
    color: #e0e0e0;
    font-family: inherit;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  }
  
  /* Header styling */
  .tabulator-header {
    background-color: #3a3a45;
    border-bottom: 2px solid #4b4b57;
    color: #ffffff;
    font-weight: bold;
  }
  
  .tabulator-col {
    background-color: #3a3a45;
    border-right: 1px solid #4b4b57;
  }
  
  .tabulator-col-content {
    padding: 8px 10px;
  }
  
  .tabulator-col-title {
    color: #ffffff;
  }
  
  .tabulator-header .tabulator-col.tabulator-sortable:hover {
    background-color: #4b4b57;
  }
  
  .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="ascending"] .tabulator-col-title:after,
  .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="descending"] .tabulator-col-title:after {
    color: #4f8ee8;
  }
  
  /* Row styling */
  .tabulator-row {
    background-color: #2c2c34;
    border-bottom: 1px solid #3a3a45;
    color: #e0e0e0;
  }
  
  .tabulator-row.tabulator-row-even {
    background-color: #32323c;
  }
  
  .tabulator-row.tabulator-selectable:hover {
    background-color: #3f3f4a;
    cursor: pointer;
  }
  
  .tabulator-row.tabulator-selected {
    background-color: rgba(79, 142, 232, 0.3) !important;
  }
  
  .tabulator-row.tabulator-selected:hover {
    background-color: rgba(79, 142, 232, 0.4) !important;
  }
  
  /* Cell styling */
  .tabulator-cell {
    border-right: 1px solid #3a3a45;
    padding: 8px 10px;
  }
  
  /* Footer styling */
  .tabulator-footer {
    background-color: #3a3a45;
    border-top: 1px solid #4b4b57;
    color: #e0e0e0;
  }
  
  .tabulator-footer .tabulator-paginator {
    color: #e0e0e0;
  }
  
  .tabulator-footer .tabulator-page {
    background-color: #2c2c34;
    border: 1px solid #4b4b57;
    color: #e0e0e0;
  }
  
  .tabulator-footer .tabulator-page.active {
    background-color: #4f8ee8;
    color: #ffffff;
  }
  
  .tabulator-footer .tabulator-page:not(.disabled):hover {
    background-color: #4b4b57;
  }
  
  /* Header filter styling */
  .tabulator-header-filter input, .tabulator-header-filter select {
    background-color: #2c2c34;
    border: 1px solid #4b4b57;
    color: #e0e0e0;
    border-radius: 3px;
    padding: 4px 8px;
  }
  
  .tabulator-header-filter input:focus, .tabulator-header-filter select:focus {
    border-color: #4f8ee8;
    outline: none;
  }
  
  /* Word wrap styling for Excel and TXLF views */
  .cell-wrap {
    white-space: normal;
    word-break: break-word;
    min-height: 20px;
    color: #e0e0e0;
  }
  
  /* Copy toast styling */
  .copy-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: rgba(45, 45, 55, 0.9);
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    border: 1px solid #4f8ee8;
  }
  
  .copy-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
  
  /* Copy button styling */
  #copyJsonButton {
    background-color: #3a3a45;
    color: #e0e0e0;
    border: 1px solid #4b4b57;
  }
  
  #copyJsonButton:not(:disabled):hover, 
  #copyJsonButton.btn-primary {
    background-color: #4f8ee8;
    border-color: #3a7dd6;
    color: white;
  }
  
  #copyJsonButton:disabled {
    background-color: #3a3a45;
    color: #888;
    border-color: #4b4b57;
  }
  
  /* Pagination buttons */
  .tabulator-page-size, .tabulator-page {
    background-color: #3a3a45;
    color: #e0e0e0;
    border: 1px solid #4b4b57;
  }
  
  .tabulator-page.active {
    background-color: #4f8ee8;
    color: white;
  }
  
  /* Tag badge styling */
  .tag-badge {
    background-color: #4f8ee8;
    color: white;
  }
  
  /* Custom styling for document-specific views */
  /* TXLF preview specific styles */
  .txlf-preview .tabulator {
    background-color: #2c2c34;
  }
  
  /* Excel preview specific styles */
  .excel-preview .tabulator {
    background-color: #2c2c34;
  }
  
  /* Badge colors */
  .badge.bg-primary {
    background-color: #4f8ee8 !important;
  }
  
  .badge.bg-info {
    background-color: #5bc0de !important;
  }

  .tabulator-col-title {
    color: #ffffff !important; /* Bright white */
    font-weight: bold;
  }
  
  .tabulator-header {
    color: #ffffff !important;
    background-color: var(--darker-bg) !important; /* Make sure header bg is dark */
  }
  
  /* Add contrast to the header area */
  .tabulator-col {
    background-color: var(--darker-bg) !important;
    border-right: 1px solid var(--border-color) !important;
  }

  /* Update for better selection styling */
.tabulator-row.tabulator-selected {
    background-color: rgba(79, 142, 232, 0.6) !important;
    color: white !important;
  }
  
  .tabulator-row.tabulator-selected:hover {
    background-color: rgba(79, 142, 232, 0.7) !important;
    color: white !important;
  }
  
  /* Make selected cells more visible */
  .tabulator-row.tabulator-selected .tabulator-cell {
    color: white !important;
  }