/* Dark Mode Global Overrides, only when data-bs-theme="dark" */

:root[data-bs-theme="dark"] { color-scheme: dark; }

/* Page canvas */
[data-bs-theme="dark"] html,
[data-bs-theme="dark"] body {
  background: #000 !important;
  color: #e6e7ea !important;
}

/* Kill light utility backgrounds */
[data-bs-theme="dark"] .bg-white,
[data-bs-theme="dark"] .bg-light,
[data-bs-theme="dark"] .bg-body,
[data-bs-theme="dark"] .bg-transparent {
  background-color: #000 !important;
}
[data-bs-theme="dark"] [class*="bg-white"],
[data-bs-theme="dark"] [class*="bg-light"] {
  background-color: #000 !important;
}
[data-bs-theme="dark"] .text-dark { color: #e6e7ea !important; }

/* Borders, rules, shadows */
[data-bs-theme="dark"] .border,
[data-bs-theme="dark"] .border-top,
[data-bs-theme="dark"] .border-end,
[data-bs-theme="dark"] .border-bottom,
[data-bs-theme="dark"] .border-start {
  border-color: #262a33 !important;
}
[data-bs-theme="dark"] hr { border-color: #262a33 !important; }
[data-bs-theme="dark"] * { box-shadow: none !important; }

/* Common components */
[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .list-group,
[data-bs-theme="dark"] .accordion-item,
[data-bs-theme="dark"] .dropdown-menu,
[data-bs-theme="dark"] .navbar,
[data-bs-theme="dark"] .offcanvas,
[data-bs-theme="dark"] .toast,
[data-bs-theme="dark"] .popover,
[data-bs-theme="dark"] .modal-content {
  background: #0e0f12 !important;
  border-color: #262a33 !important;
  color: #e6e7ea !important;
}

/* Tables */
[data-bs-theme="dark"] .table,
[data-bs-theme="dark"] table,
[data-bs-theme="dark"] .table td,
[data-bs-theme="dark"] .table th {
  background: #0f1115 !important;
  color: #e6e7ea !important;
  border-color: #262a33 !important;
}

/* Forms */
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select,
[data-bs-theme="dark"] .input-group-text {
  background: #0f1115 !important;
  color: #e6e7ea !important;
  border-color: #262a33 !important;
}
[data-bs-theme="dark"] .form-control::placeholder {
  color: #9aa3b2 !important;
}

/* Structural tags sometimes painted white */
[data-bs-theme="dark"] section,
[data-bs-theme="dark"] header,
[data-bs-theme="dark"] footer,
[data-bs-theme="dark"] main,
[data-bs-theme="dark"] aside,
[data-bs-theme="dark"] nav,
[data-bs-theme="dark"] article {
  background-color: transparent !important;
}

/* Scrollbars */
[data-bs-theme="dark"] ::-webkit-scrollbar { width: 10px; height: 10px; }
[data-bs-theme="dark"] ::-webkit-scrollbar-track { background: #000; }
[data-bs-theme="dark"] ::-webkit-scrollbar-thumb { background: #232833; border-radius: 6px; }
[data-bs-theme="dark"] ::-webkit-scrollbar-thumb:hover { background: #2d3441; }

/* Fix suggestions dropdown - override transparent background */
[data-bs-theme="dark"] #suggestions {
  background: #0e0f12 !important;
  border: 1px solid #262a33 !important;
  border-radius: 5px;
  position: relative;
  z-index: 1000;
}
[data-bs-theme="dark"] #suggestions .suggestion-item {
  background: #0f1115 !important;
  color: #e6e7ea !important;
  border-bottom: 1px solid #262a33 !important;
  padding: 8px 12px;
  cursor: pointer;
}
[data-bs-theme="dark"] #suggestions .suggestion-item:hover {
  background: #1a1d24 !important;
  color: #ffffff !important;
}

