/* ============================================
   ONWASH — LIGHT THEME
   Drop-in override. Load this file AFTER app.css
   (and after service_provider.css / chat.css /
   local_businesses.css, order doesn't matter for
   those three since they only *consume* variables).

   Activate by adding data-theme="light" to <html>
   or <body>, e.g.:
     <html lang="en" dir="ltr" data-theme="light">
   Toggle it at runtime with JS (see snippet at the
   bottom of this file, commented out).
   ============================================ */

html[data-theme="light"] {
  /* ---- Brand (kept close to source; brand-dark
     deepened slightly for AA contrast on white) ---- */
  --brand:        #0090e0;
  --brand-dark:   #006fb3;
  --brand-light:  #33b9ff;
  --brand-glow:   rgba(0, 144, 224, 0.18);

  /* ---- Surfaces ---- */
  --bg-base:      #f4f6fb;
  --bg-main:      #ffffff;
  --bg-card:      #ffffff;
  --bg-elevated:  #eef1f8;
  --bg-input:     #ffffff;

  /* ---- Borders ---- */
  --border:       rgba(15, 23, 42, 0.09);
  --border-brand: rgba(0, 144, 224, 0.35);

  /* ---- Text ---- */
  --text-primary: #101828;
  --text-second:  #5b6478;
  --text-muted:   #98a2b8;

  /* ---- Status ---- */
  --error:        #e0304f;
  --success:      #0aa876;
  --warning:      #c98600;

  /* ---- Shadows (much softer — light UIs read
     "elevated" with subtle, not black, shadows) ---- */
  --shadow-brand: 0 0 24px rgba(0, 144, 224, 0.16);
  --shadow-card:  0 8px 24px rgba(16, 24, 40, 0.08);
}

/* ---- Background mesh: dial back opacity so the
   blobs stay a soft accent instead of muddying
   the white surface ---- */
html[data-theme="light"] .bg-mesh::before {
  background: radial-gradient(circle, rgba(0,144,224,0.08) 0%, transparent 65%);
}
html[data-theme="light"] .bg-mesh::after {
  background: radial-gradient(circle, rgba(0,144,224,0.05) 0%, transparent 65%);
}

/* ---- Splash gradient text needs a touch more
   contrast on white ---- */
html[data-theme="light"] .splash-brand {
  background: linear-gradient(135deg, var(--brand) 30%, var(--brand-dark));
  -webkit-background-clip: text;
  background-clip: text;
}

/* ---- Auth header glow: same treatment as the mesh ---- */
html[data-theme="light"] .auth-header-bg {
  background: linear-gradient(180deg, rgba(0,144,224,0.06) 0%, transparent 100%);
}

/* ---- Category filter active state: the dark-theme
   value baked rgba(0,166,255,0.1) inline rather than
   through a variable, so it needs its own override ---- */
html[data-theme="light"] .category-chip.active {
  background: rgba(0, 144, 224, 0.08);
}

/* ---- Status icon tints: same story, inline rgba
   rather than a variable ---- */
html[data-theme="light"] .status-icon.pending {
  background: rgba(201, 134, 0, 0.1);
}
html[data-theme="light"] .status-icon.approved {
  background: rgba(10, 168, 118, 0.1);
}
html[data-theme="light"] .status-icon.rejected {
  background: rgba(224, 48, 79, 0.1);
}

/* ---- Care center green accent stays legible as-is,
   but the hover shadow was tuned for a dark card ---- */
html[data-theme="light"] .care-cat-card:hover {
  box-shadow: 0 8px 20px rgba(16,185,129,0.14);
}
html[data-theme="light"] .caregiver-card:hover {
  box-shadow: 0 8px 20px rgba(0,144,224,0.12);
}

/* Note: the theme toggle button's CSS now lives inline in index.php's
   <head> <style> block, not here — so the button always renders even
   if this file fails to load. Nothing to add for it in this file. */

/*
  ---- Optional: minimal toggle wiring ----
  Add a button anywhere, e.g.:
    <button id="theme-toggle" aria-label="Toggle theme">🌓</button>

  Then in a script tag:

  const root = document.documentElement;
  const saved = localStorage.getItem('onwash-theme');
  if (saved === 'light') root.setAttribute('data-theme', 'light');

  document.getElementById('theme-toggle')?.addEventListener('click', () => {
    const isLight = root.getAttribute('data-theme') === 'light';
    if (isLight) {
      root.removeAttribute('data-theme');
      localStorage.setItem('onwash-theme', 'dark');
    } else {
      root.setAttribute('data-theme', 'light');
      localStorage.setItem('onwash-theme', 'light');
    }
  });
*/