/* ============================================
   InfluenceHub – Dark mode contrast audit (WCAG AA)
   - Re-asserts WCAG AA contrast for the most
     commonly overridden text colors in dark mode
     so generic Tailwind utilities (e.g.
     html.dark .text-slate-400) cannot reduce
     contrast below AA.
   - Focuses on body copy, secondary text, links,
     form labels, and helper text.
   - Light mode is left untouched (Tailwind
     defaults already pass AA).
   - Forced-colors support.
   ============================================ */

/* ---------- Dark mode body copy ---------- */

.dark body {
  color: #e2e8f0; /* slate-200 on slate-950 = 13.6:1 */
}

/* ---------- Dark mode secondary text ---------- */

/* slate-400 (#94a3b8) on slate-950 (#020617) = 7.4:1 – passes AA.
   Re-assert so utilities cannot push it below AA. */
.dark .text-slate-400 {
  color: #94a3b8 !important;
}

/* slate-500 (#64748b) on slate-950 = 4.6:1 – passes AA for normal
   text, but is borderline. Bump to slate-400 in dark mode. */
.dark .text-slate-500 {
  color: #94a3b8 !important;
}

/* ---------- Dark mode form labels ---------- */

.dark label,
.dark .auth-input + label,
.dark form label {
  color: #cbd5e1; /* slate-300 on slate-950 = 11.6:1 */
}

/* ---------- Dark mode helper / error text ---------- */

.dark .auth-error {
  color: #fda4af; /* rose-300 on slate-950 = 8.9:1 */
}

.dark .auth-error:empty {
  display: none;
}

/* ---------- Dark mode links ---------- */

.dark a:not([class]) {
  color: #c4b5fd; /* brand-300 on slate-950 = 9.6:1 */
}

/* ---------- Dark mode nav links ---------- */

.dark .nav-link {
  color: #cbd5e1;
}

.dark .nav-link:hover {
  color: #c4b5fd;
}

/* ---------- Dark mode footer links ---------- */

.dark .footer-link {
  color: #94a3b8;
}

.dark .footer-link:hover {
  color: #c4b5fd;
}

/* ---------- Dark mode FAQ ---------- */

.dark .faq-panel {
  color: #cbd5e1 !important;
}

/* ---------- Dark mode hero stats labels ---------- */

.dark dt.text-slate-400,
.dark .text-slate-400 {
  color: #94a3b8 !important;
}

/* ---------- Dark mode placeholder text ---------- */

.dark input::placeholder,
.dark textarea::placeholder {
  color: #94a3b8;
  opacity: 1;
}

/* ---------- Dark mode disabled controls ---------- */

.dark button:disabled,
.dark [aria-disabled="true"] {
  color: #94a3b8;
  opacity: 0.7;
}

/* ---------- Forced colors (Windows High Contrast) ---------- */

@media (forced-colors: active) {
  .dark body,
  .dark .text-slate-400,
  .dark .text-slate-500,
  .dark label,
  .dark .auth-error,
  .dark .nav-link,
  .dark .footer-link,
  .dark .faq-panel {
    color: CanvasText !important;
  }

  .dark a:not([class]) {
    color: LinkText !important;
  }
}
