/* WFM Labs Tools — CSS Variables Theme Override
   For tools using CSS custom properties (--bg, --card-bg, etc.)
   Dark mode = native, Light mode = override vars */

/* Font: match MIV */
*, body, html {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}

body { transition: background-color 0.2s, color 0.2s; }

/* ═══════════════════════════════════════════════════
   LIGHT MODE — override CSS custom properties
   ═══════════════════════════════════════════════════ */

html.light {
  --bg: #f3f4f6 !important;
  --navy: #f3f4f6 !important;
  --navy-light: #ffffff !important;
  --navy-mid: #e5e7eb !important;
  --card-bg: #ffffff !important;
  --border: #e5e7eb !important;
  --white: #111827 !important;
  --slate: #4B5563 !important;
  --slate-light: #6B7280 !important;
}
html.light body {
  background: #f3f4f6 !important;
  color: #1f2937 !important;
}

/* ═══════════════════════════════════════════════════
   TOOLBAR, FOOTER, ABOUT
   ═══════════════════════════════════════════════════ */

#wfm-toolbar {
  position: fixed; top: 12px; right: 16px; z-index: 1000;
  display: flex; align-items: center; gap: 8px;
}
#wfm-about-btn {
  background: rgba(30,41,59,0.9); backdrop-filter: blur(8px);
  border: 1px solid #334155; color: #94A3B8;
  width: 36px; height: 36px; border-radius: 8px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600; transition: all 0.2s; flex-shrink: 0;
}
#wfm-about-btn:hover { border-color: #3B82F6; color: #60a5fa; }
#wfm-theme-toggle {
  background: rgba(30,41,59,0.9); backdrop-filter: blur(8px);
  border: 1px solid #334155; color: #94A3B8;
  width: 36px; height: 36px; border-radius: 8px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 18px; transition: all 0.2s; flex-shrink: 0;
}
#wfm-theme-toggle:hover { border-color: #3B82F6; color: #60a5fa; }

.light #wfm-about-btn, .light #wfm-theme-toggle {
  background: rgba(255,255,255,0.9); border-color: #d1d5db; color: #6B7280;
}
.light #wfm-about-btn:hover, .light #wfm-theme-toggle:hover {
  border-color: #2563eb; color: #2563eb;
}

#wfm-about-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  z-index: 10000; align-items: center; justify-content: center; padding: 24px;
}
#wfm-about-overlay.active { display: flex; }
#wfm-about-box {
  background: #1E293B; border: 1px solid #334155; border-radius: 12px;
  padding: 24px; max-width: 560px; width: 100%; max-height: 80vh; overflow-y: auto;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
#wfm-about-box h3 { color: #F8FAFC; font-size: 18px; font-weight: 700; margin: 0 0 4px 0; }
#wfm-about-box .about-sub { color: #3B82F6; font-size: 12px; margin: 0 0 16px 0; }
#wfm-about-box .about-text { color: #94A3B8; font-size: 14px; line-height: 1.7; margin: 0; }
#wfm-about-box .about-close {
  margin-top: 16px; background: #3B82F6; color: #fff; border: none;
  padding: 8px 20px; border-radius: 6px; cursor: pointer; font-size: 13px; font-weight: 600;
}
#wfm-about-box .about-close:hover { background: #2563EB; }

.light #wfm-about-box { background: #ffffff; border-color: #e5e7eb; }
.light #wfm-about-box h3 { color: #111827; }
.light #wfm-about-box .about-sub { color: #2563eb; }
.light #wfm-about-box .about-text { color: #374151; }

#wfm-footer {
  background-color: #1E293B; border-top: 1px solid #334155;
  padding: 16px 24px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
#wfm-footer .footer-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
#wfm-footer .footer-copyright { font-size: 13px; color: #94A3B8; }
#wfm-footer .footer-copyright a { color: #3B82F6; text-decoration: none; }
#wfm-footer .footer-links { display: flex; gap: 20px; }
#wfm-footer .footer-links a { font-size: 13px; color: #94A3B8; text-decoration: none; transition: color 0.2s; }
#wfm-footer .footer-links a:hover { color: #3B82F6; }
#wfm-footer .footer-disclaimer { font-size: 11px; color: #64748B; text-align: center; max-width: 800px; margin: 0 auto; line-height: 1.5; }

.light #wfm-footer { background-color: #ffffff; border-top-color: #e5e7eb; }
.light #wfm-footer .footer-copyright a { color: #2563eb; }
.light #wfm-footer .footer-links a:hover { color: #2563eb; }
