/* Light mode overrides. Loaded last, so these win over the dark-theme colours in the other files. */

/* Buttons: dark text by default, so labels stay readable on light backgrounds. */
:root[data-theme="light"] button { color: var(--text); }

/* Buttons with a coloured background keep white text. */
:root[data-theme="light"] .lesson-mode.active,
:root[data-theme="light"] .scale-opt input:checked + span,
:root[data-theme="light"] .toggle.on,
:root[data-theme="light"] .toggle.trip,
:root[data-theme="light"] .toggle.switch-on,
:root[data-theme="light"] .badge.ok,
:root[data-theme="light"] .badge.bad,
:root[data-theme="light"] .drill-choice.right,
:root[data-theme="light"] .drill-choice.wrong,
:root[data-theme="light"] .account-avatar { color: #ffffff; }

/* Text that was written in white for the dark theme. */
:root[data-theme="light"] #hintBtn,
:root[data-theme="light"] .board-head .live,
:root[data-theme="light"] .buddy-id strong,
:root[data-theme="light"] .buddy-text,
:root[data-theme="light"] .buddy-title,
:root[data-theme="light"] .account-text strong,
:root[data-theme="light"] .components-panel,
:root[data-theme="light"] .comp-item span,
:root[data-theme="light"] .comp-safety { color: var(--text); }
:root[data-theme="light"] .components-note,
:root[data-theme="light"] .comp-use,
:root[data-theme="light"] .comp-terms dd { color: var(--muted); }

/* Hint button: keep the green outline, with dark text on the light surface. */
:root[data-theme="light"] #hintBtn { background: var(--panel); }

/* Pointer code labels: dark chips with white text, so they stay readable on the photos. */
:root[data-theme="light"] .tcode {
  background: #ffffff;
  color: #000000;
  border-color: #000000;
}

/* Auth tabs and sign-in fields. */
:root[data-theme="light"] .auth-card label { color: var(--muted); }
:root[data-theme="light"] .auth-tabs button.active { color: #111111; }

/* Workbench cards are white in light mode, with their inner boxes too. */
:root[data-theme="light"] .card,
:root[data-theme="light"] .card-supply,
:root[data-theme="light"] .supply-box { background: #ffffff; }

/* Unlit switch and breaker buttons: light surface with readable dark text. */
:root[data-theme="light"] .toggle:not(.on):not(.trip):not(.switch-on) {
  background: #e4ebf3;
  color: var(--text);
  border-color: var(--border);
}

/* Navigation bar: navy in light mode, with light text. */
:root[data-theme="light"] .topbar {
  background: #14305a;
  border-bottom: 1px solid #0d2244;
}
:root[data-theme="light"] .topbar .brand,
:root[data-theme="light"] .topbar .account-text strong { color: #ffffff; }
:root[data-theme="light"] .topbar .account-text small { color: #b8c9e0; }
:root[data-theme="light"] .topbar .nav-btn { color: #d6e2f3; }
:root[data-theme="light"] .topbar .nav-btn:hover { color: #ffffff; }
:root[data-theme="light"] .topbar .nav-btn.active { color: #ffffff; }
:root[data-theme="light"] .topbar .levels { background: #0d2244; border-color: #2b4a7a; }
:root[data-theme="light"] .topbar .level-btn { color: #d6e2f3; }
:root[data-theme="light"] .topbar .level-btn.active { color: #111111; }
:root[data-theme="light"] .topbar .account { color: #b8c9e0; }
:root[data-theme="light"] .topbar .account-logout { color: #ffffff; }

/* Bulb container on the workbench: white in light mode. */
:root[data-theme="light"] .bulb { background: #ffffff; }

/* Workbench board: a visible grid in light mode. */
:root[data-theme="light"] { --board: #e6edf7; }
:root[data-theme="light"] .board {
  background-color: var(--board);
  background-image:
    linear-gradient(rgba(27, 42, 58, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(27, 42, 58, 0.16) 1px, transparent 1px);
}

/* Pointer labels on the photos: dark label with white text, so the text is readable in light mode. */
:root[data-theme="light"] .photo-wrap .term.on-photo .tcode,
:root[data-theme="light"] .tcode {
  background: #1b2a3a;
  color: #ffffff;
  border-color: #1b2a3a;
}
