/**
 * Document Sources Theme CSS
 *
 * Custom styles for the document sources viewer.
 * Works with Bootstrap 5.3's data-bs-theme for dark mode support.
 */

/* =========================================================================
   Table Styles
   ========================================================================= */

#sourcesTable .truncate {
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#sourcesTableBody tr {
  transition: background-color 0.15s;
}

/* =========================================================================
   Filter Card
   ========================================================================= */

.filter-row .form-label {
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

/* =========================================================================
   Pagination Controls
   ========================================================================= */

.pagination-controls .btn {
  min-width: 36px;
}

/* =========================================================================
   Export Dropdown
   ========================================================================= */

.export-dropdown .dropdown-item i {
  width: 1.25em;
  text-align: center;
}

/* =========================================================================
   Details Button
   ========================================================================= */

.doc-details-btn {
  color: var(--bs-primary);
  font-size: 1.1rem;
  line-height: 1;
}

.doc-details-btn:hover {
  color: var(--bs-primary-emphasis, var(--bs-primary));
}

/* =========================================================================
   Details Modal
   ========================================================================= */

.doc-details-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1rem;
  margin: 0;
}

.doc-details-list dt {
  font-weight: 600;
  color: var(--bs-secondary-color, #6c757d);
  white-space: nowrap;
}

.doc-details-list dd {
  margin: 0;
  word-break: break-word;
}

/* =========================================================================
   Dark Mode Overrides
   ========================================================================= */

[data-bs-theme="dark"] #sourcesTableBody tr:hover {
  background-color: rgba(255, 255, 255, 0.06) !important;
}

[data-bs-theme="dark"] .source-link {
  color: #6ea8fe;
}

[data-bs-theme="dark"] .source-link:hover {
  color: #9ec5fe;
}
