/*
|--------------------------------------------------------------------------
| bestotpnum.com — light-mode readability fixes
| Location: public/css/light-fix.css  (same folder level as js/)
| Loaded AFTER the main Vite stylesheet so it wins.
|--------------------------------------------------------------------------
*/

/* =========================================================
   1. PRIMARY BUTTONS — brand orange + dark text (both themes)
   ========================================================= */
html .btn-primary,
html a.btn-primary,
html button.btn-primary,
html input.btn-primary,
body .btn-primary {
  background: #f97316 !important;
  background-color: #f97316 !important;
  background-image: none !important;
  color: #0c0a09 !important;
  -webkit-text-fill-color: #0c0a09 !important;
  border-color: #f97316 !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

html .btn-primary:hover,
html .btn-primary:focus-visible,
body .btn-primary:hover {
  background-color: #ea580c !important;
  border-color: #ea580c !important;
  color: #0c0a09 !important;
  -webkit-text-fill-color: #0c0a09 !important;
}

html .btn-primary svg,
html .btn-primary i,
html .btn-primary span {
  color: inherit !important;
  -webkit-text-fill-color: inherit !important;
}

html .btn-primary:disabled,
html .btn-primary[disabled],
html .btn-primary.disabled,
html .btn-primary[aria-disabled="true"] {
  background-color: #fdba74 !important;
  border-color: #fdba74 !important;
  color: #431407 !important;
  -webkit-text-fill-color: #431407 !important;
  cursor: not-allowed;
}

/* =========================================================
   2. LIGHT MODE TEXT — make all faint/light text dark
   (only applies when the sun icon / light mode is active)
   ========================================================= */

/* Headings & strong text: white -> near-black */
html[data-color-mode="light"] .text-white,
html[data-color-mode="light"] [class*="text-white/"],
html[data-color-mode="light"] .text-stone-50,
html[data-color-mode="light"] .text-stone-100,
html[data-color-mode="light"] .text-gray-100,
html[data-color-mode="light"] .text-slate-100,
html[data-color-mode="light"] .text-zinc-100,
html[data-color-mode="light"] .text-neutral-100 {
  color: #0c0a09 !important;            /* stone-950 */
  opacity: 1 !important;
}

/* Body / paragraph text: light grey -> dark grey */
html[data-color-mode="light"] .text-stone-200,
html[data-color-mode="light"] .text-stone-300,
html[data-color-mode="light"] .text-gray-200,
html[data-color-mode="light"] .text-gray-300,
html[data-color-mode="light"] .text-slate-200,
html[data-color-mode="light"] .text-slate-300,
html[data-color-mode="light"] .text-zinc-200,
html[data-color-mode="light"] .text-zinc-300,
html[data-color-mode="light"] .text-neutral-200,
html[data-color-mode="light"] .text-neutral-300 {
  color: #292524 !important;            /* stone-800 */
  opacity: 1 !important;
}

/* Secondary / muted text: mid grey -> readable dark grey */
html[data-color-mode="light"] .text-stone-400,
html[data-color-mode="light"] .text-stone-500,
html[data-color-mode="light"] .text-gray-400,
html[data-color-mode="light"] .text-gray-500,
html[data-color-mode="light"] .text-slate-400,
html[data-color-mode="light"] .text-slate-500,
html[data-color-mode="light"] .text-zinc-400,
html[data-color-mode="light"] .text-zinc-500,
html[data-color-mode="light"] .text-neutral-400,
html[data-color-mode="light"] .text-neutral-500 {
  color: #44403c !important;            /* stone-700 */
  opacity: 1 !important;
}

/* Orange labels ("HOW IT WORKS", badges, alerts): pale -> deep orange */
html[data-color-mode="light"] .text-orange-50,
html[data-color-mode="light"] .text-orange-100,
html[data-color-mode="light"] .text-orange-200,
html[data-color-mode="light"] .text-orange-300,
html[data-color-mode="light"] .text-amber-100,
html[data-color-mode="light"] .text-amber-200,
html[data-color-mode="light"] .text-amber-300 {
  color: #c2410c !important;            /* orange-700 */
  opacity: 1 !important;
}

/* Status colours: pale -> dark so they stay readable */
html[data-color-mode="light"] .text-red-100,
html[data-color-mode="light"] .text-red-200,
html[data-color-mode="light"] .text-red-300 { color: #b91c1c !important; }

html[data-color-mode="light"] .text-green-100,
html[data-color-mode="light"] .text-green-200,
html[data-color-mode="light"] .text-green-300,
html[data-color-mode="light"] .text-emerald-100,
html[data-color-mode="light"] .text-emerald-200,
html[data-color-mode="light"] .text-emerald-300 { color: #047857 !important; }

html[data-color-mode="light"] .text-yellow-100,
html[data-color-mode="light"] .text-yellow-200,
html[data-color-mode="light"] .text-yellow-300 { color: #a16207 !important; }

html[data-color-mode="light"] .text-sky-100,
html[data-color-mode="light"] .text-sky-200,
html[data-color-mode="light"] .text-sky-300,
html[data-color-mode="light"] .text-blue-100,
html[data-color-mode="light"] .text-blue-200,
html[data-color-mode="light"] .text-blue-300 { color: #1d4ed8 !important; }

/* Form fields: dark typed text, readable placeholder */
html[data-color-mode="light"] input:not([type="submit"]):not([type="button"]):not(.btn-primary),
html[data-color-mode="light"] select,
html[data-color-mode="light"] textarea {
  color: #0c0a09 !important;
  -webkit-text-fill-color: #0c0a09 !important;
}
html[data-color-mode="light"] input::placeholder,
html[data-color-mode="light"] textarea::placeholder {
  color: #78716c !important;            /* stone-500 */
  -webkit-text-fill-color: #78716c !important;
  opacity: 1 !important;
}

/* Table cells / labels with no explicit class inherit dark text */
html[data-color-mode="light"] body,
html[data-color-mode="light"] .panel,
html[data-color-mode="light"] label,
html[data-color-mode="light"] td,
html[data-color-mode="light"] th {
  color: #1c1917;                        /* stone-900, no !important: classes above still win */
}

/* =========================================================
   3. KEEP DARK BOXES READABLE
   The install pop-up stays black in light mode, so its text
   must stay light. Same for primary buttons (handled above).
   ========================================================= */
html[data-color-mode="light"] [data-pwa-install-toast] .text-white { color: #ffffff !important; }
html[data-color-mode="light"] [data-pwa-install-toast] .text-stone-200 { color: #e7e5e4 !important; }
html[data-color-mode="light"] [data-pwa-install-toast] .text-stone-400 { color: #a8a29e !important; }
html[data-color-mode="light"] [data-pwa-install-toast] .text-orange-300 { color: #fdba74 !important; }
/* =========================================================
   4. ADMIN DASHBOARD CUSTOM COMPONENTS (light mode)
   The admin pages use their own named styles (admin-*__label,
   __value, __delta ...) built for a dark background.
   ========================================================= */

/* "This week revenue / activations ..." summary cards */
html[data-color-mode="light"] .admin-hero-summary__card {
  background: #ffffff !important;
  background-image: none !important;
  border-color: #e7e5e4 !important;       /* stone-200 */
  opacity: 1 !important;
  filter: none !important;
}
html[data-color-mode="light"] .admin-hero-summary__card * {
  opacity: 1 !important;
  -webkit-text-fill-color: currentColor !important;
}

/* Small uppercase labels on any admin component */
html[data-color-mode="light"] .admin-app [class*="__label"]:not(.admin-nav__label),
html[data-color-mode="light"] .admin-app [class*="__eyebrow"] {
  color: #c2410c !important;              /* orange-700 */
  opacity: 1 !important;
}

/* Big numbers / titles on any admin component */
html[data-color-mode="light"] .admin-app [class*="__value"],
html[data-color-mode="light"] .admin-app [class*="__title"],
html[data-color-mode="light"] .admin-nav__label {
  color: #0c0a09 !important;              /* stone-950 */
  opacity: 1 !important;
}

/* Up / down percentage changes */
html[data-color-mode="light"] .admin-app [class*="__delta"] {
  opacity: 1 !important;
}
html[data-color-mode="light"] .admin-app [class*="__delta"].is-up {
  color: #047857 !important;              /* emerald-700 */
}
html[data-color-mode="light"] .admin-app [class*="__delta"].is-down {
  color: #b91c1c !important;              /* red-700 */
}

/* Pink / rose / purple text used for alerts and deltas elsewhere */
html[data-color-mode="light"] .text-rose-100,
html[data-color-mode="light"] .text-rose-200,
html[data-color-mode="light"] .text-rose-300,
html[data-color-mode="light"] .text-pink-200,
html[data-color-mode="light"] .text-pink-300 { color: #be123c !important; }   /* rose-700 */
html[data-color-mode="light"] .text-purple-200,
html[data-color-mode="light"] .text-purple-300,
html[data-color-mode="light"] .text-violet-200,
html[data-color-mode="light"] .text-violet-300,
html[data-color-mode="light"] .text-indigo-200,
html[data-color-mode="light"] .text-indigo-300 { color: #6d28d9 !important; } /* violet-700 */
html[data-color-mode="light"] .text-cyan-200,
html[data-color-mode="light"] .text-cyan-300,
html[data-color-mode="light"] .text-teal-200,
html[data-color-mode="light"] .text-teal-300 { color: #0f766e !important; }   /* teal-700 */
html[data-color-mode="light"] .text-lime-200,
html[data-color-mode="light"] .text-lime-300 { color: #4d7c0f !important; }   /* lime-700 */

/* Admin command palette (Ctrl+K): give its box a light background in light mode
   so the now-dark text stays readable */
html[data-color-mode="light"] [data-admin-palette] > div {
  background-color: #fafaf9 !important;   /* stone-50 */
  border-color: #d6d3d1 !important;       /* stone-300 */
}
html[data-color-mode="light"] [data-admin-palette-results] {
  background-color: #f5f5f4 !important;   /* stone-100 */
}

html[data-color-mode="light"] .btn-primary,
html[data-color-mode="light"] .btn-primary * {
  color: #0c0a09 !important;
  -webkit-text-fill-color: #0c0a09 !important;
}