/* Light surfaces for every page. Loaded last so it beats in-page <style> blocks.
   Dark themes never match these selectors. */

html[data-fp-scheme="light"] :is(
  [class*="card"]:not(.active):not([class*="swatch-card-bar"]),
  [class*="panel"]:not(.active),
  [class*="zone"]:not(.active),
  [class*="slot"]:not(.active),
  [class*="-sheet"]:not(.active),
  [class*="tile"]:not(.active),
  [class*="chip"]:not(.active):not([class*="--on"]):not([class*="-on"]),
  .seedream-preview,
  .smart-upload-zone
) {
  background: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  border-color: var(--glass-border) !important;
}

html[data-fp-scheme="light"] :is(
  [class*="card"],
  [class*="panel"],
  [class*="zone"],
  [class*="slot"],
  [class*="-sheet"],
  [class*="tile"],
  [class*="chip"],
  .seedream-preview,
  .smart-upload-zone
) :is(h1, h2, h3, h4, h5, h6, p, span, small, strong, label, li):not(.btn):not([class*="btn"]):not(.badge) {
  color: var(--text-primary) !important;
}

html[data-fp-scheme="light"] :is([class*="-hint"], [class*="-sub"], [class*="-tagline"]) {
  color: var(--text-muted) !important;
}

html[data-fp-scheme="light"] :is(
  [class*="chip"].active,
  [class*="zone"].active,
  [class*="tile"].active,
  [class*="--on"]
) {
  background: color-mix(in srgb, var(--theme-accent) 18%, var(--bg-secondary)) !important;
  border-color: var(--theme-accent) !important;
  color: var(--text-primary) !important;
}

html[data-fp-scheme="light"] .fp-theme-swatch-card[data-fp-theme-set="default"] .fp-theme-swatch-card-bar,
html[data-fp-scheme="light"] .fp-theme-swatch-card[data-fp-theme-set="midnight"] .fp-theme-swatch-card-bar { background: linear-gradient(135deg, #0f172a, #6366f1) !important; }
html[data-fp-scheme="light"] .fp-theme-swatch-card[data-fp-theme-set="ember"] .fp-theme-swatch-card-bar { background: linear-gradient(135deg, #120805, #f97316) !important; }
html[data-fp-scheme="light"] .fp-theme-swatch-card[data-fp-theme-set="ocean"] .fp-theme-swatch-card-bar { background: linear-gradient(135deg, #02141c, #22d3ee) !important; }
html[data-fp-scheme="light"] .fp-theme-swatch-card[data-fp-theme-set="neon"] .fp-theme-swatch-card-bar { background: linear-gradient(135deg, #07010c, #ec4899) !important; }
html[data-fp-scheme="light"] .fp-theme-swatch-card[data-fp-theme-set="forest"] .fp-theme-swatch-card-bar { background: linear-gradient(135deg, #03140c, #34d399) !important; }
html[data-fp-scheme="light"] .fp-theme-swatch-card[data-fp-theme-set="obsidian"] .fp-theme-swatch-card-bar { background: linear-gradient(135deg, #050505, #eab308) !important; }
html[data-fp-scheme="light"] .fp-theme-swatch-card[data-fp-theme-set="crimson"] .fp-theme-swatch-card-bar { background: linear-gradient(135deg, #1a0a10, #fb7185) !important; }
html[data-fp-scheme="light"] .fp-theme-swatch-card[data-fp-theme-set="daylight"] .fp-theme-swatch-card-bar { background: linear-gradient(135deg, #e2e8f0, #4f46e5) !important; }
html[data-fp-scheme="light"] .fp-theme-swatch-card[data-fp-theme-set="sand"] .fp-theme-swatch-card-bar { background: linear-gradient(135deg, #efe4d4, #ea580c) !important; }
html[data-fp-scheme="light"] .fp-theme-swatch-card[data-fp-theme-set="glacier"] .fp-theme-swatch-card-bar { background: linear-gradient(135deg, #cffafe, #0d9488) !important; }

html[data-fp-scheme="light"] .orientation-card.active,
html[data-fp-scheme="light"] .size-card.active,
html[data-fp-scheme="light"] .quality-tier-btn.active {
  background: linear-gradient(135deg, color-mix(in srgb, var(--theme-accent) 28%, var(--bg-secondary)), color-mix(in srgb, var(--theme-accent-2) 22%, var(--bg-secondary))) !important;
  border-color: var(--theme-accent) !important;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--theme-accent) 35%, transparent) !important;
  color: var(--text-primary) !important;
}

/* My Jobs: photo cards keep light type on the image; filters stay light with colored active chips */
html[data-fp-scheme="light"] .compact-card-thumbnail {
  background: linear-gradient(135deg, rgba(8, 12, 30, 0.95), rgba(18, 28, 56, 0.85)) !important;
}
html[data-fp-scheme="light"] .compact-card-title,
html[data-fp-scheme="light"] .compact-card-title i {
  color: #f8fafc !important;
}
html[data-fp-scheme="light"] .compact-card-meta span {
  background: rgba(15, 23, 42, 0.62) !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
  color: #f8fafc !important;
}
html[data-fp-scheme="light"] .modern-filters-container {
  background: var(--bg-secondary) !important;
  border: 1px solid var(--glass-border) !important;
}
html[data-fp-scheme="light"] .filter-label {
  color: var(--text-muted) !important;
}
html[data-fp-scheme="light"] .filter-chip:not(.active) {
  background: var(--bg-primary) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--glass-border) !important;
}
html[data-fp-scheme="light"] .filter-chip.active {
  background: linear-gradient(135deg, var(--theme-accent), var(--theme-accent-2)) !important;
  color: #fff !important;
  border-color: transparent !important;
}
html[data-fp-scheme="light"] .filter-chip.active i {
  color: #fff !important;
  background: transparent !important;
}
html[data-fp-scheme="light"] .filter-chip.chip-info.active { background: linear-gradient(135deg, #3b82f6, #2563eb) !important; }
html[data-fp-scheme="light"] .filter-chip.chip-primary.active { background: linear-gradient(135deg, var(--theme-accent-2), #7c3aed) !important; }
html[data-fp-scheme="light"] .filter-chip.chip-success.active { background: linear-gradient(135deg, #10b981, #059669) !important; }
html[data-fp-scheme="light"] .filter-chip.chip-danger.active { background: linear-gradient(135deg, #ef4444, #dc2626) !important; }


html[data-fp-scheme="light"] :is(
  .btn-primary,
  .btn-success,
  .btn-gradient,
  .btn-premium-primary,
  [class*="btn-use"],
  [class*="hcbtn"],
  [class*="hc-btn"],
  .badge
),
html[data-fp-scheme="light"] :is(
  .btn-primary,
  .btn-success,
  .btn-gradient,
  .btn-premium-primary,
  [class*="btn-use"],
  [class*="hcbtn"],
  [class*="hc-btn"],
  .badge
) :is(span, small, strong, i) {
  color: #fff !important;
}
