/* ConstructSquare Theme System (Light & Dark Mode) */

/* Base Transitions */
body, header, footer, section, div, a, button, input, select, textarea, details {
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.2s ease, box-shadow 0.25s ease;
}

/* ---------------------------------------------------- */
/* LIGHT MODE STYLES                                    */
/* ---------------------------------------------------- */
html.light body {
  background-color: #f8fafc !important;
  color: #1e293b !important;
}

/* Background overrides */
html.light .bg-\[\#0b1120\],
html.light .bg-\[\#070b14\],
html.light .bg-\[\#080d19\] {
  background-color: #f8fafc !important;
}

html.light .bg-slate-900,
html.light .bg-slate-900\/50,
html.light .bg-slate-900\/60,
html.light .bg-slate-900\/70,
html.light .bg-slate-900\/80 {
  background-color: #ffffff !important;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.04) !important;
}

html.light .bg-slate-950,
html.light .bg-slate-950\/60,
html.light .bg-slate-950\/80 {
  background-color: #f1f5f9 !important;
}

/* Header & Announcement */
html.light header {
  background-color: rgba(255, 255, 255, 0.92) !important;
  border-bottom-color: #e2e8f0 !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05) !important;
}

html.light .bg-gradient-to-r.from-emerald-900\/60 {
  background: linear-gradient(to right, #ecfdf5, #f8fafc, #ecfdf5) !important;
  border-bottom-color: #a7f3d0 !important;
  color: #065f46 !important;
}

/* Borders */
html.light .border-slate-800,
html.light .border-slate-800\/80,
html.light .border-slate-900 {
  border-color: #e2e8f0 !important;
}

/* Standard Typography */
html.light .text-white {
  color: #0f172a !important;
}

html.light .text-slate-100 {
  color: #0f172a !important;
}

html.light .text-slate-200 {
  color: #1e293b !important;
}

html.light .text-slate-300 {
  color: #334155 !important;
}

html.light .text-slate-400 {
  color: #64748b !important;
}

html.light .text-slate-500 {
  color: #94a3b8 !important;
}

/* ---------------------------------------------------- */
/* LIGHT MODE ACCENT & HIGH-CONTRAST TEXT CORRECTIONS  */
/* Ensures accent texts remain punchy and WCAG compliant*/
/* ---------------------------------------------------- */
html.light .text-emerald-300,
html.light .text-emerald-400 {
  color: #047857 !important; /* Deep Forest Emerald */
}

html.light .text-sky-400 {
  color: #0369a1 !important; /* Deep Ocean Sky */
}

html.light .text-amber-300,
html.light .text-amber-400 {
  color: #b45309 !important; /* Deep Amber Bronze */
}

html.light .text-rose-300,
html.light .text-rose-400 {
  color: #be123c !important; /* Deep Crimson Rose */
}

/* Preserve Dark Text on Emerald Badges & High-Contrast CTA Buttons */
html.light .bg-emerald-500.text-slate-950,
html.light .bg-emerald-400.text-slate-950,
html.light .bg-gradient-to-r.from-emerald-500.text-slate-950,
html.light .bg-emerald-500 .text-slate-950,
html.light .text-slate-950 {
  color: #022c22 !important; /* Rich Dark Green-Black */
}

/* Gradient Cards in Light Mode */
html.light .bg-gradient-to-b.from-slate-900.to-emerald-950\/40 {
  background: linear-gradient(to bottom, #ffffff, #f0fdf4) !important;
  border-color: #10b981 !important;
  box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.15), 0 8px 10px -6px rgba(16, 185, 129, 0.1) !important;
}

/* Table Accent Row */
html.light .bg-emerald-500\/10 {
  background-color: #ecfdf5 !important;
}

html.light .divide-slate-800\/60 > :not([hidden]) ~ :not([hidden]) {
  border-color: #e2e8f0 !important;
}

/* Forms & Inputs */
html.light input,
html.light select,
html.light textarea {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

html.light input::placeholder,
html.light textarea::placeholder {
  color: #94a3b8 !important;
}

html.light input:focus,
html.light select:focus,
html.light textarea:focus {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.15) !important;
}

/* Blueprint Grid */
html.light .blueprint-grid {
  background-size: 32px 32px;
  background-image: linear-gradient(to right, rgba(16, 185, 129, 0.07) 1px, transparent 1px),
                    linear-gradient(to bottom, rgba(16, 185, 129, 0.07) 1px, transparent 1px) !important;
}

/* Pricing Cards in Light Mode */
html.light .bg-slate-900.border-emerald-500 {
  background-color: #ffffff !important;
  box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.15), 0 8px 10px -6px rgba(16, 185, 129, 0.1) !important;
}

/* Secondary Buttons */
html.light .bg-slate-800,
html.light .bg-slate-800\/90 {
  background-color: #e2e8f0 !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

html.light .bg-slate-800:hover,
html.light .bg-slate-800\/90:hover {
  background-color: #cbd5e1 !important;
  color: #0f172a !important;
}

/* FAQ Details */
html.light details {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
}

html.light details[open] {
  border-color: #10b981 !important;
}

/* Footer */
html.light footer {
  background-color: #f1f5f9 !important;
  border-top-color: #e2e8f0 !important;
}

/* Theme Toggle Button Styling */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background-color: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(51, 65, 85, 0.8);
  color: #f8fafc;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.theme-toggle-btn:hover {
  background-color: rgba(51, 65, 85, 0.9);
  border-color: #10b981;
  color: #10b981;
  transform: translateY(-1px);
}

html.light .theme-toggle-btn {
  background-color: #ffffff;
  border-color: #cbd5e1;
  color: #334155;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

html.light .theme-toggle-btn:hover {
  background-color: #f1f5f9;
  border-color: #10b981;
  color: #059669;
}
