/* SnapTab Theme System — Light (blue-white) overrides */
/* Dark theme = default Tailwind classes; Light theme = overrides below */

/* ===== Page background ===== */
html:not(.dark) body {
  background: linear-gradient(180deg, #f5f9ff 0%, #edf4ff 50%, #f5f9ff 100%) !important;
  color: #1e293b !important;
}

/* ===== Navigation / Header ===== */
html:not(.dark) .bg-background-dark\/80 {
  background-color: rgba(255, 255, 255, 0.88) !important;
}
html:not(.dark) .border-border-dark {
  border-color: #dde6f0 !important;
}
html:not(.dark) .border-border-dark\/30 {
  border-color: rgba(221, 230, 240, 0.5) !important;
}
html:not(.dark) .border-border-dark\/20 {
  border-color: rgba(221, 230, 240, 0.3) !important;
}
html:not(.dark) .border-border-dark\/50 {
  border-color: rgba(221, 230, 240, 0.6) !important;
}

/* ===== Background colors ===== */
html:not(.dark) .bg-border-dark {
  background-color: #dde6f0 !important;
}
html:not(.dark) .bg-background-dark {
  background-color: #f5f9ff !important;
}
html:not(.dark) .bg-background-dark\/50 {
  background-color: rgba(245, 249, 255, 0.5) !important;
}
html:not(.dark) .bg-surface-dark {
  background-color: #ffffff !important;
}
html:not(.dark) .bg-surface-dark\/50 {
  background-color: #f8fafc !important;
}
html:not(.dark) .bg-surface-dark\/30 {
  background-color: #fafbfd !important;
}
html:not(.dark) .bg-surface-dark\/20 {
  background-color: #fafcfe !important;
}
html:not(.dark) .bg-surface {
  background-color: #ffffff !important;
}
html:not(.dark) .bg-neutral-dark {
  background-color: #ffffff !important;
}
html:not(.dark) .bg-neutral-dark\/30 {
  background-color: #f8fafc !important;
}
html:not(.dark) .bg-neutral-dark\/40 {
  background-color: #f1f5f9 !important;
}
html:not(.dark) .bg-slate-900 {
  background-color: #ffffff !important;
}
html:not(.dark) .bg-slate-900\/50 {
  background-color: rgba(255, 255, 255, 0.7) !important;
}
html:not(.dark) .bg-slate-900\/30 {
  background-color: rgba(255, 255, 255, 0.5) !important;
}
html:not(.dark) .bg-slate-900\/20 {
  background-color: rgba(255, 255, 255, 0.3) !important;
}
html:not(.dark) .bg-slate-800 {
  background-color: #f1f5f9 !important;
}
html:not(.dark) .bg-slate-700 {
  background-color: #e2e8f0 !important;
}

/* ===== Text colors ===== */
html:not(.dark) .text-white {
  color: #0f172a !important;
}
html:not(.dark) .text-slate-100 {
  color: #1e293b !important;
}
html:not(.dark) .text-slate-200 {
  color: #334155 !important;
}
html:not(.dark) .text-slate-300 {
  color: #475569 !important;
}
html:not(.dark) .text-slate-400 {
  color: #64748b !important;
}
html:not(.dark) .text-slate-500 {
  color: #94a3b8 !important;
}
html:not(.dark) .text-slate-600 {
  color: #64748b !important;
}

/* ===== Border colors ===== */
html:not(.dark) .border-slate-800 {
  border-color: #e2e8f0 !important;
}
html:not(.dark) .border-slate-700 {
  border-color: #e2e8f0 !important;
}
html:not(.dark) .border-neutral-border {
  border-color: #dde6f0 !important;
}
html:not(.dark) .border-border-color {
  border-color: #dde6f0 !important;
}

/* ===== Shadows for light mode ===== */
html:not(.dark) .shadow-2xl {
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.08) !important;
}
html:not(.dark) .shadow-xl {
  box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.06) !important;
}

/* ===== Specific component overrides ===== */

/* Primary button text should stay dark on primary bg */
html:not(.dark) .bg-primary .text-background-dark,
html:not(.dark) .bg-primary.text-background-dark,
html:not(.dark) .text-background-dark {
  color: #101e22 !important;
}

/* CTA section with primary bg — keep dark text */
html:not(.dark) .bg-primary .text-white,
html:not(.dark) .bg-gradient-to-br .text-white,
html:not(.dark) [class*="bg-primary"] > .text-white {
  color: #0f172a !important;
}

