/* Text Color Fix - Override all light text colors to #3d3333 */

/* Global text color reset */
body, html {
  color: #3d3333 !important;
}

/* All paragraph and text elements */
p, span, div, li, td, th {
  color: #3d3333 !important;
}

/* Exception: Allow folder icons to have custom colors */
.nav-tree-icon i.fa-folder,
.row-icon.folder-icon i.fa-folder,
.details-preview-icon i.fa-folder {
  color: unset !important;
}

/* Card text specifically */
.card-text, .card-body p, .card-body {
  color: #3d3333 !important;
}

/* Bootstrap text utilities override */
.text-muted, .text-secondary, .text-light {
  color: #3d3333 !important;
}

/* Form text and help text */
.form-text, .help-text, small {
  color: #3d3333 !important;
}

/* Additional form elements for better contrast */
.form-label, label {
  color: #3d3333 !important;
}

/* Select dropdown text and options */
select, select option {
  color: #3d3333 !important;
}

/* File input styling */
.form-control[type="file"] {
  color: #3d3333 !important;
}

/* Button text that might be too light */
.btn-link {
  color: #3d3333 !important;
}

.btn-link:hover {
  color: #212529 !important;
}

/* Headings if they're too light */
h1, h2, h3, h4, h5, h6 {
  color: #3d3333 !important;
}

/* List items */
ul li, ol li, .list-group-item {
  color: #3d3333 !important;
}

/* Table content */
table, .table td, .table th {
  color: #3d3333 !important;
}

/* Admin contact messages - improved contrast for colored table rows */
.table-warning,
.table-warning td,
.table-warning th,
.table-warning a,
.table-warning small {
  color: #5a4a00 !important;  /* Dark amber for yellow backgrounds */
}

.table-warning .text-muted {
  color: #6b5a00 !important;  /* Slightly lighter but still readable */
}

.table-danger,
.table-danger td,
.table-danger th,
.table-danger a,
.table-danger small {
  color: #721c24 !important;  /* Dark red for pink/danger backgrounds */
}

.table-danger .text-muted {
  color: #842029 !important;  /* Slightly lighter but still readable */
}

.table-secondary,
.table-secondary td,
.table-secondary th,
.table-secondary a,
.table-secondary small {
  color: #3d4246 !important;  /* Dark gray for secondary backgrounds */
}

.table-secondary .text-muted {
  color: #4d5257 !important;
}

/* Keep badges readable with their original colors */
.table-warning .badge,
.table-danger .badge,
.table-secondary .badge {
  color: inherit;
}

.table-warning .badge.bg-warning {
  color: #5a4a00 !important;
}

.table-warning .badge.bg-success,
.table-danger .badge.bg-success {
  color: #fff !important;
}

.table-warning .badge.bg-danger,
.table-danger .badge.bg-danger {
  color: #fff !important;
}

.table-warning .badge.bg-info,
.table-danger .badge.bg-info,
.table-secondary .badge.bg-info {
  color: #fff !important;
}

.table-warning .badge.bg-secondary,
.table-danger .badge.bg-secondary,
.table-secondary .badge.bg-secondary {
  color: #fff !important;
}

.table-warning .badge.bg-light,
.table-danger .badge.bg-light,
.table-secondary .badge.bg-light {
  color: #3d3333 !important;
}

/* Ensure buttons remain readable */
.table-warning .btn,
.table-danger .btn,
.table-secondary .btn {
  color: inherit;
}

.table-warning .btn-outline-primary,
.table-danger .btn-outline-primary,
.table-secondary .btn-outline-primary {
  color: #0d6efd !important;
  border-color: #0d6efd !important;
}

.table-warning .btn-outline-secondary,
.table-danger .btn-outline-secondary,
.table-secondary .btn-outline-secondary {
  color: #6c757d !important;
  border-color: #6c757d !important;
}

/* Ensure white text stays white for dark backgrounds */
.bg-dark,
.btn-primary,
.card-header {
  color: #fff !important;
}

/* Navigation text should use dark color on teal background */
.navbar-brand, .nav-link {
  color: #3d3333 !important;
}

/* Exception: Keep white text only on dark navbar backgrounds */
.navbar-dark .navbar-nav .nav-link {
  color: #fff !important;
}