/* Footer on light mode */
html:not(.dark) footer {
  background-color: #f8faff !important;
}
html:not(.dark) footer .text-white {
  color: #1e293b !important;
}

/* Hover states */
html:not(.dark) .hover\:bg-slate-700:hover {
  background-color: #e2e8f0 !important;
}
html:not(.dark) .hover\:bg-slate-900:hover {
  background-color: #f1f5f9 !important;
}
html:not(.dark) .hover\:bg-white\/5:hover {
  background-color: rgba(15, 23, 42, 0.03) !important;
}
html:not(.dark) .hover\:bg-white\/30:hover {
  background-color: rgba(15, 23, 42, 0.06) !important;
}

/* Download page hero gradient (from-surface-dark to-background-dark) */
html:not(.dark) .from-surface-dark {
  --tw-gradient-from: #ffffff !important;
  --tw-gradient-to: rgba(255, 255, 255, 0) !important;
}
html:not(.dark) .to-background-dark {
  --tw-gradient-to: #f5f9ff !important;
}

/* Gradient overlays */
html:not(.dark) .from-primary\/30 {
  --tw-gradient-from: rgba(13, 185, 242, 0.12) !important;
}

/* Focus ring for form inputs */
html:not(.dark) input,
html:not(.dark) select,
html:not(.dark) textarea {
  background-color: #f8fafc !important;
  border-color: #dde6f0 !important;
  color: #1e293b !important;
}
html:not(.dark) input::placeholder,
html:not(.dark) textarea::placeholder {
  color: #94a3b8 !important;
}

/* Window mockup dots */
html:not(.dark) .bg-red-500\/50 {
  background-color: rgba(239, 68, 68, 0.6) !important;
}
html:not(.dark) .bg-yellow-500\/50 {
  background-color: rgba(234, 179, 8, 0.6) !important;
}
html:not(.dark) .bg-green-500\/50 {
  background-color: rgba(34, 197, 94, 0.6) !important;
}

/* Theme toggle button */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  background: transparent;
  color: #94a3b8;
}
html.dark .theme-toggle {
  color: #94a3b8;
  border-color: #223f49;
}
html.dark .theme-toggle:hover {
  background: #162a30;
  color: #0db9f2;
}
html:not(.dark) .theme-toggle {
  color: #64748b;
  border-color: #dde6f0;
}
html:not(.dark) .theme-toggle:hover {
  background: #f1f5f9;
  color: #0db9f2;
}

/* Smooth transition for theme switch */
body,
header,
footer,
main,
section,
div,
a,
p,
h1, h2, h3, h4, h5, h6,
span,
button,
input, select, textarea {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* App mockup styles for hero section */
.app-mockup {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 0;
  font-size: 11px;
  line-height: 1.4;
}
.app-mockup-sidebar {
  padding: 12px;
  border-right: 1px solid;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
html.dark .app-mockup-sidebar {
  background: #0f1a1f;
  border-color: #223f49;
}
html:not(.dark) .app-mockup-sidebar {
  background: #f1f5f9;
  border-color: #e2e8f0;
}
.app-mockup-main {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}
.mock-label {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.5;
}
.mock-line {
  height: 8px;
  border-radius: 4px;
  background: currentColor;
  opacity: 0.12;
}
.mock-line.short { width: 60%; }
.mock-line.medium { width: 80%; }
.mock-btn {
  padding: 4px 10px;
  border-radius: 6px;
  background: #0db9f2;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  text-align: center;
  width: fit-content;
}
.mock-table {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 1px;
  font-size: 9px;
  border-radius: 6px;
  overflow: hidden;
  flex: 1;
}
.mock-table-header {
  font-weight: 700;
  padding: 4px 6px;
}
.mock-table-cell {
  padding: 4px 6px;
}
html.dark .mock-table-header {
  background: #162a30;
  color: #94a3b8;
}
html.dark .mock-table-cell {
  background: #0f1a1f;
  color: #64748b;
}
html:not(.dark) .mock-table-header {
  background: #edf2f7;
  color: #475569;
}
html:not(.dark) .mock-table-cell {
  background: #f8fafc;
  color: #64748b;
}

@media (max-width: 640px) {
  .app-mockup {
    grid-template-columns: 1fr;
  }
  .app-mockup-sidebar {
    display: none;
  }
}
